Amazon link preview works here but not on my forum

Hello everyone,
I don’t understand why I don’t see the preview of the amazon links.
Here it works perfectly but in my forum that I updated today ( 9581d71372 ) it doesn’t.
Can it be cloudflare’s fault?

When you’re writing a post, do you see an error like this in the preview?

There are some Amazon issues we’ve been running into where previews (oneboxes) have been hitting what seems to be a rate limit… we’ve made improvements in the past couple of weeks to try to avoid this, but it’s not completely solved and we’re looking for better options.

2 Likes

Thanks for your help Kris.

No, only a white box with Amazon


I also cleared the cloudflare cache.

PS. Here on meta works perfectly.

Sorry I forgot, this is the list of installed plugins.

I also tried on others Discorse forums and the preview doesn’t work, it only works here on meta :grin:

Nothing I give up … I have tried everything but I don’t understand what blocks the preview of the Amazon links.

OK I found other useful information, I am writing because it could be useful to someone…
The problem is the same:

If I run curl https://www.amazon.it/dp/B07YSF42TT -v -o deleteme I get error 503 so I give up.

Do you know if there is another way to add an image and a short description?

1 Like

We get the same thing on our Discourse (v2.7.0.beta7( 42f6c9b6b9 )) when trying to share Amazon links:

And in the composer view:

I just put it down to never-ending Amazon issues.

Unfortunately no, I think your VPS is also blacklisted :frowning_face:

Sorry, yes, that’s what I meant :slight_smile:

1 Like

Using curl -A "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:59.0) Gecko/20100101 Firefox/59.0" https://www.amazon.it/dp/B07YSF42TT works fine, but now… how to change onebox useragent?

Also curl https://www.amazon.it/dp/B07YSF42TT -v -o deleteme -H "User-Agent: Discourse Forum Onebox v2.7.0.beta7" works.

> GET /dp/B07YSF42TT HTTP/2
> Host: www.amazon.it
> accept: */*
> user-agent: Discourse Forum Onebox v2.7.0.beta7
>
{ [5 bytes data]
* Connection state changed (MAX_CONCURRENT_STREAMS == 128)!
} [5 bytes data]
< HTTP/2 200
< content-type: text/html
< content-length: 7132
< server: Server
< date: Fri, 23 Apr 2021 07:17:05 GMT
< x-amz-rid: ZF2YDC7CWESPKSJ09DD0
< vary: Content-Type,Accept-Encoding,X-Amzn-CDN-Cache,X-Amzn-AX-Treatment,User-Agent
< strict-transport-security: max-age=47474747; includeSubDomains; preload
< x-cache: Miss from cloudfront
< via: 1.1 be8ca88bcfbe9f1ac2e2b6bb9e74f1d6.cloudfront.net (CloudFront)
< x-amz-cf-pop: MXP64-C2
< x-amz-cf-id: DfPapjMoZ5xW3vRm5sEk9bzKKmnq5TCDvbEi6y7dg6DreupmoWH2Jg==
<
{ [7132 bytes data]
100  7132  100  7132    0     0  78373      0 --:--:-- --:--:-- --:--:-- 78373
* Connection #0 to host www.amazon.it left intact

I don’t understand where I’m wrong…


OK, it only works with amazon.com
.es, fr, de, it and others don’t work, it’s definitely a bug!

Cat GIF

Hi all, I have updated to version 9ebc9541b9 and now the preview works on all amazon sites!

Thanks :blush:

2 Likes

Agreed!

This was the magic sauce that fixed it for us too:

Thanks @jbrw :bowing_man:t2:

3 Likes

I recommend a posts:rebake to generate the preview even the old messages.

./launcher enter app
rake posts:rebake
1 Like

I would not recommend a rebake at all.

Amazon very will likely block your server IP address for hammering on their door.

We’ve been here, multiple times, with Amazon, YouTube and Instagram :confused:

3 Likes