gotosocial
gotosocial copied to clipboard
[bug] Frequent errors like: `AccountToAPIAccountPublic: error getting Avatar with id 018TVZM9FZTFNESG1MNFWD6QB3: no entries`
I believe this is to do with an issue we were seeing earlier to do with not having content-length
set on responses from some Misskey servers (fixed by #848)
My thinking is that we partially set/stored avatars/headers for users on such instances, without finishing processing the media attachment because of the failure from the media manager.
We should investigate a neat way of fixing these errors + regenerating avatars + headers for these users
Have a workaround at least, but maybe my instance has a slightly different problem due to some ... uh .. fuckery :upside_down_face:
update accounts set avatar_media_attachment_id = null where id in (select accounts.id from accounts left join media_attachments on media_attachments.id = accounts.avatar_media_attachment_id where media_attachments.id is null and accounts.avatar_media_attachment_id is not null);
update accounts set header_media_attachment_id = null where id in (select accounts.id from accounts left join media_attachments on media_attachments.id = accounts.header_media_attachment_id where media_attachments.id is null and accounts.header_media_attachment_id is not null);
Problem is the account
media_attachment
IDs not being a foreign key to media_attachment.id
but also not being cleared when the media_attachment
has gone missing.
OK, scratch that as workaround - have such errors logged again and this time I didn't do any database fuckery since that posted workaround :upside_down_face:
This should be closed by updates recently :)