Avatars became default after 2.2 beta upgrade - due to regression in azure blob plugin

Not sure what happened, but after upgrading to the latest beta, all custom user avatars are gone, replaced by a standard image of a light-gray user.

image

The default-generated avatars for users with no custom avatar uploads are not affected.

The image links to those avatars are:

https://xxxxx.com/user_avatar/xxx.com/user/50/179_2.png

EDIT: Uploading a new avatar image will show up. Therefore, all the previously-uploaded avatar images are all lost.

No, it just takes time for the images to re-optimize. See the other topic on this. Give it 24 hours.

5 Likes

I suppose you mean this one:

I’ll keep my fingers crossed for 24 more hours…

Yep, had the same issue after upgrade. 15 mins later the avatars were back.

3 Likes

Let us know if it is still an issue.

Half a day now and still the default pics…

Nope. It doesn’t go back to normal. All the avatars are still the default pics.

Any command line to manually rebuild them?

How is your sidekiq queue looking? Is it empty?

There is some nginx level caching if queue is empty go ahead and rebuild

Looks empty.

How should I rebuild? Do a “./launcher rebuild app”?

Quote avatars becoming default is probably due to:

Added bonus, stuff will run faster as well. Let me know how it goes.

4 Likes

Well, unfortunately, I did a ./launcher rebuild app and it is still showing the default pic.

So that’s not it.

Version is v2.2.0.beta7 +60

what is an example URL of a broken avatar? I want you to try some things.

1 Like

Sorry , I need the url on your site I want you to adjust numbers there to diagnose what is up

3 Likes

Hi,

If you need an example, I have the same problem on my site:

By the way, I experience another problem with links of pictures from Imgur or Flickr. The display is broken after 15 minutes and replaced by an unreachable item icon.

The installed version is v2.2.0.beta7 +42

If you edit loliver4’s profile and open the avatar selection screen, do you see it there? Is it using a local avatar or a gravatar?

Can you run

./launcher enter app
rails c
Upload.find(3262)

Is the file it is referencing in your file system? What is the size of the file?

Something is not right here…

Also seeing a redirect here:

http://libertysim.s3.dualstack.eu-west-3.amazonaws.com/original/2X/a/a5fce085968b65330ee85eec7ea8aac9aa2af9fa.jpeg

Did you move your S3 stuff around?

2 Likes

This particular topic is a bug in azure blob storage plugin, @vinothkannans is looking at it.

1 Like

Hi

[1] pry(main)> Upload.find(3262)
=> #<Upload:0x0000564ef0da8a00
 id: 3262,
 user_id: 2858,
 original_filename: "13962749_845715052226788_5249706654812763874_n.jpg",
 filesize: 60477,
 width: 360,
 height: 360,
 url: "//libertysim.s3.dualstack.eu-west-3.amazonaws.com/original/2X/7/71d87b34609aec9e248e7f9739daf0f970ac5a67.jpeg",
 created_at: Sun, 06 Jan 2019 05:30:22 UTC +00:00,
 updated_at: Sun, 06 Jan 2019 05:30:22 UTC +00:00,
 sha1: "71d87b34609aec9e248e7f9739daf0f970ac5a67",
 origin: nil,
 retain_hours: nil,
 extension: "jpeg",
 thumbnail_width: 360,
 thumbnail_height: 360,
 etag: "\"8cb513f4b9899fa26bb7de856c935c59\"">

No special change on S3 was done…

S3 response
<Error>
<Code>PermanentRedirect</Code>
<Message>
The bucket you are attempting to access must be addressed using the specified endpoint. Please send all future requests to this endpoint.
</Message>
<Endpoint>libertysim.s3.dualstack.eu-west-2.amazonaws.com</Endpoint>
<Bucket>libertysim</Bucket>
<RequestId>5353DFE7A14AB123</RequestId>
<HostId>
QDQ3mKgq95kH92AloN1gH+LwGIgP9FWq77ck5yHVKSoIXx14nqiGN3u5gjOwxegfd9zVb7nN0J4=
</HostId>
</Error>

As per the above response from S3 if I change the hostname to libertysim.s3.dualstack.eu-west-2.amazonaws.com then the URL is working. I’m not sure how it’s messed up. But it doesn’t look like a problem from Discourse side.

http://libertysim.s3.dualstack.eu-west-2.amazonaws.com/original/2X/a/a5fce085968b65330ee85eec7ea8aac9aa2af9fa.jpeg

3 Likes

Created a new PR to fix this issue

This bug is reproducible using the new rspec method which I added in discourse-azure-blog-storage plugin.

7 Likes