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

Error when trying to save the password #393

Closed
Hyask opened this issue Nov 28, 2023 · 30 comments · Fixed by #493
Closed

Error when trying to save the password #393

Hyask opened this issue Nov 28, 2023 · 30 comments · Fixed by #493
Assignees
Labels
bug Something isn't working

Comments

@Hyask
Copy link

Hyask commented Nov 28, 2023

Expected Behavior

Password should be saved successfully

Current Behavior

In the Manage Servers form, saving a server with the Save password checkbox checked raises the following error: An error occurred when trying to save the password.
I don't have any line appearing in the web dev console output, so I don't have any more details to share.
image

Steps to Reproduce

  1. Add a server
  2. Check the Save password checkbox
  3. Click Save
  4. The error appears as on the screenshot above

Possible Solution (Not obligatory)

Confusingly enough, Feishin seems to be able to stay authenticated when closed, and only asks for the password after one or two days. So it is actually able to remember some secrets.

Context

Listening to music on Linux? :D

Your Environment

  • Application version (e.g. v0.1.0) : 0.5.2 (latest as of now), both AppImage and .tar.xz version
  • Operating System and version (e.g. Windows 10) : Ubuntu 23.10
  • Server and version (e.g. Navidrome v0.48.0) : 0.49.3
  • Node version (if developing locally) : N/A
@Hyask Hyask added the bug Something isn't working label Nov 28, 2023
@nadir-ishiguro
Copy link

I had this issue since I first started using Feishin several months ago at version 0.3.0, so it's at least not new.

I tried both the AppImage and the AUR package feishin-bin.

Great app otherwise. Thank you very much for your work!

@swishkin
Copy link

swishkin commented Dec 2, 2023

I have this issue too. Using Artix Linux, Feishin 0.5.2, connected to a Navidrome server.

If it could be an issue with password sanitization/storage/hashing, password looks something like this:

rShie7Xh^Yjubd%yeo9LtS@jb5iNh52PXH$

@cronyakatsuki
Copy link

cronyakatsuki commented Jan 4, 2024

Happen's also for me using gentoo linux and the appimage.

But I also use keepassxc for secrets storage so if Feishin uses secret's to store password it might need to work on keepassxc support.

@fybx
Copy link

fybx commented Jan 21, 2024

Arch Linux, Feishin 0.5.3, with Navidrome 0.50.1 server; I have gnome-keyring installed and configured for secrets.

@Insprill
Copy link

I'm also having this issue with the same setup as fybx. All other applications that store secrets work fine; only Feishin has this issue.

@kgarner7
Copy link
Collaborator

Based off of a similar thread from tutao/tutanota#6265, some questions:

@kgarner7 kgarner7 self-assigned this Jan 28, 2024
@nadir-ishiguro
Copy link

nadir-ishiguro commented Jan 29, 2024

Based off of a similar thread from tutao/tutanota#6265, some questions:

In my case, libsecret is installed. Passwords are stored in the Gnome keyring and other Electron apps work without issue, but I'm not sure how to manually set the password store for Feishin.

@kgarner7
Copy link
Collaborator

You can pass in a cli argument --password-store="gnome-libsecret" to Electron/Feishin

@nadir-ishiguro
Copy link

It's difficult for me to see if it worked as - as mentioned in the issue - Feishin only seems to forget the password after a few days.

@kgarner7
Copy link
Collaborator

kgarner7 commented Feb 2, 2024

Obviously be careful when running running any code that a stranger gives you, but the following code will invalidate your credentials (exit and reopen feishin after). You can do this in the console from inspect element (control + shift + i). I will try an Ubuntu VM (I don't see this issue on my Arch system) and see if I can reproduce it as well. Sorry for asking your support on this matter

const auth = JSON.parse(localStorage.store_authentication);
if (auth.state.currentServer.type === 'navidrome') {
  auth.state.currentServer.ndCredential = '1234'
}
for (const [id, server] of Object.entries(auth.state.serverList)) {
  if (server.type === 'navidrome') {
    server.ndCredential = '1234'
    auth.state.serverList[id] = server
  }
};

localStorage.store_authentication = JSON.stringify(auth);

@kgarner7
Copy link
Collaborator

kgarner7 commented Feb 3, 2024

Also worth noting, to just test password setting, all you need to do is try and save the password in the first place...

@kgarner7
Copy link
Collaborator

kgarner7 commented Feb 3, 2024

One last thing, can you output echo $XDG_CURRENT_DESKTOP for me?

@cronyakatsuki
Copy link

One last thing, can you output echo $XDG_CURRENT_DESKTOP for me?

for me it's nothing, I just use xmonad.

@kgarner7
Copy link
Collaborator

kgarner7 commented Feb 4, 2024

Well, that would explain why. Electron is probably just unable to detect the correct session (check out https://chromium.googlesource.com/chromium/src/+/main/base/nix/xdg_util.cc for the resolution). If neither that, DESKTOP_SESSION, or GNOME_DESKTOP_SESSION_ID is set then Electron cannot detect the correct session to use

@kgarner7
Copy link
Collaborator

kgarner7 commented Feb 4, 2024

For everyone having this issue, could you please try the associated PR and see if it resolves your issue?

@Hyask
Copy link
Author

Hyask commented Feb 6, 2024

Is there an AppImage or tar.gz available somewhere? I only found the Vercel app, which doesn't match my environment.

@kgarner7
Copy link
Collaborator

kgarner7 commented Feb 6, 2024

No, you would need to build that yourself. The pipeline only updates the web interface

@Hyask
Copy link
Author

Hyask commented Feb 7, 2024

Oh... I would have expected the CI would have done it somehow.
Unfortunately, I have absolutely no clue how to build them, and the README doesn't make me think this will be straightforward. I don't know anything about tech revolving around web and Electron, nor do I have the time and bandwidth to dig into that, so unless there is another way, I won't be able to test this.

@kgarner7
Copy link
Collaborator

kgarner7 commented Feb 7, 2024

I've gone ahead and build them myself and uploaded https://drive.google.com/drive/folders/1QY40cLsa5tUmZoISMkP1eXStub6EFdDZ . If that doesn't work though you're out of luck

@Insprill
Copy link

Insprill commented Feb 9, 2024

My $XDG_CURRENT_DESKTOP is also empty since I'm just running i3. I tested out your build, and it indeed saves the password correctly.

@kgarner7
Copy link
Collaborator

kgarner7 commented Feb 9, 2024

My $XDG_CURRENT_DESKTOP is also empty since I'm just running i3. I tested out your build, and it indeed saves the password correctly.

Thanks for testing! Just to confirm, does retrieving the password also work (I would expect so, but just to confirm; Settings hamburger > Manage Servers > Navidrome server > Edit, password should be filled in)

@Insprill
Copy link

Insprill commented Feb 9, 2024

Yes, the password is entered there correctly.

@Hyask
Copy link
Author

Hyask commented Feb 9, 2024

Just tested your AppImage and tar.gz, they both were able to retrieve the password correctly, displaying it in the server's details. Many thanks for the patch and for the build :-)

As that seemed important: $XDG_CURRENT_DESKTOP is not empty, but explicitly set to sway by gdm through ~/.config/environment.d on my setup.

@kgarner7
Copy link
Collaborator

kgarner7 commented Feb 9, 2024

Thanks both of you! I'll do some text cleanup (libsecret isn't just a Gnome thing actually, supported by a lot of other providers I learned) and update the README (noting that you either need a libsecret provider, or kwallet4/5/6) and will merge this in soon

@FakeMichau
Copy link

I'm on hyprland with keepassxc and the issue persists. I can see that feishin doesn't use libsecret unless I pass XDG_CURRENT_DESKTOP=GNOME at which point the issue goes away.

@SushiByte-beep
Copy link

On hyperland this issue persists, passing XDG_CURRENT_DESKTOP=GNOME did not work for me.

@FakeMichau
Copy link

On hyperland this issue persists, passing XDG_CURRENT_DESKTOP=GNOME did not work for me.

You still need something that implements Secret Service, for example I use keepassxc with Secret Service integration enabled.

@error161
Copy link

error161 commented May 19, 2024

This seems to persist for me on Kubuntu 22.04 using latest release 0.7.1
$XDG_CURRENT_DESKTOP returns KDE

If I pass --password-store="kwallet5" via CLI to the AppImage it works, otherwise it has the error.

Edit: just had to change the setting as described by kgarner7

@kgarner7
Copy link
Collaborator

The default password store is libsecret. If that doesn't work for you, you can manually set it in Settings > Window > password/secret store

@error161
Copy link

Ah, that's my bad for not realizing the setting was available under the Window area to change the default store.

Thank you- that was all it needed!

Sorry to waste your time with this when it was right in front of me the whole time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

10 participants