GeopJr / Tuba

Browse the Fediverse
https://tuba.geopjr.dev/
GNU General Public License v3.0
571 stars 60 forks source link

[Bug]: Follow Request Banner doesn't disappear #1154

Closed linfindel closed 3 weeks ago

linfindel commented 4 weeks ago

Describe the bug

After receiving a follow request, the banner notifying me shows up. image I declined the follow request weeks ago but since then, every time I open Tuba, it shows up again. I can temporarily dismiss it by clicking the View button but next time I open Tuba it shows again. Screencast from 2024-10-09 11-20-39.webm

This doesn't happen on any other accounts I tested with or any other Mastodon clients. None of the following have fixed it:

I don't know if this is relevant but the account is https://mastodon.social/@nathanhadley

Steps To Reproduce

  1. Open Tuba with my account
  2. Observe the Follow Request Banner shows
  3. Click the View button
  4. Observe that there are no follow requests and that the banner has disappeared
  5. Close and reopen Tuba and observe that this repeats

Logs and/or Screenshots

(dev.geopjr.Tuba:2): Tuba-DEBUG: 11:16:31.754: Application.vala:247: os: GNOME 46 (Flatpak runtime)
(dev.geopjr.Tuba:2): Tuba-DEBUG: 11:16:31.754: Application.vala:247: prefix: /app
(dev.geopjr.Tuba:2): Tuba-DEBUG: 11:16:31.754: Application.vala:247: flatpak: true
(dev.geopjr.Tuba:2): Tuba-DEBUG: 11:16:31.754: Application.vala:247: version: 0.8.4 (production)
(dev.geopjr.Tuba:2): Tuba-DEBUG: 11:16:31.754: Application.vala:247: gtk: 4.14.5 (4.14.4)
(dev.geopjr.Tuba:2): Tuba-DEBUG: 11:16:31.754: Application.vala:247: libadwaita: 1.5.4 (1.5.3)
(dev.geopjr.Tuba:2): Tuba-DEBUG: 11:16:31.754: Application.vala:247: libsoup: 3.4.4 (3.4.4)
(dev.geopjr.Tuba:2): Tuba-DEBUG: 11:16:31.754: Application.vala:247: libgtksourceview: 5.12.1 (5.12.1)
(dev.geopjr.Tuba:2): Tuba-DEBUG: 11:16:31.756: SecretAccountStore.vala:9: Using libsecret v0.21.4
(dev.geopjr.Tuba:2): Tuba-DEBUG: 11:16:31.773: Network.vala:65: GET: https://mastodon.social/api/v1/accounts/112339019921730597
Tuba-INFO: 11:16:31.773: Streams.vala:88: TubaMastodonAccount > https://mastodon.social/api/v1/streaming?stream=user:notification
(dev.geopjr.Tuba:2): Tuba-DEBUG: 11:16:31.773: Streams.vala:68: Opening stream: https://mastodon.social/api/v1/streaming?stream=user:notification
(dev.geopjr.Tuba:2): Tuba-DEBUG: 11:16:31.773: Network.vala:65: GET: https://mastodon.social/api/v1/markers?timeline[]=notifications
(dev.geopjr.Tuba:2): Tuba-DEBUG: 11:16:31.773: SecretAccountStore.vala:92: Loaded 1 accounts
(dev.geopjr.Tuba:2): Tuba-DEBUG: 11:16:31.773: AccountStore.vala:85: Activating @nathanhadley@mastodon.social…
(dev.geopjr.Tuba:2): Tuba-DEBUG: 11:16:31.773: Network.vala:65: GET: https://mastodon.social/api/v1/accounts/verify_credentials
(dev.geopjr.Tuba:2): Tuba-DEBUG: 11:16:31.773: Network.vala:65: GET: https://mastodon.social/api/v1/instance
(dev.geopjr.Tuba:2): Tuba-DEBUG: 11:16:31.774: Network.vala:65: GET: https://mastodon.social/api/v1/custom_emojis
(dev.geopjr.Tuba:2): Tuba-DEBUG: 11:16:31.774: Network.vala:65: GET: https://mastodon.social/api/v1/announcements
(dev.geopjr.Tuba:2): Tuba-DEBUG: 11:16:31.774: Application.vala:434: Presenting MainWindow
Tuba-INFO: 11:16:31.809: Streams.vala:88: TubaViewsHome > https://mastodon.social/api/v1/streaming?stream=user
(dev.geopjr.Tuba:2): Tuba-DEBUG: 11:16:31.809: Streams.vala:68: Opening stream: https://mastodon.social/api/v1/streaming?stream=user
Tuba-INFO: 11:16:31.809: Streams.vala:94: TubaViewsHome X https://mastodon.social/api/v1/streaming?stream=user
(dev.geopjr.Tuba:2): Tuba-DEBUG: 11:16:31.809: Streams.vala:99: Closing: https://mastodon.social/api/v1/streaming?stream=user
Tuba-INFO: 11:16:31.809: Streams.vala:88: TubaViewsHome > https://mastodon.social/api/v1/streaming?stream=user
(dev.geopjr.Tuba:2): Tuba-DEBUG: 11:16:31.809: Streams.vala:68: Opening stream: https://mastodon.social/api/v1/streaming?stream=user
Tuba-INFO: 11:16:31.810: Streams.vala:88: TubaViewsNotifications > https://mastodon.social/api/v1/streaming?stream=user:notification
Tuba-INFO: 11:16:31.810: Streams.vala:94: TubaViewsNotifications X https://mastodon.social/api/v1/streaming?stream=user:notification
Tuba-INFO: 11:16:31.810: Streams.vala:88: TubaViewsNotifications > https://mastodon.social/api/v1/streaming?stream=user:notification
Tuba-INFO: 11:16:31.812: Streams.vala:88: TubaViewsConversations > https://mastodon.social/api/v1/streaming?stream=direct
(dev.geopjr.Tuba:2): Tuba-DEBUG: 11:16:31.812: Streams.vala:68: Opening stream: https://mastodon.social/api/v1/streaming?stream=direct
Tuba-INFO: 11:16:31.812: Streams.vala:94: TubaViewsConversations X https://mastodon.social/api/v1/streaming?stream=direct
(dev.geopjr.Tuba:2): Tuba-DEBUG: 11:16:31.812: Streams.vala:99: Closing: https://mastodon.social/api/v1/streaming?stream=direct
Tuba-INFO: 11:16:31.812: Streams.vala:88: TubaViewsConversations > https://mastodon.social/api/v1/streaming?stream=direct
(dev.geopjr.Tuba:2): Tuba-DEBUG: 11:16:31.812: Streams.vala:68: Opening stream: https://mastodon.social/api/v1/streaming?stream=direct
(dev.geopjr.Tuba:2): Tuba-DEBUG: 11:16:31.924: Network.vala:65: GET: https://mastodon.social/api/v2/instance
(dev.geopjr.Tuba:2): Tuba-DEBUG: 11:16:32.272: Network.vala:65: GET: https://mastodon.social/api/v1/timelines/home?limit=20
(dev.geopjr.Tuba:2): Tuba-DEBUG: 11:16:32.272: Network.vala:65: GET: https://mastodon.social/api/v1/notifications?limit=20
(dev.geopjr.Tuba:2): Tuba-DEBUG: 11:16:32.272: Network.vala:65: GET: https://mastodon.social/api/v1/conversations?limit=20
(dev.geopjr.Tuba:2): Tuba-DEBUG: 11:16:32.447: Network.vala:65: GET: https://mastodon.social/api/v1/notifications?min_id=325031819
(dev.geopjr.Tuba:2): Tuba-DEBUG: 11:16:32.489: InstanceAccount.vala:200: @nathanhadley@mastodon.social: profile updated
(dev.geopjr.Tuba:2): Tuba-DEBUG: 11:16:32.806: Status.vala:4: [OBJ] Destroyed https://fandom.ink/users/Fragglemuppet/statuses/113058002654210090
(dev.geopjr.Tuba:2): Tuba-DEBUG: 11:16:32.830: Network.vala:65: GET: https://mastodon.social/api/v1/accounts/relationships?id=113232109609264821

(dev.geopjr.Tuba:2): Tuba-WARNING **: 11:16:33.493: Image.vala:69: Failed to download image at "https://files.mastodon.social/cache/custom_emojis/images/000/067/996/original/afaddce86acecf44.png": Unrecognised image file format

(dev.geopjr.Tuba:2): Tuba-WARNING **: 11:16:33.502: Image.vala:69: Failed to download image at "https://files.mastodon.social/cache/custom_emojis/images/000/067/996/original/afaddce86acecf44.png": Unrecognised image file format
(dev.geopjr.Tuba:2): Tuba-DEBUG: 11:16:42.686: Network.vala:65: GET: https://mastodon.social/api/v1/follow_requests?limit=20
(dev.geopjr.Tuba:2): Tuba-DEBUG: 11:16:47.232: Timeline.vala:118: Destroying Timeline Follow Requests
(dev.geopjr.Tuba:2): Tuba-DEBUG: 11:16:47.232: ContentBase.vala:45: Destroying ContentBase
(dev.geopjr.Tuba:2): Tuba-DEBUG: 11:16:47.232: Base.vala:147: Destroying base Follow Requests

Instance Backend

Mastodon

Operating System

Fedora 40

Package

Flatpak

Troubleshooting information

os: GNOME 46 (Flatpak runtime) prefix: /app flatpak: true version: 0.8.4 (production) gtk: 4.14.5 (4.14.4) libadwaita: 1.5.4 (1.5.3) libsoup: 3.4.4 (3.4.4) libgtksourceview: 5.12.1 (5.12.1)

Additional Context

No response

GeopJr commented 4 weeks ago

Thanks for the report!

The initial value is based on what Mastodon returns. Would you mind helping me debug this a bit further?

You can either:

$ curl 'https://mastodon.social/api/v1/accounts/verify_credentials' -H "Authorization: Bearer $(secret-tool lookup xdg:schema dev.geopjr.Tuba login @nathanhadley@mastodon.social | jq -r .'"access-token"')" | jq .source.follow_requests_count

And send back the result.

If it's anything but 0, then it's probably an issue with the server, which I can try and help you fix by sending u a follow request and hope it resets it

If it's 0, then the problem lies somewhere else with notifications + tuba

linfindel commented 4 weeks ago

The curl returned null so I tried the browser method and the follow_requests_count is 1. I forgot to mention in the report that someone has sent me a follow request (which I accepted) since this started happening and the number displayed went up to 2 follow requests before dropping back to 1 after I accepted it. In any case, I guess it's not a Tuba issue. Odd that it only shows in Tuba though.

GeopJr commented 3 weeks ago

There's different ways to get the follower request count, Tuba uses the one you used above, but others might use different APIs. Tuba already calls that to get the server side settings (like your preferred visibility) so it might as well get it from there.

Now, I have no idea why it's stuck :/

I'll send you a follow request from mastodon.social test account, try declining it and see if it fixes the problem

linfindel commented 3 weeks ago

I declined it and it didn't work. I tried turning on automatically accepting follow requests in my account settings and that didn't fix it either.

linfindel commented 3 weeks ago

Oh wait it's gone now. Guess the server needed a bit of time :) Should I close this now? Thank you for your time!

GeopJr commented 3 weeks ago

No problem, glad you got it fixed!

My guess is maybe mastodon.social restored a database backup or similar while updating to the newest mastodon version that released recently and your follower count was stuck :shrug:

I'll close this!