dweymouth / supersonic

A lightweight and full-featured cross-platform desktop client for self-hosted music servers
GNU General Public License v3.0
682 stars 27 forks source link

Cannot login on KDE system #163

Closed peterNordin closed 1 year ago

peterNordin commented 1 year ago

This is the first time i try Supersonic so I do not know if it worked before. I am running into the following issues

I tried to connect to my local airsonic-advanced and gonic servers. I believe the connection is OK, because I can see in the airsonic-logs that I get a login error if I enter the wrong password. But no log text is shown when I enter the right one.

Screenshot_20230513_133516_scaled

Terminal log output:

flatpak run io.github.dweymouth.supersonic
Using config dir: /home/peter/.var/app/io.github.dweymouth.supersonic/config/supersonic
2023/05/13 13:38:50 Using cache dir: /home/peter/.var/app/io.github.dweymouth.supersonic/cache/supersonic
2023/05/13 13:38:50 systray error: failed to request name: org.freedesktop.DBus.Error.ServiceUnknown
2023/05/13 13:38:50 systray error: failed to register our icon with the notifier watcher (maybe no tray is running?): org.freedesktop.DBus.Error.ServiceUnknown
2023/05/13 13:38:50 Fyne error:  could not load SVG, falling back to static content:
2023/05/13 13:38:50   Cause: XML syntax error on line 3: invalid character entity & (no semicolon)
2023/05/13 13:38:50   At: /run/build/supersonic/vendor/fyne.io/fyne/v2/internal/svg/svg.go:27
... lots of these errors ...
2023/05/13 13:38:50 Fyne error:  could not load SVG, falling back to static content:
2023/05/13 13:38:50   Cause: XML syntax error on line 3: invalid character entity & (no semicolon)
2023/05/13 13:38:50   At: /run/build/supersonic/vendor/fyne.io/fyne/v2/internal/svg/svg.go:27
2023/05/13 13:38:50 error getting password from keyring: The name org.freedesktop.secrets was not provided by any .service files
2023/05/13 13:39:51 error setting keyring credentials: The name org.freedesktop.secrets was not provided by any .service files

I am using Kubuntu 22.04.2

dweymouth commented 1 year ago

Could you try running the 0.2.0 release build directly (download and extract the .tar.xz on the release page) and see if you get the same errors? It looks like DBus isn't found on your system which is required for password storage among other things. I wonder if it's a Flatpak sandboxing issue. If so maybe @anarcat can help. (Edit: sorry for the ping anarcat - not a Flatpak issue!)

dweymouth commented 1 year ago

What I should probably add though is a fallback to log in for only the duration the app is running if the key ring is not available. Right now it will not login if it is unable to store the credential.

dweymouth commented 1 year ago

Alright it seems like it's more likely a KDE issue than Flatpak. It seems that KDE does not implement the dbus interface for the secret service: https://forum.authpass.app/t/what-is-the-provider-of-org-freedesktop-secrets-for-kde-plasma-5/162

I guess you are the first KDE user of Supersonic. I will need to add the fallback I mentioned above, and once that's in you would still need to log in every time you launch the app unfortunately (just the password, rest of the details would be saved), unless there is a different DBus path for the secret service on KDE I can use. Some KDE users also install gnome secrets manager to deal with these kinds of issues according to the link above.

dweymouth commented 1 year ago

Fixed on the main branch. If you can build from source it should (hopefully) work now, otherwise it will be fixed in the next Flatpak release. While you still will need to enter your password on every launch, it should actually log in now.

peterNordin commented 1 year ago

Thanks, that was fast. I will try the official tar release first, and then try a build of the latest code and see if there is a difference

dweymouth commented 1 year ago

Cool! Let me know if it works for you

anarcat commented 1 year ago

If so maybe @anarcat can help. (Edit: sorry for the ping anarcat - not a Flatpak issue!)

well in any case, i gave the beta a kick in https://github.com/flathub/io.github.dweymouth.supersonic/pull/15

@peterNordin that should be ready in an hour or so, let me know if you can confirm the fix there. :)

update: the bot finished the build, and a test build is available in https://github.com/flathub/io.github.dweymouth.supersonic/pull/15#issuecomment-1546785075

in theory, it should also show up in the flathub beta section (see those instructions) but i'm not sure what the delay is for that.

enjoy!

peterNordin commented 1 year ago

@anarcat Yes the beta flatpak works, I can log in. It does forget the password but that was to be expected. I will look into installing the gnome secrets manager and see if that helps.

anarcat commented 1 year ago

@anarcat Yes the beta flatpak works, I can log in. It does forget the password but that was to be expected. I will look into installing the gnome secrets manager and see if that helps.

does the flatpak version forget more than the non-flatpak one?

dweymouth commented 1 year ago

It's totally expected that either the Flatpak or the direct install will not store the password on KDE because it doesn't provide a DBus interface for storing secrets. The fix was so that it still allows you to login for the duration of the app running