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

[Bug]: Only three accounts supported #1187

Open
tomirgang opened this issue Nov 1, 2024 · 11 comments
Open

[Bug]: Only three accounts supported #1187

tomirgang opened this issue Nov 1, 2024 · 11 comments
Labels
bug Something isn't working

Comments

@tomirgang
Copy link

Describe the bug

I'm using Tuba 0.8.4 from Flathub on VanillaOS 2.
I think I spotted a bug:
I can add more then three accounts, but after every restart only the first three accounts are available.

Steps To Reproduce

  1. Install Tuba 0.8.4 form Flathub
  2. Add more then three Mastodon accounts
  3. Close the app and reopen it.
    Only the first three accounts are available.

Logs and/or Screenshots

No response

Instance Backend

Mastodon

Operating System

VanillaOS 2

Package

Flatpak

Troubleshooting information

No response

Additional Context

No response

@tomirgang tomirgang added the bug Something isn't working label Nov 1, 2024
@GeopJr
Copy link
Owner

GeopJr commented Nov 1, 2024

Thanks for the report!

Tuba securely saves and reads accounts from the secret-service. Sometimes distros and setups have configured it wrong. You can try and see if they are saved correctly using Passwords & Keys (seahorse) and check if there's any errors when running tuba with flatpak run dev.geopjr.Tuba but other than that there's not much I can do.

I'll try VanillaOS in a vm and attempt to re-produce it but from Tuba's side there's no hard-limits and will add as many accounts as the secret-service returns.

@tomirgang
Copy link
Author

Hi @GeopJr,

I just found one entry for Tuba in the secret store:

secret-tool search --all --unlock app_id dev.geopjr.Tuba
[/15]
label = 
5�****more binary stuff***
created = 2024-10-30 06:27:53
modified = 2024-10-30 06:27:53
schema = org.freedesktop.Secret.Generic
attribute.app_id = dev.geopjr.Tuba

and no account information at all.

The console log showed some warnings:

tom@Vanilla  ~ $ flatpak run dev.geopjr.Tuba
(dev.geopjr.Tuba:2): Json-WARNING **: 09:48:00.748: Unsupported type `GeeMap'
(dev.geopjr.Tuba:2): Json-WARNING **: 09:48:00.748: Unsupported type `GType'
(dev.geopjr.Tuba:2): Json-WARNING **: 09:48:00.748: Unsupported type `gpointer'
(dev.geopjr.Tuba:2): Json-WARNING **: 09:48:00.748: Unsupported type `gpointer'
(dev.geopjr.Tuba:2): Json-WARNING **: 09:48:00.748: Unsupported type `GType'
(dev.geopjr.Tuba:2): Json-WARNING **: 09:48:00.748: Unsupported type `gpointer'
(dev.geopjr.Tuba:2): Json-WARNING **: 09:48:00.748: Unsupported type `gpointer'
(dev.geopjr.Tuba:2): Json-WARNING **: 09:48:00.748: Unsupported type `GeeSet'
(dev.geopjr.Tuba:2): Json-WARNING **: 09:48:00.748: Unsupported type `GeeCollection'
(dev.geopjr.Tuba:2): Json-WARNING **: 09:48:00.748: Unsupported type `GeeSet'

@mickeymarse
Copy link

I'm having the same issue, but I'm actually limited to only one account. :(

@GeopJr
Copy link
Owner

GeopJr commented Jan 9, 2025

Someone on Mastodon helped me debug this further, I just haven't gotten back into FOSS from the holidays :P

If the accounts have the same name, try changing the display name of one you are adding temporarily until you add it and then change it back

@mickeymarse
Copy link

No rush at all. Feel free to answer whenever you can.
In my case, accounts have different names and server. No similarities whatsoever.
Happy to check the original thread if you still have the link though.

@GeopJr
Copy link
Owner

GeopJr commented Jan 9, 2025

It was mostly a one off message so nothing to really check out. Uhmm, I don't know.

  • Are there are any errors right after adding your accounts?
  • Do the accounts have any similarities in regards of handle / display name?
  • What's your distro (and DE)?
  • You do have a libsecret backend installed, right? (Kwallet, gnome-keyring, keepass...)
  • Could you make sure the keyring is unlocked with seahorse / Passwords & Keys?
  • What backend software do both the accounts run? (Mastodon, Akkoma etc)

Other than that, I'm out of ideas. We do have some hacks around some issues with some setups (we unlock the whole keyring when we shouldn't have to and we don't on GNOME and KDE at least), but I don't think that has anything to do with it since at least one was saved.

From Tuba's side, all it does is ask libsecret to save the account to the keyring, but if that failed there would be at least 2-3 warnings shown :////

I wish I could reproduce it

@wm75
Copy link

wm75 commented Jan 23, 2025

Just encountered what seems to be the same issue:
I've been migrating my account to a new server using same user and display name.

When I tried adding the new account (as the third account) to Tuba it wouldn't persist across app restarts.
Instead of playing with changing names in any of the accounts I just removed now my old, transferred account from Tuba, added the new one once more and, voilà, it's here to stay :-)

So, apparently, nothing's wrong with my keyring and it seems likely that the duplicate account and/or display name was the issue.

[edit] forgot to add app info:
0.9.1 flatpak version

@GeopJr
Copy link
Owner

GeopJr commented Jan 24, 2025

Still can't reproduce it on my end with duplicate account names etc. FWIW, I'll list all I have on it in case anyone passing by can help target it down.

Credentials are saved in the host's keyring. These keyrings have their own unique issues and sometimes need workarounds (e.g. the version of gnome-keyring pureos ships(/ed?) would assume the default keyring was named 'login' and pureos had renamed it or the keepass having issues with the portal).

Tuba and other gnome apps use libsecret to communicate with the secret service (keyrings). On unlocking, there's a workaround for some issues found with some keyrings where we need to lookup everything rather than just dev.geopjr.Tuba.

Tuba's secret entries have two attributes, login which is the unique account handle and version which is 1 (this can be used to invalidate old incompatible logins, e.g. #638)

When adding an account, Tuba generates the secret body, which is a json string that includes some account secrets and info, fills in the attributes and asks libsecret to save it.

https://github.com/GeopJr/Tuba/blob/main/src/Services/Accounts/SecretAccountStore.vala#L217-L235

So far nobody that has experienced this issue has reported any logged errors. If it doesn't succeed it both logs an error in terminal but also displays a dialog with it. If it succeeds, and Tuba is running with G_MESSAGES_DEBUG=Tuba, the following string will be logged in terminal Saved secret for <account handle>.

That only leads me to believe that from Tuba's side everything is done correctly and the problem is on the keyrings. However if the Saved secret for <account handle> string doesn't log either then I have another suspicion.

@wm75
Copy link

wm75 commented Jan 24, 2025

Thanks for the debugging directions.
I just tried and ran Tuba with the G_MESSAGES_DEBUG=Tuba option and then added my third account back in.
When I connect it, Tuba prints the Saved secret for <account handle> twice for the two existing accounts, but never for the new one and there are no errors (except that none of my accounts has the annual report 2024 api) or warnings along the way.
When I then close Tuba and reopen it with the same debug option, it happily reports that it loaded two accounts, and my freshly added one is gone.

@GeopJr
Copy link
Owner

GeopJr commented Jan 25, 2025

Can you try this build? https://github.com/GeopJr/Tuba/actions/runs/12963051619/artifacts/2484703740 - it includes some more logs

(unzip it and install it with flatpak install ./<path to dev.geopjr.Tuba.Devel.flatpak>)

Run it with flatpak run dev.geopjr.Tuba and try adding the account that cant be saved. Then send me back the logs (feel free to redact anything, but make sure the handles can be distinguished between the others)

@wm75
Copy link

wm75 commented Jan 27, 2025

Can you try this build? https://github.com/GeopJr/Tuba/actions/runs/12963051619/artifacts/2484703740 - it includes some more logs

I tried but it cannot be launched. Error is:

bwrap: execvp ldconfig: Exec format error
error: ldconfig failed, exit status 256

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

No branches or pull requests

4 participants