Conneted mode token dissappears after vscode restart

Hi!

Our environment:

  • Redhat Openshift, Dev Spaces
  • Operating system: Red Hat Enterprise Linux 9
  • IDE: VSCode for the web/VSCode in browser.
  • SonarLint extension: v4.2.2
  • We use connected mode: Connected to SonarQube 10.1.

We have a problem with the sonarlint extension whenever we try to setup a connection to our SonarQube server. We are able to connect with the generated token, however everytime we restart our vscode session the token with which we connected disappears and we have to generate a new token again.

Do you know where the token saved by sonarlint are stored on the file system after pressing “save connection”. We need to find and mount the location to make sure that the token persist between restarts.

Alternatively can we inject the token as an environment variable for the extension to read?

Hope you can help!

Best Regards
Andreas

Hi Andreas,

Welcome to the community!

V4.3.0 was released a couple weeks ago. Would you mind upgrading and seeing if this is still replicable?

 
Thx,
Ann

Hi Ann.

Our environment (Redhat Openshift, Dev Spaces) uses Open VSX Registry, however your publishing job seem to have failed:

Regards
Andreas

1 Like

Hey @APINYK, indeed there was a problem with publishing 4.3 to Open-VSX, now it is fixed. Thanks a lot for calling that out! :bowing_woman:

Regarding your post - ever since v3.6 (released July 2022), we do not store authentication tokens as plaintext in the user settings anymore. Instead, they are stored in the VSCode SecretStorage. For the exact location on the file system, you might find this issue useful.

So, in short, even though the token does not appear in “clear sight”, it should be persisted between restarts. And, your newly set up connection should be still working.

Screenshot 2024-02-15 at 09.36.40

I hope that helps,
Sophio

Hi Sophio.

We are using the DevSpaces/Eclipse Che cloud development platform. Unfortuantely it seems to be a bug in this environment that drops the tokens/VSCode SecretStorage between every restart. Thanks for your responses!

Regards Andreas

2 Likes