-
Notifications
You must be signed in to change notification settings - Fork 29.7k
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
Error while encrypting the text provided to safeStorage.encryptString. Encryption is not available. #188059
Comments
When encryption isn't available, we use an in-memory store instead so I think the current behavior should give you the desired behavior, no? Or does it actually throw instead and cause the extension to not function? |
@TylerLeonhardt Yeah exactly, it just throws right now (on linux). Same code works without issue on 1.79 |
I think this is because you see a dialog in the product to ask you to do something. I need to make that dialog non-blocking. In the meantime, you can do this: And configure basic text encryption which is fine because the container will be destroyed after. |
Thanks! I added |
I think maybe you want |
FYI I have opened #188432 to track allowing an in memory secret storage. If we get you unblocked with |
@TylerLeonhardt thanks for continuing to look into this! I applied your suggestion (
|
@TylerLeonhardt it should be |
Setting |
FYI, I will change it to be |
From version 1.80 onwards, we've been getting CI failures when testing our vscode extension with this error message: "Error while encrypting the text provided to safeStorage.encryptString. Encryption is not available."
I suspect this is related to the move off keytar described in the release notes of 1.80 and here microsoft/vscode-discussions#662
For the purposes of testing our extension, we pass additional launchArgs to VSCode, notably
--disable-keytar
. As I understand it, this instructs VSCode to use some sort of in memory keytar so that the secrets are not actually persisted to disk? This is the desired behaviour for us so that no secrets persist after the the test suite concludes. This has been working well until now, and based on a quick search for--disable-keytar
on GitHub, it seems like a popular approach when testing VSCode extensions.Notably this only seems to happen in our linux CI. Mac and Windows continue to work without a problem (as also demonstrated below)
Does this issue occur when all extensions are disabled?: Yes
Steps to Reproduce:
I've created a minimal repro here: https://github.com/kolofordjango/encryption-not-available-demo
The line that ends up resulting in the error: https://github.com/kolofordjango/encryption-not-available-demo/blob/efe774347bf9027e4f81c1ecf88bfaba617ecd78/src/test/suite/extension.test.ts#L21
GitHub Actions Build showing the error: https://github.com/kolofordjango/encryption-not-available-demo/actions/runs/5575232697/jobs/10184874439#step:5:82
PR demonstrating no errors happened on
1.79.2
: kolofordjango/encryption-not-available-demo#1The text was updated successfully, but these errors were encountered: