-
Notifications
You must be signed in to change notification settings - Fork 29k
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
Extensions SecretStorage issue: Input is not valid base64-encoded data. #147515
Comments
@jrieken can you help me triage this. Not sure who owns it. |
@Borvik was the above steps tested with snap build or Debian build ? |
Snap |
The problem is that encryptionService was not working with snaps before Migration:
|
Ok, that may explain the issue, and I can confirm this is not broken on Windows. Is there a way in the extension to detect installs via snap? |
I have a fix^^ out for this. It will be included in 1.67 which should be released early next month. If you want to workaround this, first catch the SecretStorage Error and do one of two things:
Personally, I recommend the first one, because the second one can be very tricky... and you probably generally wanna be robust if getting the secret fails (like if the user locks their keyring for some reason... keyrings are very tricky). |
Verification (on Linux):
When you launch VS Code, you should still be logged in to GitHub |
|
@TylerLeonhardt those steps didn't work for me, I was signed after installing that snap |
@connor4312 updated to a newer stable build liked above. Can you share whats in GitHub Authentication Output pane? |
doesn't seem to work for @connor4312. Will need to investigate further but don't think this needs to be a candidate. |
Maybe this revealed other issue - but I can confirm with 1.67.0, my extension appears to be working again. |
and now I am seeing (in 1.67.1) a new error "Cannot get password" |
Can confirm the issue from #147515 (comment) Github Authentication log fails with the error
|
Ok I have a fix for this. Unfortunately due to the nature of this fix, I was unable to migrate secrets from older versions forward... but at least going forward, we shouldn't see any issues where secrets can't be decrypted after an update. |
Verification is weird but here it is:
|
Ok, just got the update to 1.68 - this is still an issue. I'm not familiar with your merge process, but it looks like the PR that was linked here for excluding from the snap package was closed without merging. Is this still coming? It's almost been 2 months since my extension has been working properly for Snap users. |
@Borvik maybe my message:
wasn't clear. You will see this issue in the 1.68 update. However, going forward, you shouldn't see it. 1.69 should not have this problem. |
Thanks, so right now the password hasn't gotten migrated, and right now we are getting the If it's going to error, what should I tell the users of my extension? I would assume that the password would have to be re-entered and then it would get stored in the new way and start working. |
Ah that's a good point... I did not clear the password after the fact. I should do this. That password is essentially dead at this point so it should be cleaned up.
Yes that's correct. If you overwrite the password using the SecretStorage API you should be good to go. I think this is generally a good practice to handle when SecretStorage doesn't return an expected result because there are a lot of layers all the way down to the OS that need to work. |
Does this issue occur when all extensions are disabled?: No
So the issue I'm having is as an extension developer (ckolkman.vscode-postgres).
I've had users report an issue that I have tracked back down to vscode - I can confirm the issue on the above versions, but don't know the full extent on other os versions. (Borvik/vscode-postgres#196)
The error being received is: "Input is not valid base64-encoded data."
I've tracked this down to getting the secret from secret storage (https://code.visualstudio.com/api/references/vscode-api#SecretStorage).
I use the SecretStorage api to securely store credentials used by my extension. The api docs don't seem to indicate a change - but something appears to have changed (whether by design and the docs need to change, or by introducing a bug).
The issue does not appear to affect vscode 1.66.0 - reverting to that version allows it to work.
I do not know whether it affects whether it affects
storing
secrets - but can confirm ongetting
secrets.Steps to Reproduce (with referenced extension - so far):
The text was updated successfully, but these errors were encountered: