Custom avatars and images not showing after upgrade, setting favicon/custom avatars in web UI gives "Access Denied"

I just upgraded to the latest and for some reason avatars are no longer showing. Searching here led me to this command RAILS_ENV=production bundle exec rake avatars:clean which looks like it might help fix this, but I’m unsure where to run this. I exec’d into the running container and tried there, but running this in the directory I landed in after the docker exec gave me Could not locate Gemfile or .bundle/ directory so obviously that’s not the place.

Could anyone help with some pointers?

Also, after the upgrade, I tried to add a favicon using the web UI, but when I browsed to a local png and hit Enter to choose it, a popup said “Access Denied” so the icon wasn’t set.

I tried:

cd /var/discourse/
./launcher enter app
rake avatars:clean

That ran and supposedly cleaned the avatar thumbnails, but still had no avatars afterwards.

When you say avatars are not showing up, do you mean all avatars or just letter avatars?

In any case, have you tried rebuilding?

cd /var/discourse
./launcher rebuild app
2 Likes

The avatars that aren’t showing were custom ones or ones used with the sign-in system, such as GitHub. Additionally some images included in posts (I think ones that were shown smaller than actual size) are not shown in the posts, but if you click on the broken image icon to see the actual image, it is displayed.

The images that aren’t showing (including the avatars) are in the directory shared/standalone/uploads/default/optimized/1X/ after the upgrade. Is the content of this directory meant to be copied to another location after the upgrade’s optimization, but somehow that operation didn’t happen or was aborted?

Additionally, trying to change an avatar by uploading a custom one results in “Access Denied”. Same thing with trying to set a favicon. I’m not sure if this permission issue is related to the previous problem of avatars/images not showing.

BTW, I did do ./launcher rebuild app - this is how I actually upgraded after a web-UI-initiated upgrade failed and put the forum out of commission. Possibly the initial aborted upgrade left things in an unfinished state and the second, successful upgrade somehow couldn’t correct this particular issue.

Turns out the problem was the S3 uploads being turned on and the access key/secret not allowing for the specified bucket to be created. I’m co-admin on the site and wasn’t aware of the restrictions with the credentials that had been entered for S3.

2 Likes