Forum Discussion

Broeks's avatar
Broeks
Helper II
1 year ago
Solved

Debugging in VSCode: Failed to get refresh token

Hello,   I'm developing my spark job definition in VSCode. I'm using the devcontainer provided by microsoft. I've added the provided config code to my main.py file, however I'm getting a "Failed t...
  • v-kpoloju-msft's avatar
    1 year ago

    Hi Broeks,
    Thanks for reaching out to the Microsoft fabric community forum. Thank you nilendraFabric, for your valuable input regarding the issue

     

    After thoroughly reviewing the details you provided, I have identified few workarounds that may help resolve the issue. Please follow these steps:

     

    Please ensure that the Azure Account extension in VSCode is up to date. Issues with refresh tokens can sometimes be related to the extension version. Sign out and sign back in using the Azure Account extension to refresh credentials and resolve token-related issues.

     

    Make sure the fabric-synapse-runtime-1.2 Conda environment is properly activated in VSCode. Verify that the JAVA_HOME environment variable points to the correct JDK installation path, with OpenJDK 8 recommended to avoid compatibility issues.

     

    Check that the devcontainer configuration is correctly set up with all necessary dependencies and environment variables. Ensure the debugging configuration in the launch.json file is correctly set up for the Spark job, including the correct entry point and required arguments. If the issue persists, try clearing the cached credentials by removing the ~/.azuredatastudio/argv.json file, but note that this will remove all connections.


    If this post helps, then please give us ‘Kudos’ and consider Accept it as a solution to help the other members find it more quickly.

     

    Thank you.