All avatar uploads are broken


(Gregory Matthews) #1

The dicobot avatar appears to be broken when uploading a custom avatar. See Attached screenshots. Thanks
.


(Jeff Atwood) #2

Can we repro this @tgxworld?


(Alan Tan) #3

No repro on try

@GregoryMatthews I get a 500 error when visiting the image link directly, can you check your logs for errors?


(Gregory Matthews) #4

Yes, 500 error on our end as well plus the image does not show per the screen shots we sent.


(Gregory Matthews) #5

Custom Avatars for all other admins are fine.


(Jeff Atwood) #6

This must be specific to your site, if we can’t reproduce it.


(Gregory Matthews) #7

This admin user just showed up through a recent update of Discourse and the issue is isolated to that system user. What can we do on our end then to fix?


(Matt Palmer) #8

Diagnose the problem, first up. Look at logs, etc.


(Andrew Waugh) #9

Is your instance close to ringing the bell on memory?

We had problems with Avatars randomly showing blank, or just letters (and 500 errors fairly regularly) when we were on a smaller AWS instance. Once we went to a more powerful instance with more RAM a whole host of similar issues just stopped.

What does free and top reveal? (You have to watch top for a while, and pay attention to what sidekiq is doing to see if you’re choking on RAM.)


(Gregory Matthews) #10

We’re on an EC2 XLarge C4 instance with a dedicated RDS instance for the DB (Aurora). I don’t believe this issue to be caused by s server resource constraint. This is a relatively new installation with no traffic or other registered users at this time.


(Andrew Waugh) #11

Can you change your avatar here on meta to the same image? Perhaps it’s a problem with the image itself.

Conversely, can you change the avatar of the 'bot to the one you’re currently using here?


(Alan Tan) #12

We’ve mentioned this a couple of times but please check your logs at /logs first, there should be a trace for that error.


(Gregory Matthews) #13

… I’ll double check META and check the server logs then report back. Thanks for the guidance.


(Gregory Matthews) #14

What is the correct full path to the /logs directory so I can check the error log? Thanks.


(Gregory Matthews) #15

Found it. Here is what the error log shows relative to the discobot avatar issue mentioned above:

NoMethodError (undefined method `path' for nil:NilClass) 
/var/www/discourse/app/controllers/user_avatars_controller.rb:144
in `proxy_avatar'

I’m not sure what that means. Any ideas?


(Gregory Matthews) #16

… just following up as to any ideas per the log above?


(Régis Hanol) #17

Can you try uploading a different image?


(Gregory Matthews) #18

Hi Regis,

Yes, we have. Same error. Just tried again:

NoMethodError (undefined method `path' for nil:NilClass) /var/www/discourse/app/controllers/user_avatars_controller.rb:144:in `proxy_avatar'

This does not happen with the other Admins. I can change custom avatars without issue.


(Gregory Matthews) #19

I take that back. I just tried to change my own GRAVATAR to a custom uploaded avatar and get the same error. Something is going on with the Custom Picture upload for avatars per the 500 Error above.


(Gregory Matthews) #20

I don’t know if this makes any difference, but the discourse directory on my server is not /var/www/discouse. It’s /var/discourse.