vscode-postgres icon indicating copy to clipboard operation
vscode-postgres copied to clipboard

Input is not valid base64-encoded data.

Open AhmedKamal20 opened this issue 2 years ago • 13 comments

Every time now when I try to Select Postgres Server I get this error I installed the extension lately and added 3 connections, and it worked fine for a while But now when I try to init new query or open the Postgres Explorer I get this error (the logs form the console):

notificationsAlerts.ts:42 Input is not valid base64-encoded data.
onDidChangeNotification @ notificationsAlerts.ts:42
(anonymous) @ notificationsAlerts.ts:28
invoke @ event.ts:569
fire @ event.ts:736
addNotification @ notifications.ts:206
error @ notificationService.ts:92
executeCommand @ statusbarItem.ts:194
processTicksAndRejections @ node:internal/process/task_queues:96
await in processTicksAndRejections (async)
(anonymous) @ statusbarItem.ts:127

Any Idea Why?

AhmedKamal20 avatar Apr 13 '22 20:04 AhmedKamal20

It has something to do with the newest version of VSCode. Reverting seems to work for now.

Borvik avatar Apr 14 '22 02:04 Borvik

I'm getting the same error as well. My vscode version is 1.64.2. Is there any workaround to get this resolved?

Nipuns1999 avatar Apr 20 '22 06:04 Nipuns1999

Did you maybe mean 1.66.2? I haven't seen this issue with older versions of vscode.

Are you by chance using vscode on linux installed via snap?

Apparently they changed secret storage in 1.66.1 and that is when this broke. Rolling back vscode to 1.66.0 has worked to keep this extension running

Borvik avatar Apr 20 '22 10:04 Borvik

@Borvik As I Understand from the VS Code issue, if we can reset the secret storage and add the connections again, it will work fine Do you know how to reset the secret storage for this extension only?
because I tried to add a new connection and it doesn't work, I guess i need to clean the storage first

AhmedKamal20 avatar Apr 20 '22 10:04 AhmedKamal20

It kinda does sound like that, but no I don't have a concrete way to reset it.

Perhaps, if you go down to 1.66.0, then remove the connections - then upgrade back to 1.66.2, and add the connections - maybe it would work.

The connections themselves aren't stored in secret - just the passwords - and the secret storage is only accessed per connection, so in theory - maybe that will work.

Borvik avatar Apr 20 '22 11:04 Borvik

Okay, what worked for me was rolling back to 1.65.2 and deleting all the connections and adding them back. I think if you delete the connections and them back in the 1.66.2 vscode version should work as well.

Nipuns1999 avatar Apr 22 '22 08:04 Nipuns1999

this does appear to be working again in vscode 1.67.0

Borvik avatar May 06 '22 12:05 Borvik

this does appear to be working again in vscode 1.67.0

@Borvik

Confirmed, It's working from the command palette ( or the bottom bar ), and the query does run. But when I click the side bar icon it tells me (Cannot get password), and doesn't show the tables like it used to is it related ?

AhmedKamal20 avatar May 07 '22 21:05 AhmedKamal20

Possibly - though sidebar was working on my snap installed instance at work.

I noticed they did reopen that issue - as the person meant to verify it still had the issue according to their test case - so perhaps it doesn't fix it for everyone?

They mentioned:

Will need to investigate further but don't think this needs to be a candidate.

Maybe that means we wouldn't have to wait till 1.68, but maybe 1.67.1?

Borvik avatar May 08 '22 11:05 Borvik

Yeah, probably. Thank you very much for all your replies and help.

AhmedKamal20 avatar May 08 '22 11:05 AhmedKamal20

and... back to not working for me either (1.67.1)

Borvik avatar May 11 '22 20:05 Borvik

Yeah, it's gives me "Cannot get password"

AhmedKamal20 avatar May 11 '22 21:05 AhmedKamal20

wow - looks like its taken a while, but MS looks like they finally have something for snap users.

looks like after a lot of trial and error with regard to their new secret encryption (which was kinda double-encrypted thanks to the keyrings) - it looks like they are gutting it only for snap users.

hopefully there will be an update soon that makes this work again.

Borvik avatar Jun 03 '22 18:06 Borvik