Users' avatars disappeared

I’m preparing a new forum for launch. Self-hosted Discourse (2.6.0.beta1) on DigitalOcean (btw, I’m still amazed that you give this gem away for free). Everything worked great and all users (including myself) had avatars.
Then, at one specific moment, without any modifications of forum’s config, I refreshed the page in the browser and there were no more avatars.

Currently, topics list looks like this:

Interestingly, if I open a topic, then the “status bar” does show the avatars:

Edit: I just tried to see the forum once again in incognito mode. All avatars are gone, so I guess the fact that I saw them somewhere might have been related to caching.

However, if I open user’s profile, there is no avatar there:

Luckily, I had already started backing the data up and there aren’t many testers on the forum yet, so I hope I’ll be able to resolve this by just restoring from a backup. However, without identifying the root cause, I might just run into the same issue again.

As far as I understand, these avatars come from Gravatar.

I’m new to Discourse, so sorry in advance if there is not enough info in this report. I’ll provide any additional information per your requests.


1 Like

User profile pictures gets pulled from Gavatar if they have a gravatar account. I am not sure how often this pull happens, but there is a way to force download them

If you must, update it for everyone you can run:

./launcher enter app
rails r 'UserAvatar.find_each {|u| print "."; u.update_gravatar!}'

It will take a while to run

reference: Automatic updates of Gravatar avatars?


@IAmGav, thanks for your recommendation.

Unfortunately, even after performing this step and waiting for 30 mins there are still no avatars shown.

I spent several hours on this issue, but couldn’t find a solution. Restoring from backup didn’t help either :frowning:

Found this issue from 2018: How to fix user avatar?

As far as I can tell, the problem there was some incompatibility between Discourse’s internal components. Can I experience something similar? TBH, I would expect a problem in Discourse to affect many more installations, but the aforementioned problem involved just one reporter as well.

I’ll appreciate any help :pray:


A few recommendation:

  1. Look at the URL of one of the bad images, what happens if you paste ?a at the end of the URL does the image start working?

  2. Can you fix a single user by hand (switch to letter, upload an avatar, switch to avatar, refresh avatar)

Are your images local or on s3?



Images are local. Appending ?a at the end of image’s URL didn’t help.

Interestingly, I can still see my own image on preferences pages (but it’s not the case for other users). URL-wise, the following happens:

  • URL of my image from the main page resolves to default placeholder (even with ?a):
  • URL of my image from preferences page resolves to correct image:

Tried to fix the issue for a single user. Switching to letter, then custom image and then back to gravatar didn’t work.

There is one additional problem I’m experiencing. It looks unrelated, but since the chances of hitting two independent issues simultaneously are very low, I suspect there is a connection between them.

The forum doesn’t send invites to users anymore (it did in the past).

I invited several users, but none of them got an invitation. So I sent an invite to myself (different email) and didn’t receive it as well. So now I have several pending invites:

I immediately thought that the problem is in integration with mailgun, or even deliverability, so I sent a test email to myself, but it arrived immediately. Looking at the sent emails page I see the following:

Forum sent test emails, but didn’t send invites.

At this point, I believe that my installation of Discourse is screwed big time. Probably something I did myself without realizing. I’ve been struggling with it for many hours now at the worst time possible (launching my new community). Therefore, I’ll just perform clean install of Discourse, without restoring from backup, and re-invite all the users. Luckily, there aren’t many users right now and there isn’t much content on the forum.

I’ll leave the droplet with the old installation around for a while, just in case you’ll need some more info. If you’ll decided that it’s something worth looking into, I don’t even mind giving you access through ssh.

Thanks for your help. Hope clean installation will work.

Check also this topic: Avatars lost after restore. How to get them back?

Hi @Vasiliy

Before you build an entire new instance for this issue; you might consider checking the job scheduler (sidekiq) to see if it is operating property, if there are any failed jobs, is the job queue backed up, etc.

Just a thought…

Also, you might also consider checking the rails log, especially the error log.

1 Like

Thanks for your suggestions.

I couldn’t spend any more time debugging this problem right now, so I already created a new forum. Works alright so far.

Frankly, I feel a bit stupid that it didn’t occur to me to check the logs. Not that I would expect to understand what they say, but I should’ve attached them to the report. Well, better late than never. Attaching all the logs from rails dir now.

I grepped them a bit and it looks like there are indeed some error messages in there. However, I can’t understand what they mean and whether they’re even related to the problems. Probably more knowledgable members will be able to investigate them better.