-
Notifications
You must be signed in to change notification settings - Fork 6k
[Bug]: Cannot retrieve values stored using extension context SecretStorage #6395
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Code server 4.11 does not have this issue |
Are you running code-server with dbus? I think in previous
versions it would store secrets in the browser but it switched to
storing them server-side and the current implementation uses dbus.
Without dbus it uses an in-memory store so I wonder if a new store
gets created every time the extension host is started (which
happens on each page load).
Related: #5072
|
For containers: Use environment variables to provide credentials. See #5072 (comment) ff for more information. |
@code-asher @benz0li Thanks for your replies, but the problems we are facing are not related to the github extension. We have other extensions that use the secret storage API. We have tried also running code-server in a plain ubuntu image (not in a container), and we have the same problem with the code snippet provided. From the dbus session logs, we can see that code-server is trying to retrieve the values from it, but we never see any event when trying to store the value. We are using the default configuration when running code-server. Do we need to do anything in particular for the secret storage API to work? Thanks in advance. |
There is nothing particular you need to do as far as I am aware.
I think there is a bug although the mystery is why it only
presents in code-server and not Codespaces. We will need to dive
into it and see what we can find.
|
Facing the same issue. After upgrading to 4.16.1, page refresh is resetting the session. I spent some time comparing codespace and my container. I didn't notice keyring or dbus configured/running in my codespace instance. Also codespace version is different from what comes with 4.16.1 which I am using. Codespace version
My code-server instance Also the doc mentions that since version 1.80 VS Code moved away from using keytar. But in my logs I see keytar is being used. Also there are references in code
|
Attaching an archive that has a Dockerfile that bundles the example extension provided by @pablocabrera85. This has dbus and keyring configured.
To rule out any setup issues I've added a python program. You can invoke it by launching a terminal within the browser and type
fina.mov |
Thank you for the detailed information! The fact that it works in
Codespaces yet dbus is not running is curious indeed. I wonder if
they replace keytar in Codespaces or something like that, and
whether that is something part of the OSS or something bespoke
they do as part of their build process. Maybe we can just swap
out the keytar module for something else.
|
Same issue here. |
I am not sure it is worth debugging this because keytar has been
removed upstream, so I think the next release will have some new
system. I will definitely revisit at that point.
|
Is there an existing issue for this?
OS/Web Information
code-server --version
: 4.16.1Steps to Reproduce
context.secrets
instance for this extension. Input any value and proceed.secrets-0.0.1.zip
NOTE: If you prefer, you can just create an extension with the following code:
Expected
After the reload and executing the command a second time, the persisted value should be displayed.
According to the API, the secrets should be automatically persisted. But every time the browser tab reloads, the value is not there
Actual
Values are not stored between sessions/reloads
I tried the same extension in codespaces and it worked as expected
Logs
No response
Screenshot/Video
No response
Does this issue happen in VS Code or GitHub Codespaces?
Are you accessing code-server over HTTPS?
Notes
No response
The text was updated successfully, but these errors were encountered: