gotosocial icon indicating copy to clipboard operation
gotosocial copied to clipboard

[bug] Frequent errors like: `AccountToAPIAccountPublic: error getting Avatar with id 018TVZM9FZTFNESG1MNFWD6QB3: no entries`

Open tsmethurst opened this issue 1 year ago • 2 comments

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

tsmethurst avatar Sep 24 '22 09:09 tsmethurst

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.

LittleFox94 avatar Sep 28 '22 19:09 LittleFox94

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:

LittleFox94 avatar Sep 28 '22 20:09 LittleFox94

This should be closed by updates recently :)

tsmethurst avatar Mar 31 '23 13:03 tsmethurst