# Wrong account avatar after upgrade

**URL:** https://meta.discourse.org/t/wrong-account-avatar-after-upgrade/74886
**Category:** Bug
**Created:** [2017年十一月27日 15:03 UTC](https://meta.discourse.org/t/wrong-account-avatar-after-upgrade/74886 "2017-11-27T15:03:55Z")
**Posts on this page:** 18
**Page:** 1

<div class="post-metadata">

### Author: ![Fouad\_Farah](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/fouad_farah/32/198321_2.png) [@Fouad\_Farah](https://meta.discourse.org/u/Fouad_Farah)
#### Post date: [2017年十一月27日 15:03 UTC](https://meta.discourse.org/t/wrong-account-avatar-after-upgrade/74886/1 "2017-11-27T15:03:55Z")

</div>

Hello,

I just upgraded to 1.9.0.beta14 (I had to rebuild app)  
After upgrading I enabled https by editing the app.yaml and rebuilt app again (Let’s Encrypt)

Now I have this weird bug, one of the account’s avatar’s is showing that of another, constantly.

user A has the avatar of user B  
user B however still has their correct avatar.

How to solve this?

---

<div class="post-metadata">

### Author: ![Yuun](https://avatars.discourse-cdn.com/v4/letter/y/977dab/32.png) [@Yuun](https://meta.discourse.org/u/Yuun)
#### Post date: [2017年十一月27日 19:41 UTC](https://meta.discourse.org/t/wrong-account-avatar-after-upgrade/74886/2 "2017-11-27T19:41:40Z")

</div>

I am also seeing issues with this on my forum after upgrading to latest this morning, just noticed it a little bit ago.

It seems like I am seeing the correct avatar:

- Within a topic
- On user cards
- On individual profile pages

But I am seeing incorrect avatars:

- On /latest
- On admin/users
- On my profile button (top right corner of the screen)

I am also occasionally seeing a gray placeholder avatar thing, but I haven’t narrowed down when exactly it’s showing up…

I am also using https via Let’s Encrypt, and have been for a fair amount of time now (months? I dunno), in case that’s relevant.

I also have this error in /logs (42 times as of now), which I haven’t seen before:

> Failed to process hijacked response correctly undefined method ‘upcase’ for nil:NilClass

```plaintext
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/logster-1.2.8/lib/logster/logger.rb:93:in `add_with_opts'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/logster-1.2.8/lib/logster/logger.rb:50:in `add'
/usr/local/lib/ruby/2.4.0/logger.rb:534:in `warn'
/var/www/discourse/lib/hijack.rb:32:in `rescue in block in hijack'
/var/www/discourse/lib/hijack.rb:29:in `block in hijack'
/var/www/discourse/lib/scheduler/defer.rb:74:in `block in do_work'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/rails_multisite-1.1.2/lib/rails_multisite/connection_management.rb:77:in `with_connection'
/var/www/discourse/lib/scheduler/defer.rb:72:in `do_work'
/var/www/discourse/lib/scheduler/defer.rb:61:in `block (2 levels) in start_thread'

```

---

<div class="post-metadata">

### Author: ![jomaxro](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jomaxro/32/126216_2.png) [@jomaxro](https://meta.discourse.org/u/jomaxro)
#### Post date: [2017年十一月27日 21:15 UTC](https://meta.discourse.org/t/wrong-account-avatar-after-upgrade/74886/3 "2017-11-27T21:15:33Z")

</div>

Hijack sounds like what @sam was working on…

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [2017年十一月27日 21:21 UTC](https://meta.discourse.org/t/wrong-account-avatar-after-upgrade/74886/4 "2017-11-27T21:21:12Z")

</div>

Do you have more of a stack trace there, try looking at all tabs, try visiting the error page

---

<div class="post-metadata">

### Author: ![Yuun](https://avatars.discourse-cdn.com/v4/letter/y/977dab/32.png) [@Yuun](https://meta.discourse.org/u/Yuun)
#### Post date: [2017年十一月27日 21:29 UTC](https://meta.discourse.org/t/wrong-account-avatar-after-upgrade/74886/5 "2017-11-27T21:29:19Z")

</div>

The only additional info I didn’t include was from the env tab:

```plaintext
hostname	sih-app
process_id	[29461, 29445, 29367, 29351]
application_version	[87ada55e677416713f24912487cde48221467b4d, c22f202e10dd70597f0e1afbd81b39f3b4f4e9c9]

```

Those 9 lines are all I see in the backtrace, though.

Can anonymous users see shared logs? Just in case, [link to the shared log on my forums](https://sih.onemadogre.com/logs/show/52b8069ad7615cafc064ea0c5361cb06). Nope, sure can’t.

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [2017年十一月27日 21:31 UTC](https://meta.discourse.org/t/wrong-account-avatar-after-upgrade/74886/6 "2017-11-27T21:31:49Z")

</div>

Actually … I just reproduced the issue … will get it fixed asap.

---

<div class="post-metadata">

### Author: ![jomaxro](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jomaxro/32/126216_2.png) [@jomaxro](https://meta.discourse.org/u/jomaxro)
#### Post date: [2017年十一月27日 21:33 UTC](https://meta.discourse.org/t/wrong-account-avatar-after-upgrade/74886/7 "2017-11-27T21:33:11Z")

</div>

> [@Yuun](#):
>
> Can anonymous users see shared logs?

To answer your question while Sam fixes the bug: no.

---

<div class="post-metadata">

### Author: ![Yuun](https://avatars.discourse-cdn.com/v4/letter/y/977dab/32.png) [@Yuun](https://meta.discourse.org/u/Yuun)
#### Post date: [2017年十一月27日 21:36 UTC](https://meta.discourse.org/t/wrong-account-avatar-after-upgrade/74886/8 "2017-11-27T21:36:36Z")

</div>

Yeah I just did some stellar detective work (logged out of my forums and clicked the link) to find that out myself. 😊

Thanks for looking into this @sam!

---

<div class="post-metadata">

### Author: ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)
#### Post date: [2017年十一月27日 21:45 UTC](https://meta.discourse.org/t/wrong-account-avatar-after-upgrade/74886/9 "2017-11-27T21:45:33Z")

</div>

> [@Yuun](#):
>
> (logged out of my forums and clicked the link)

Alternatively, you could just open a new **incognito** window in your favorite browser 😉

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [2017年十一月27日 21:58 UTC](https://meta.discourse.org/t/wrong-account-avatar-after-upgrade/74886/10 "2017-11-27T21:58:09Z")

</div>

Ugh this is a nasty bug any eta on fix @sam?

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [2017年十一月27日 22:00 UTC](https://meta.discourse.org/t/wrong-account-avatar-after-upgrade/74886/11 "2017-11-27T22:00:46Z")

</div>

Will be fixed in 3 hours, probably sooner.

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [2017年十一月27日 22:29 UTC](https://meta.discourse.org/t/wrong-account-avatar-after-upgrade/74886/12 "2017-11-27T22:29:40Z")

</div>

This should fix it, but if anything is cached on the CDN in incorrectly … I can not flush that.

[https://github.com/discourse/discourse/commit/ca7af7b88f2207cd7a1700c2a086459f619e4d6c](https://github.com/discourse/discourse/commit/ca7af7b88f2207cd7a1700c2a086459f619e4d6c)

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [2017年十一月27日 23:26 UTC](https://meta.discourse.org/t/wrong-account-avatar-after-upgrade/74886/13 "2017-11-27T23:26:12Z")

</div>

Is it looking correct now @Yuun ?

---

<div class="post-metadata">

### Author: ![Yuun](https://avatars.discourse-cdn.com/v4/letter/y/977dab/32.png) [@Yuun](https://meta.discourse.org/u/Yuun)
#### Post date: [2017年十一月27日 23:35 UTC](https://meta.discourse.org/t/wrong-account-avatar-after-upgrade/74886/14 "2017-11-27T23:35:11Z")

</div>

The avatars look correct on my current browser, but I’m getting a long list of `Failed to load resource: the server responded with a status of 500 ()` in my Chrome error log right now for each avatar it’s trying to load.

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [2017年十一月27日 23:35 UTC](https://meta.discourse.org/t/wrong-account-avatar-after-upgrade/74886/15 "2017-11-27T23:35:27Z")

</div>

Yeah I can see that, fixing.

Fixed per:

[https://github.com/discourse/discourse/commit/0caa335ef05b16af821012fa3b0bd4f5a5ac42d3](https://github.com/discourse/discourse/commit/0caa335ef05b16af821012fa3b0bd4f5a5ac42d3)

---

<div class="post-metadata">

### Author: ![Yuun](https://avatars.discourse-cdn.com/v4/letter/y/977dab/32.png) [@Yuun](https://meta.discourse.org/u/Yuun)
#### Post date: [2017年十一月28日 00:55 UTC](https://meta.discourse.org/t/wrong-account-avatar-after-upgrade/74886/16 "2017-11-28T00:55:44Z")

</div>

Hm, still getting the 500 errors on avatar load after updating to this commit.

Nevermind, appears to have stopped now. Browser cache thing?

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [2017年十一月28日 01:03 UTC](https://meta.discourse.org/t/wrong-account-avatar-after-upgrade/74886/17 "2017-11-28T01:03:30Z")

</div>

Yeah was cached super aggressively.

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [2017年十一月29日 07:00 UTC](https://meta.discourse.org/t/wrong-account-avatar-after-upgrade/74886/18 "2017-11-29T07:00:05Z")

</div>

This topic was automatically closed after 29 hours. New replies are no longer allowed.
