Skip to content
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

store password fails with the built-in password-manager #2571

Open
dinamycam opened this issue Feb 23, 2025 · 6 comments
Open

store password fails with the built-in password-manager #2571

dinamycam opened this issue Feb 23, 2025 · 6 comments
Labels

Comments

@dinamycam
Copy link

  • Min Version: 1.34.0
    Chromium: 132.0.6834.196
  • Operating system:
    Arch Linux

Expected Behavior

store passwords and show them in settings/saved-passwords

Actual Behavior

when i click the botton save, no error is shown. however if we check the logs:
Error occurred in handler for 'credentialStoreSetPassword': Error: Error while encrypting the text provided to safeStorage.encryptString. Encryption is not available. at writeSavedPasswordFile (/usr/lib/min/app/main.build.js:2966:50) at credentialStoreSetPassword (/usr/lib/min/app/main.build.js:2988:3) at /usr/lib/min/app/main.build.js:2996:10 at WebContents.<anonymous> (node:electron/js2c/browser_init:2:87415) at WebContents.emit (node:events:518:28)
no password gets saved in storage.

To Reproduce

1- use the built-in password manager in min's settings
2- go to any website, for example aur and enter your credentials.
3- click on save when prompt for password is shown.
4- quit the website and check saved passwords in settings.

@dinamycam dinamycam added the bug label Feb 23, 2025
@dinamycam
Copy link
Author

i belive #1541 is describing the same problem.

@PalmerAL
Copy link
Collaborator

From the Electron docs:

Linux: Encryption keys are generated and stored in a secret store that varies depending on your window manager and system setup. Options currently supported are kwallet, kwallet5, kwallet6 and gnome-libsecret, but more may be available in future versions of Electron. As such, the security semantics of content protected via the safeStorage API vary between window managers and secret stores.

I'm guessing you don't have any of those options installed, are you able to install one of those?

@dinamycam
Copy link
Author

dinamycam commented Feb 23, 2025

actually, i've just configured gnome-keyring(which gnome/libsecret is a part of) to work correctly with another electron based app. that's why i didn't suspect it to be an electron issue.
i'll investigate more and come back in the following days.
it's most likely a problem on my part and nothing to do with min.
thanks for the awesome browser built ,i've been using it as default for six months now.

@dinamycam
Copy link
Author

dinamycam commented Feb 24, 2025

is it possible to pass for example --password-store="basic" or "libsecret" to electron while launching min?

the current workaround i've come up with is:
export XDG_CURRENT_DESKTOP=GNOME; min

which means the gnome-keyring set-up is working fine. only that electron doesn't recognize sway, which is the real XDG_CURRENT_DESKTOP.

@PalmerAL
Copy link
Collaborator

PalmerAL commented Mar 1, 2025

is it possible to pass for example --password-store="basic" or "libsecret" to electron while launching min?

I think that should work already, is it not?

which means the gnome-keyring set-up is working fine. only that electron doesn't recognize sway, which is the real XDG_CURRENT_DESKTOP.

This seems like something that's worth filing an Electron bug for, it you're willing to do that.

@dinamycam
Copy link
Author

dinamycam commented Mar 3, 2025

is it possible to pass for example --password-store="basic" or "libsecret" to electron while launching min?

I think that should work already, is it not?

well, i don't know the syntax for it. there's a file in /usr/bin/min with the following content:

#!/usr/bin/bash

exec electron34 /usr/lib/min/app "$@"

so, following this, i did electron34 --password-store="basic" /usr/lib/min/app and electron34 /usr/lib/min/app --password-store="basic"
it didn't seem to be working correctly.
here's the log of when i try to view saved passwords:

Error occurred in handler for 'credentialStoreGetCredentials': Error: Error while decrypting the ciphertext provided to safeStorage.decryptString. Decryption is not available.
    at readSavedPasswordFile (/usr/lib/min/app/main.build.js:2956:35)
    at /usr/lib/min/app/main.build.js:3014:10
    at WebContents.<anonymous> (node:electron/js2c/browser_init:2:87415)
    at WebContents.emit (node:events:518:28)

which means the gnome-keyring set-up is working fine. only that electron doesn't recognize sway, which is the real XDG_CURRENT_DESKTOP.

This seems like something that's worth filing an Electron bug for, it you're willing to do that.

yes, electron seems to be a pain in wayland.i have another electron-based app that has problem with screenshots. i have to create an issue for that, anyway. makes it two.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants