You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: Safestorage detection fails on linux outside of predefined desktop environments #39789
Instead of reading this variable for this, electron should look for the presence of libsecret or kwalletin order to properly detect this. This has been reported on the VSCode github repo a bunch, tho this affects electron as a whole, including a project I contribute to.
Reacted by Sebastian Brandt, Yannick Drolet, catthou, yennor, Murat, Pascal Ernster, teutat3s, simplepad, Fabian, Renee Undrits and 14 more
@OmegaRogue Can you try using the getSelectedStorageBackend() API added in that PR, and seeing if it correctly detects libsecret and/or kwallet for you? If it doesn't or if we seem to be missing a preset value to detect, that may be a bug. But using those predefined values is expected behavior right now.
getSelectedStorageBackend() returns basic_text for me, as my XDG_CURRENT_DESKTOP is set to xinitrc, as i use a custom built desktop environment around the awesomewm window manager
This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. If you have any new additional information—in particular, if this is still reproducible in the latest version of Electron or in the beta—please include it with your comment!
On NixOS 23.11, the bug presents itself between v29.3.0 (working) and v29.4.0 (broken) and is still present in v30.0.6 (latest available on nix as of the moment).
However, since updating to NixOS 24.05, the bug is no longer present in v30.0.6. Perhaps there was some other incompatibility present on 23.11.
it's moderately annoying to bump this for no reason :)
a hopefully-actually-useful addition: another workaround, which shouldn't negatively affect anything else (unlike setting $XDG_CURRENT_DESKTOP, potentially), is to set GNOME_DESKTOP_SESSION_ID=this-is-deprecated. this works because GetDesktopEnvironment includes the following:
if (env->HasVar("GNOME_DESKTOP_SESSION_ID")) {
return DESKTOP_ENVIRONMENT_GNOME;
}
which will cause SelectBackend to pick the libsecret backend.
If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open.
The issue is affecting me. I can not give real Information about Electron. I am using Element (Matrix App) Version 1.12.1, Ubuntu 22.04, Flathub Version.
I tried to read about the problem and was finally sent here, as obviously Element uses Electron. Version seems to be 33.0.0?
@dasoe last I checked this is due to the community maintained flatpak package, not Electron or Element. They do not allow org.freedesktop.secrets which I recommended they do on a couple of occasions. See flathub/im.riot.Riot#462 (comment) for an example of how to workaround it.
Activity
VerteDinde commentedon Sep 11, 2023
I think this was intentionally implemented here: https://github.com/electron/electron/pull/38873/files/ . This should be available in Electron beginning in 25.5.0 (ref: https://releases.electronjs.org/release/v25.5.0), so I think it should be present in 25.6.0.
@OmegaRogue Can you try using the
getSelectedStorageBackend()API added in that PR, and seeing if it correctly detectslibsecretand/orkwalletfor you? If it doesn't or if we seem to be missing a preset value to detect, that may be a bug. But using those predefined values is expected behavior right now.OmegaRogue commentedon Sep 11, 2023
getSelectedStorageBackend()returnsbasic_textfor me, as myXDG_CURRENT_DESKTOPis set toxinitrc, as i use a custom built desktop environment around the awesomewm window managerOmegaRogue commentedon Sep 11, 2023
Upgrading to electron
26.2.0doesn't impact the result at allelectron-issue-triage commentedon Dec 11, 2023
This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. If you have any new additional information—in particular, if this is still reproducible in the latest version of Electron or in the beta—please include it with your comment!
OmegaRogue commentedon Dec 13, 2023
Bump
3 remaining items
cjshearer commentedon Jun 1, 2024
On NixOS 23.11, the bug presents itself between v29.3.0 (working) and v29.4.0 (broken) and is still present in v30.0.6 (latest available on nix as of the moment).
However, since updating to NixOS 24.05, the bug is no longer present in v30.0.6. Perhaps there was some other incompatibility present on 23.11.
ytmdesktop: upgrade electron
t3chguy commentedon Apr 16, 2025
I am seeing the same behaviour in a Debian 11 VM with LXDE even though
gnome-keyringis available & configuredreadefries commentedon Aug 19, 2025
Still broken on Debian 13 and Gnome 48 with properly configured keyring
103sbavert commentedon Sep 17, 2025
bump
dasoe commentedon Oct 22, 2025
bump
keysmashes commentedon Oct 22, 2025
it's moderately annoying to bump this for no reason :)
a hopefully-actually-useful addition: another workaround, which shouldn't negatively affect anything else (unlike setting
$XDG_CURRENT_DESKTOP, potentially), is to setGNOME_DESKTOP_SESSION_ID=this-is-deprecated. this works becauseGetDesktopEnvironmentincludes the following:which will cause
SelectBackendto pick the libsecret backend.dasoe commentedon Oct 22, 2025
Well, sorry. I understood, this was requested?
The issue is affecting me. I can not give real Information about Electron. I am using Element (Matrix App) Version 1.12.1, Ubuntu 22.04, Flathub Version.
I tried to read about the problem and was finally sent here, as obviously Element uses Electron. Version seems to be 33.0.0?
t3chguy commentedon Oct 27, 2025
@dasoe last I checked this is due to the community maintained flatpak package, not Electron or Element. They do not allow
org.freedesktop.secretswhich I recommended they do on a couple of occasions. See flathub/im.riot.Riot#462 (comment) for an example of how to workaround it.razzeee commentedon Oct 27, 2025
Technically that would allow electron / element to access all your secrets. Which is something that people are not keen to.
flathub/im.riot.Riot#530 (comment)