Tuba icon indicating copy to clipboard operation
Tuba copied to clipboard

[Bug]: Unclear error message when secret service is not running

Open WhyNotHugo opened this issue 2 years ago • 3 comments

Describe the bug

This issue is about the error message for this error condition being very unclear. I turned on my computer and then ran tuba and got an error popup that reads:

Error while searching for user accounts If you didn't manually cancel it, try creating a password keyring named "login" user Password and Keys (seahorse) or KWalletManager

The failure was caused by me forgetting to start KeePassXC, which is, at least for now, my secret-service implementation of choice.

Steps To Reproduce

  1. Log into tuba and exit normally
  2. Stop the secret service manager
  3. Start tuba again

Logs and/or Screenshots

See above.

Instance Backend

Mastodon

Operating System

Alpine Linux Edge

Package

OS repositories

Troubleshooting information

os: Alpine Linux (null)
prefix: /usr
flatpak: false
version: 0.5.0 (production)
gtk: 4.12.3 (4.12.2)
libadwaita: 1.4.0 (1.4.0)
libsoup: 3.4.2 (3.4.2)
libgtksourceview: 5.10.0 (5.10.0)

Additional Context

The error message for this condition should be something like:

Failed to communicate with the Secret Service provider Make sure a Secret Service provider is running

WhyNotHugo avatar Oct 10 '23 20:10 WhyNotHugo

Obviously the workaround here is trivial, so this isn't blocking.

WhyNotHugo avatar Oct 10 '23 20:10 WhyNotHugo

I'll take another look to see if there's any way to differentiate the errors, but if I remember correctly there wasn't one.

For context, there are two keyring related errors that require the user to act (and therefore need to be very newbie friendly):

  1. kWallet doesn't (or at least it hasn't landed in a release yet) handle the secret portal and users need to manually give the flatpak the required permissions. The error message then is org.freedesktop.DBus.Error.ServiceUnknown which Tuba detects and points the user to https://github.com/GeopJr/Tuba/wiki/libsecret-issues
  2. PureOS does not name the default keyring login and includes an older version of gnome-keyring which has a bug that can't handle default keyrings not named login. That requires the user to create a new keyring named login, but if I remember correctly, it was impossible to differentiate it between other keyring errors or even the keyring not being unlocked when asked (which also throws an error) so Tuba redirects users to https://github.com/GeopJr/Tuba/wiki/keyring-issues with that unclear message

If you have something else in mind, let me know! However, considering that this is an error happening to all instances of PureOS/librem devices and users might be unable to debug it on them (since they are mobile devices) or not have the knowledge to, I'm mostly leaning towards leaving it as is for now.

The relevant code: https://github.com/GeopJr/Tuba/blob/0078ea6c98f46703475f9fa80ff44d32d9cc9c5e/src/Services/Accounts/SecretAccountStore.vala#L35-L57

GeopJr avatar Oct 10 '23 20:10 GeopJr

It would seem that the error returned by Secret.password_searchv_sync doesn't have enough details to determine the cause of the error (which would help decide which error message is appropriate).

I can't think of much that can be done (at least now without changing the error details returned by the function that I mentioned). Maybe having this issue around is enough for the next person to figure out what's wrong.

WhyNotHugo avatar Oct 14 '23 13:10 WhyNotHugo