[Solved] Missing avatars after reinstalling Mastodon


#1

Hi,

I have made a new install of Maston several weeks ago after upgrading my server.
Since this install, some avatars from others instances are missing in timelines.

In Firefox console, I have this kind of error :

GET https://mastd.racing/system/accounts/avatars/000/001/559/original/8a1662b5b17bb42b.jpg HTTP/1.1 404 Not Found 81 ms

I have tried to redowload avatars with the following command :

RAILS_ENV=production bundle exec rails mastodon:media:redownload_avatars

The command works, there is no error message but missing avatars don’t come back.

There are a lot of issues like this one on Mastodon github but I didn’t find a solution.

Can someone help me?

Thank you

Edit : Solution

I copied the avatars from a backup to the public/system directory using rsync.


#2

Doesn’t anyone have any advice on how to identify the root cause of the problem?
I really don’t know what to try or where to look anymore…


#3

Do you have anything left under public/system directory? Did you delete that one when reinstalling?


#4

Tank you for your answer.

Under the “public/system” directory, there are the 3 folders: “accounts” “media_attachments” “preview_cards”. Inside, i have a lot of sub folders with avatars or media.

Yes, all the “live” directory was deleted before the reinstalling (the directory where my instance is installed). I did not restore the “live” directory after the installation because the instance seemed to work properly. I only restored the database from the backup.

I thought that the missing avatars were going to be loaded later from the other instances, but it was not.


#5

So at least we know what happened. Not everything should be removed from live if instance should live on in a different incarnation. You might have had local avatar(s) there which are gone now.


#6

Yes, local avatars disappeared a few days later. But there was only few accounts created by me at that time, I have re-upload them. For the media i have previously uploaded, it wasn’t necessary to restore them.

Now, the problem is for the account from other instances, some avatars are still missing.

You can see that on the prevew of the timeline :


#7

For some of the instances, I do see the avatars. (Don’t see one from GNU social for example but also marmot.fr). It looks even only some users are missing (Neuro - La Quadrature du Net - Mastodon - Media Fédéré does not have one, but La Quadrature du Net - La Quadrature du Net - Mastodon - Media Fédéré has, all from the same instance).


#8

Yes, I’m doing the same diagnosis.


#9

I ran a search for the Neuro account avatar in the “public/system” directory. There is a file “/public/system/accounts/avatars/000/001/199/original/e0ea25b05edf7c86.jpg” of Neuro’s avatar.

On my web browser, nothing appears :

GET https://mastd.racing/system/accounts/avatars/000/001/199/original/e0ea25b05edf7c86.jpg [HTTP/1.1 404 Not Found 73 ms]


#10

In fact, i made the search in the backup copy.
On the running server, /public/system/accounts/avatars/000/001/199 directory doesn’t exist.

I will try to restored the backup jpeg, maybe it ca solve the problem.

Edit : it works ! Thank you for your help !