-
Notifications
You must be signed in to change notification settings - Fork 182
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
[Vanilla?] Grouped notifications of type 'status' for deleted statuses fail #2802
Comments
Now, the question is whether status being null is the bug here, or such null statuses not being filtered from notifications |
Given null checks are present for other notification types, I'd say it's the latter. |
Manually deleting all "status" type notifications where no status exists is a working workaround, too. There were over 5000 such notifications in the database since catcatnya.com has started to exist. |
Can you retry with the last update? I suspect it behaves better. But it sounds like there's something weird going on. We technically expect some orphaned notifications for various reasons (basically polymorphism and race conditions), so it is good to guard against null statuses in the clients, but over 5k seems a bit much. |
5k notifications since 2022, for the entire userbase of 150+ monthly active users. I think that's not that bad. There are worse issues in Mastodon.
As production yields no new such notifications since my report (since no one rapid fire posted-and-deleted), I've gone ahead and injected a fake entry to bring back the issue (and then, just as I did that, someone managed to actually do it again, causing two entries for two users, one of those being me), then upgraded. Result: Notifications no longer result in an error, so it no longer breaks. However, there is an empty notification whenever the status can't be found: Btw, here's a quick query to run to get any such notifications: select * from notifications n where n.type='status' and not exists (select s.id from statuses s where n.activity_id = s.id); |
If you think the empty notification is not a big deal, feel free to close the bug. |
It's not a very big deal but it's still a bug that needs to be investigated, at the very least on the display side. |
I think it has been addressed with recent changes, although the underlying cause still needs to be investigated |
Steps to reproduce the problem
Expected behaviour
Notifications load without any issue
Actual behaviour
Oops! An unexpected error occurred.
Detailed description
No response
Mastodon instance
catcatnya.com, cts.kescher.at, local dev container with artificial data
Mastodon version
commit 3271765, but probably occurs since initial implementation
Browser name and version
Recent versions of both Chromium and Firefox
Operating system
Linux, Android
Technical details
Error is:
Leading me to this line:
mastodon/app/javascript/flavours/glitch/actions/importer/index.js
Line 64 in c72b6e0
Here is a redacted JSON object that's part of the response of
/api/v2_alpha/notifications?exclude_types[]=follow_request&exclude_types[]=favourite&exclude_types[]=update&exclude_types[]=reaction&exclude_types[]=mention&exclude_types[]=follow&exclude_types[]=admin.report&exclude_types[]=reblog&exclude_types[]=admin.sign_up&exclude_types[]=poll
:Note that usually, status is populated.
The text was updated successfully, but these errors were encountered: