vscode
vscode copied to clipboard
An OS keyring couldn't be identified for storing the encryption related data in your current desktop environment
Does this issue occur when all extensions are disabled?: Yes
I referred to https://code.visualstudio.com/docs/editor/settings-sync#_troubleshooting-keychain-issues
This is the error part of my log after running code-insiders --verbose --vmodule="*/components/os_crypt/*=1"
:
[314774:0707/210405.156953:INFO:CONSOLE(627)] "%cTRACE color: #888 [mainThreadSecretState] Setting password for vscode.github-authentication extension: github.auth", source: vscode-file://vscode-app/opt/visual-studio-code-insiders/resources/app/out/vs/workbench/workbench.desktop.main.js (627)
[314774:0707/210405.157113:INFO:CONSOLE(627)] "%cTRACE color: #888 [NativeSecretStorageService] Notifying user that secrets are not being stored on disk.", source: vscode-file://vscode-app/opt/visual-studio-code-insiders/resources/app/out/vs/workbench/workbench.desktop.main.js (627)
[314774:0707/210405.158116:INFO:CONSOLE(627)] "%cTRACE color: #888 DialogService#prompt An OS keyring couldn't be identified for storing the encryption related data in your current desktop environment.", source: vscode-file://vscode-app/opt/visual-studio-code-insiders/resources/app/out/vs/workbench/workbench.desktop.main.js (627)
[314774:0707/210409.420345:INFO:CONSOLE(627)] "%cTRACE color: #888 [secrets] encrypting secret for key: {"extensionId":"vscode.github-authentication","key":"github.auth"}", source: vscode-file://vscode-app/opt/visual-studio-code-insiders/resources/app/out/vs/workbench/workbench.desktop.main.js (627)
[main 2023-07-08T02:04:09.420Z] [EncryptionMainService] Encrypting value.
[main 2023-07-08T02:04:09.422Z] Error: Error while encrypting the text provided to safeStorage.encryptString. Encryption is not available.
at e.$U2b.encrypt (/opt/visual-studio-code-insiders/resources/app/out/vs/code/electron-main/main.js:42:11004)
at Object.call (/opt/visual-studio-code-insiders/resources/app/out/vs/code/electron-main/main.js:25:4844)
at R.s (/opt/visual-studio-code-insiders/resources/app/out/vs/code/electron-main/main.js:23:5128)
at R.q (/opt/visual-studio-code-insiders/resources/app/out/vs/code/electron-main/main.js:23:4644)
at o.value (/opt/visual-studio-code-insiders/resources/app/out/vs/code/electron-main/main.js:23:4051)
at y.w (/opt/visual-studio-code-insiders/resources/app/out/vs/code/electron-main/main.js:18:1906)
at y.x (/opt/visual-studio-code-insiders/resources/app/out/vs/code/electron-main/main.js:18:1976)
at y.fire (/opt/visual-studio-code-insiders/resources/app/out/vs/code/electron-main/main.js:18:2192)
at o.value (/opt/visual-studio-code-insiders/resources/app/out/vs/code/electron-main/main.js:16:38681)
at y.w (/opt/visual-studio-code-insiders/resources/app/out/vs/code/electron-main/main.js:18:1906)
at y.fire (/opt/visual-studio-code-insiders/resources/app/out/vs/code/electron-main/main.js:18:2123)
at o.value (/opt/visual-studio-code-insiders/resources/app/out/vs/code/electron-main/main.js:16:38875)
at y.w (/opt/visual-studio-code-insiders/resources/app/out/vs/code/electron-main/main.js:18:1906)
at y.fire (/opt/visual-studio-code-insiders/resources/app/out/vs/code/electron-main/main.js:18:2123)
at se (/opt/visual-studio-code-insiders/resources/app/out/vs/code/electron-main/main.js:16:41018)
at IpcMainImpl.f (/opt/visual-studio-code-insiders/resources/app/out/vs/code/electron-main/main.js:19:96358)
at IpcMainImpl.emit (node:events:513:28)
at EventEmitter.<anonymous> (node:electron/js2c/browser_init:2:80979)
at EventEmitter.emit (node:events:513:28)
[314774:0707/210409.425211:INFO:CONSOLE(627)] "%c ERR color: #f33 Error: Error while encrypting the text provided to safeStorage.encryptString. Encryption is not available.", source: vscode-file://vscode-app/opt/visual-studio-code-insiders/resources/app/out/vs/workbench/workbench.desktop.main.js (627)
[314774:0707/210409.425442:INFO:CONSOLE(627)] "%cTRACE color: #888 Settings Sync: Getting accounts for github", source: vscode-file://vscode-app/opt/visual-studio-code-insiders/resources/app/out/vs/workbench/workbench.desktop.main.js (627)
[314774:0707/210409.425641:INFO:CONSOLE(627)] "%c INFO color: #33f Settings Sync: Updated current session 8103a56381b60bac", source: vscode-file://vscode-app/opt/visual-studio-code-insiders/resources/app/out/vs/workbench/workbench.desktop.main.js (627)
[314774:0707/210409.425835:INFO:CONSOLE(627)] "%cTRACE color: #888 Settings Sync: Getting accounts for github", source: vscode-file://vscode-app/opt/visual-studio-code-insiders/resources/app/out/vs/workbench/workbench.desktop.main.js (627)
[314774:0707/210409.426026:INFO:CONSOLE(627)] "%cTRACE color: #888 Settings Sync: Updated accounts for github", source: vscode-file://vscode-app/opt/visual-studio-code-insiders/resources/app/out/vs/workbench/workbench.desktop.main.js (627)
[314774:0707/210409.426214:INFO:CONSOLE(627)] "%cTRACE color: #888 Settings Sync: Getting accounts for microsoft", source: vscode-file://vscode-app/opt/visual-studio-code-insiders/resources/app/out/vs/workbench/workbench.desktop.main.js (627)
[314774:0707/210409.426428:INFO:CONSOLE(627)] "%cTRACE color: #888 Settings Sync: Updated accounts for github", source: vscode-file://vscode-app/opt/visual-studio-code-insiders/resources/app/out/vs/workbench/workbench.desktop.main.js (627)
[314774:0707/210409.426630:INFO:CONSOLE(627)] "%cTRACE color: #888 Settings Sync: Getting accounts for microsoft", source: vscode-file://vscode-app/opt/visual-studio-code-insiders/resources/app/out/vs/workbench/workbench.desktop.main.js (627)
[314774:0707/210409.426816:INFO:CONSOLE(627)] "%cTRACE color: #888 Settings Sync: Updated accounts for microsoft", source: vscode-file://vscode-app/opt/visual-studio-code-insiders/resources/app/out/vs/workbench/workbench.desktop.main.js (627)
[314774:0707/210409.426981:INFO:CONSOLE(627)] "%cTRACE color: #888 Settings Sync: Updating the token for the account Android789515", source: vscode-file://vscode-app/opt/visual-studio-code-insiders/resources/app/out/vs/workbench/workbench.desktop.main.js (627)
[314774:0707/210409.427124:INFO:CONSOLE(627)] "%cTRACE color: #888 Settings Sync: Token updated for the account Android789515", source: vscode-file://vscode-app/opt/visual-studio-code-insiders/resources/app/out/vs/workbench/workbench.desktop.main.js (627)
[314774:0707/210409.427693:INFO:CONSOLE(627)] "%cTRACE color: #888 Settings Sync: Updated accounts for microsoft", source: vscode-file://vscode-app/opt/visual-studio-code-insiders/resources/app/out/vs/workbench/workbench.desktop.main.js (627)
[314774:0707/210409.427861:INFO:CONSOLE(627)] "%cTRACE color: #888 Settings Sync: Updating the token for the account Android789515", source: vscode-file://vscode-app/opt/visual-studio-code-insiders/resources/app/out/vs/workbench/workbench.desktop.main.js (627)
[314774:0707/210409.428010:INFO:CONSOLE(627)] "%cTRACE color: #888 Settings Sync: Token updated for the account Android789515", source: vscode-file://vscode-app/opt/visual-studio-code-insiders/resources/app/out/vs/workbench/workbench.desktop.main.js (627)
Version: 1.81.0-insider Commit: ad791ef3d26b99963da31636af697afd86575435 Date: 2023-07-07T19:47:36.821Z Electron: 22.3.14 ElectronBuildId: 21893604 Chromium: 108.0.5359.215 Node.js: 16.17.1 V8: 10.8.168.25-electron.0 OS: Linux x64 6.4.1-arch2-1
I have gnome-keyring installed and it's not using it for some reason. Must be the update to 1.80.
Manually configuring the keyring to use results in this:
code-insiders --password-store="gnome"
Warning: 'password-store' is not in the list of known options, but still passed to Electron/Chromium.
It seems to work.
I figured this is a bug since I had gnome-keyring installed, it wasn't being used, and I had to manually configure it.
I tried to setup the runtime args according to the support article I listed:
Can you please include the very top of the logs? The part that contains the stuff call out here:
https://code.visualstudio.com/docs/editor/settings-sync#_linux
Or even the whole log works.
Additionally, what desktop environment & window manager are you using?
For me this is happening on i3 on arch, also using gnome keyring.
[64727:0708/211450.886024:VERBOSE1:key_storage_util_linux.cc(54)] Password storage detected desktop environment: (unknown)
[64727:0708/211450.886034:VERBOSE1:key_storage_linux.cc(122)] Selected backend for OSCrypt: BASIC_TEXT
[64727:0708/211450.886044:VERBOSE1:key_storage_linux.cc(142)] OSCrypt did not initialize a backend.
Adding the "password-store": "gnome"
argument worked fine.
Additionally, what desktop environment & window manager are you using?
Uh.. sorry I'll try to find the log file if they are kept. Also I'm using a similar setup as GerritPlehn, i3 on Arch.
Here is the main.log if that's the one you need.
Related: https://github.com/microsoft/vscode/issues/186792
Chromium failing to detect i3 seems to be the common thread
Getting the same error as well on bspwm.
Same issue on Sway and my gnome-keyring-daemon is correctly set-up.
Launching code with code --password-store="gnome"
as suggested here works.
Same issue here, using Ubuntu 23.04 with i3wm.
Same for me. i3wm on Manjaro 23.0.0
Same for me, using EndeavourOS 6.4.1-arch2-1 and qtile.
Same issue with an i5, and "password-store": "gnome"
fixes it.
Version: 1.80.0 Commit: 660393deaaa6d1996740ff4880f1bad43768c814 Date: 2023-07-04T13:39:48.236Z Electron: 22.3.14 ElectronBuildId: 21893604 Chromium: 108.0.5359.215 Node.js: 16.17.1 V8: 10.8.168.25-electron.0 OS: Linux x64 5.15.108-18910-gab0e1cb584e1
Also getting this, even though it seems to be working: Property password-store is not allowed.
in argv.json
Something like this will help in a lot (if not all) of these cases and is something that we'll need in Electron. https://github.com/microsoft/vscode/issues/185212
That said, i3 might be big enough to be a detected environment which is why I haven't duped this to that issue.
I'm seeing this issue as well on Arch running XMonad.
I am also seeing this on Arch with XMonad using gnome-keyring
.
This did not fix it:
❯ code --password-store "gnome" .
Warning: 'password-store' is not in the list of known options, but still passed to Electron/Chromium.
This did:
❯ cat ~/.vscode/argv.json
{
"enable-crash-reporter": true,
"crash-reporter-id": "<snip>",
"password-store": "gnome"
}
System info:
❯ pfetch
/\ jess@grace
/ \ os Arch Linux
/\ \ host x86_64
/ \ kernel 6.4.2-arch1-1
/ ,, \ uptime 5h 8m
/ | | -\ pkgs 537
/_-'' ''-_\ memory 4205M / 64118M
❯ yay -Q --info gnome-keyring
Name : gnome-keyring
Version : 1:42.1-3
Description : Stores passwords and encryption keys
Architecture : x86_64
URL : https://wiki.gnome.org/Projects/GnomeKeyring
Licenses : GPL LGPL
Groups : gnome
Provides : org.freedesktop.secrets
Depends On : gcr gcr-4 pam openssh
Optional Deps : None
Required By : seahorse
Optional For : git github-cli google-chrome libsecret microsoft-edge-stable-bin slack-desktop visual-studio-code-bin
Conflicts With : None
Replaces : None
Installed Size : 3.55 MiB
Packager : Balló György <[email protected]>
Build Date : Wed 07 Jun 2023 03:41:13 AM PDT
Install Date : Thu 08 Jun 2023 09:51:51 AM PDT
Install Reason : Explicitly installed
Install Script : Yes
Validated By : Signature
For reference, if helpful, in such systems it's common to start xmonad in this manner (this is my .xinitrc
):
❯ cat .xinitrc
#!/bin/sh
userresources=$HOME/.Xresources
usermodmap=$HOME/.Xmodmap
sysresources=/etc/X11/xinit/.Xresources
sysmodmap=/etc/X11/xinit/.Xmodmap
# merge in defaults and keymaps
if [ -f $sysresources ]; then
xrdb -merge $sysresources
fi
if [ -f $sysmodmap ]; then
xmodmap $sysmodmap
fi
if [ -f "$userresources" ]; then
xrdb -merge "$userresources"
fi
if [ -f "$usermodmap" ]; then
xmodmap "$usermodmap"
fi
if [ -d /etc/X11/xinit/xinitrc.d ] ; then
for f in /etc/X11/xinit/xinitrc.d/?*.sh ; do
[ -x "$f" ] && . "$f"
done
unset f
fi
# Start window manager, which manages the rest of the startup sequence.
# Compiled by `cabal install` in `~/.xmonad`.
exec /home/jess/.cabal/bin/xmonad
Finally, gnome-keyring
is initialized on login via PAM:
❯ cat /etc/pam.d/login
#%PAM-1.0
auth required pam_securetty.so
auth requisite pam_nologin.so
auth include system-local-login
auth optional pam_gnome_keyring.so <- here
account include system-local-login
session include system-local-login
session optional pam_gnome_keyring.so auto_start <- here
Same happening on Arch with awesomewm. Adding "password-store": "gnome"
to ~/.vscode/argv.json
fixed the issue.
Same happening on Ubuntu 22.04 with i3wm. Adding "password-store": "gnome"
to ~/.vscode/argv.json
fixed the issue.
Same on Lubuntu 23.04 (LXQt) and adding "password-store": "gnome"
to ~/.vscode/argv.json
also resolves.
From #187436.
I'm using archlinux
with hyprland
as desktop environment.
To manage my keyring I have installed kwallet
.
The pop-up disappear when I set password-store
to kwallet5
.
Additionally I've configured dbus to start the service automatically by creating the file /usr/share/dbus-1/services/org.freedesktop.secrets.service
with the content:
[D-BUS Service]
Name=org.freedesktop.secrets
Exec=/usr/bin/kwalletd5
I don't know if it's possible for vscode to use the service configured in org.freedesktop.secrets
as keyring manager :thinking:
Got the same error in Xfce4, using gnome-keyring
Adding "password-store": "gnome"
to ~/.vscode/argv.json
solved it.
I am using:
❯ neofetch --stdout
zaid@archlinux
--------------
OS: Arch Linux x86_64
Host: 20DSS02V00 ThinkPad L450
Kernel: 6.1.38-1-lts
Uptime: 7 mins
Packages: 534 (pacman)
Shell: bash 5.1.16
Resolution: 1366x768
DE: Xfce 4.18
WM: Xfwm4
WM Theme: Default
Theme: Adwaita-dark [GTK2/3]
Icons: elementary [GTK2], Adwaita [GTK3]
Terminal: alacritty
CPU: Intel i3-5005U (4) @ 2.000GHz
GPU: Intel HD Graphics 5500
Memory: 1813MiB / 7832MiB
❯ gnome-keyring version
gnome-keyring: 42.1
It seems that last VsCode update broke everything for everyone not using a "standard" Linux distribution.
Same issue with Manjaro/i3 here, and the flag fixed it for me but is not satisfying
Fedora/i3wm, same issue.
Same issue on Debian 11 (ChromeOS)/aarch64 with version 1.80
argv.json password-store: gnome workaround successful.
Ubuntu/xmonad, experiencing the same issue. password-store
workaround works, but I'd like a more fundamental fix.
Same happening on Arch with awesomewm. Adding
"password-store": "gnome"
to~/.vscode/argv.json
fixed the issue.
Same issue in Arch Linux with i3wm. Adding password-store
also fixed it.
Not sure if there is a use piling on at this point but same issue ArchLinux with qtile.
vscode-server still not working with 1.80.1 on Fedora.
Also happens on Chromebook. The password-store
workaround did the trick.
Adding "password-store": "gnome"
to my argv.json
solved this issue on arch linux (kernel 6.4.3-arch1-2.1) with hyprland. Thank you very much for pointing this out!