posit-dev / positron

Positron, a next-generation data science IDE
Other
2.38k stars 70 forks source link

Positrons pops up "code-oss-dev Safe Storage" dialog when launched from within VSCode #2274

Open wesm opened 7 months ago

wesm commented 7 months ago

This comes up frequently when launching Positron from within VSCode

image
juliasilge commented 7 months ago

This is the same as #1688

I think we have confirmed this only occurs for dev builds (does not impact users) and haven't been able to really consistently reproduce this.

@wesm do you have a pretty reliable set of actions that causes you to see this?

wesm commented 7 months ago

Yeah, if I close Positron, and then relaunch it from VSCode, I get it every time

wesm commented 7 months ago

https://github.com/posit-dev/positron/assets/329591/8e7bf87f-90c6-4e7c-b665-fa60270c1d56

wesm commented 6 months ago

This pop up is originating from this file:

https://github.com/microsoft/vscode/blob/main/src/vs/platform/encryption/electron-main/encryptionMainService.ts

the exact line that causes the pop-up to show up is

https://github.com/microsoft/vscode/blob/main/src/vs/platform/encryption/electron-main/encryptionMainService.ts#L64

    isEncryptionAvailable(): Promise<boolean> {
        return Promise.resolve(safeStorage.isEncryptionAvailable());
    }

See https://www.electronjs.org/docs/latest/api/safe-storage

On my computer, I have a bunch of Electron apps that seem to use this API:

image

If this quirk seems to only apply to running Positron in development mode, maybe we can just fix the "code-oss-dev" piece (somehow?) to say "Positron" instead and recommend that people authorize the keychain access?

See also https://github.com/microsoft/vscode-discussions/discussions/748