glitch-soc / mastodon

A glitchy but lovable microblogging server
https://glitch-soc.github.io/docs/
GNU Affero General Public License v3.0
708 stars 182 forks source link

"Unexpected Error" toasts don't go away and cause problems #2624

Open prplecake opened 9 months ago

prplecake commented 9 months ago

Steps to reproduce the problem

  1. Use advanced (deck?) web interface, unsure if the other interface is affected - i don't use it.
  2. Keep tab open through several internet connection changes, or otherwise get Mastodon to show some "Unexpected error" toasts
  3. Eventually find that you can't use the compose column because there's a <div> containing the aforementioned, though hidden, toasts. You can't click things under this <div>

Expected behaviour

Compose column should remain usable regardless of how long it's been since the last page refresh.

Actual behaviour

Compose column becomes unusable after a rather short period of time.

Detailed description

Everything under the element highlighted in blue is un-clickable.

Screenshot 2024-02-16 at 07 35 41

Mastodon instance

compostintraining.club

Mastodon version

v4.3.0-alpha.2+glitch

Browser name and version

Firefox 122.0.1

Operating system

macOS 14.2.1

Technical details

<div>s for other notification toasts do seem to be removed. It's only the unexpected error messages that don't.

ClearlyClaire commented 9 months ago

Hm, I'm unable to reproduce “Unexpected errors” toasts not going away.

prplecake commented 9 months ago

Bummer. I do maintain my own fork, but didn't see much, if any, divergence around notification-list things. Still, I went ahead and reduced a lot of divergence, I'll see if that helps.

prplecake commented 9 months ago

Hm, I'm unable to reproduce “Unexpected errors” toasts not going away.

To clarify, they visually go away as is you don't see them on the page anymore. But the divs are just pushed off screen, with the div.notification-list blocking the ability to click on anything under it, which is usually the compose column.

I wonder if the theme I'm using is affecting this... I'll switch back to the default theme and see if that helps.

ClearlyClaire commented 8 months ago

This is really curious and I can't reproduce it, they do get removed from the DOM after moving off-screen on my end… and I can't figure out an explanation by reading the code either :/

prplecake commented 8 months ago

I only see it on my MacBook, which is starting to lead me to believe something to do with the sleep/wake process, and potentially whatever macOS does during sleep to keep apps up to date. So Mastodon web is repeatedly losing the connection to the API. This would explain why I'm getting so many "Unexpected error" errors. Past that, I can only speculate that React isn't fully updating the UI or something? Certainly not a high priority issue - refreshing is easy enough.