Skip to content

Error while encrypting the text provided to safeStorage.encryptString. Encryption is not available. #188059

@wilhelmklopp

Description

@wilhelmklopp

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#1

Metadata

Metadata

Labels

authenticationIssues with the Authentication platformbugIssue identified by VS Code Team member as probable buginsiders-releasedPatch has been released in VS Code InsidersverifiedVerification succeeded

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions