# Amazon Onebox Broken?

**URL:** https://meta.discourse.org/t/amazon-onebox-broken/199373
**Category:** Bug
**Created:** [August 5, 2021, 9:04pm UTC](https://meta.discourse.org/t/amazon-onebox-broken/199373 "2021-08-05T21:04:17Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![davidkingham](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/davidkingham/32/119528_2.png) [@davidkingham](https://meta.discourse.org/u/davidkingham)
#### Post date: [August 5, 2021, 9:04pm UTC](https://meta.discourse.org/t/amazon-onebox-broken/199373/1 "2021-08-05T21:04:17Z")

</div>

Seems to be broken even on meta…

> **[Amazon.com: Mad Max: Fury Road (3D Blu-ray + Blu-ray) : Tom Hardy, Charlize...](https://www.amazon.com/Mad-Max-Fury-Road-Blu-ray/dp/B00XQ141W8)**
>
> Mad Max: Fury Road (3D Blu-ray + Blu-ray)\]\]\>

> **[Mastering Composition: The Definitive Guide for Photographers: Garvey-Williams,...](https://www.amazon.com/Mastering-Composition-Definitive-Guide-Photographers/dp/1781450633)**
>
> Mastering Composition: The Definitive Guide for Photographers \[Garvey-Williams, Richard\] on Amazon.com. \*FREE\* shipping on qualifying offers. Mastering Composition: The Definitive Guide for Photographers

Produces:

 ![CleanShot 2021-08-05 at 15.04.28@2x](https://global.discourse-cdn.com/meta/original/3X/d/c/dcf50e5b411326b724d2c1ebf7c93fb96240b042.jpeg)

---

<div class="post-metadata">

### Author: ![Richie](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/richie/32/115110_2.png) [@Richie](https://meta.discourse.org/u/Richie)
#### Post date: [August 6, 2021, 10:30am UTC](https://meta.discourse.org/t/amazon-onebox-broken/199373/2 "2021-08-06T10:30:18Z")

</div>

Amazon seem to have removed their meta property `og:` tags.

 ![image](https://global.discourse-cdn.com/meta/original/3X/1/0/1062358cc9c79d302f7bca3f95e80179c23c6a2b.png)

---

<div class="post-metadata">

### Author: ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)
#### Post date: [August 6, 2021, 2:06pm UTC](https://meta.discourse.org/t/amazon-onebox-broken/199373/3 "2021-08-06T14:06:51Z")

</div>

It depends on the volume of links you are dealing with. If relatively few, consider getting yourself and affiliate account and use their affiliate links which include graphics (then earn a small peppercorn income to boot).

> [@How to insert Amazon iframe on posts](https://meta.discourse.org/t/how-to-insert-amazon-iframe-on-posts/187922/10):
>
> Sure, something like: \<sup\>\*(NB from admin: As an Amazon Associate I earn from qualifying purchases. Thanks for your support!)\* |Albott Pro Stunt Scooter| |:-:| |\<AMAZON LARGE IMAGE SNIPPET\>| One of the advantages of this approach btw, is Discourse keeps a counter by the image for the number of times it’s been clicked slight_smile rocket

I was considering integrating these affiliate snippets into our [Mentionables](https://meta.discourse.org/t/custom-mentionables/192948) plugin, but not had the funding/bandwidth to do this yet.

---

<div class="post-metadata">

### Author: ![sebastianh](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sebastianh/32/40415_2.png) [@sebastianh](https://meta.discourse.org/u/sebastianh)
#### Post date: [November 6, 2021, 6:42pm UTC](https://meta.discourse.org/t/amazon-onebox-broken/199373/4 "2021-11-06T18:42:34Z")

</div>

Oneboxing Amazon is plain horrible. Sometimes there is no nice previews generated, sometimes none at all, and what annoys me most right now but I can’t even identify the appropriate topic here, is that oneboxing Amazon Referall links will yield a result that bears not referall parameters when clicking on oneboxed elements…

---

<div class="post-metadata">

### Author: ![Richie](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/richie/32/115110_2.png) [@Richie](https://meta.discourse.org/u/Richie)
#### Post date: [November 6, 2021, 7:08pm UTC](https://meta.discourse.org/t/amazon-onebox-broken/199373/5 "2021-11-06T19:08:13Z")

</div>

I feel your pain. Its quite frustrating. Our members share multiple links to Amazon products with each other on a daily basis (not affiliate / referral, just ‘regular’ links) and we see very mixed results from sometimes working, other times not, it’s completely pot luck.

As per the many threads on this subject here though, the issue is not with Discourse it’s with Amazon.

What could Discourse do about it? 🤔

Without writing a dedicated scraper _just_ for Amazon and building a onebox the hard way, probably not a lot. And if they write one for Amazon it could be a floodgate situation where everyone is suddenly asking for every website to have some bespoke onebox code 😕

---

<div class="post-metadata">

### Author: ![sebastianh](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sebastianh/32/40415_2.png) [@sebastianh](https://meta.discourse.org/u/sebastianh)
#### Post date: [November 10, 2021, 9:36am UTC](https://meta.discourse.org/t/amazon-onebox-broken/199373/6 "2021-11-10T09:36:32Z")

</div>

> [@Richie](#):
>
> What could Discourse do about it?

I think consistency would help. So either not onebox it on principle and explain why, or do a very simple/basic box but definitely **NOT** change the Url or its parameters, that’s like taking money out of my purse…

---

<div class="post-metadata">

### Author: ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)
#### Post date: [November 10, 2021, 9:45am UTC](https://meta.discourse.org/t/amazon-onebox-broken/199373/7 "2021-11-10T09:45:25Z")

</div>

The issue is somewhat moot.

Oneboxing Amazon links is against the T&Cs of their affiliate agreement apparently. My account was closed once because of it. Apparently use of their logo in a way they don’t sanction is misuse of their trademark?

They are probably actively blocking some user agents from crawling.

The best solution is to use their affiliate snippets. Agree this is a bit of a manual pfaff.

Maybe someone could fund or write a plugin to insert these snippets if they could be retrieved by api?

If you are not an affiliate consider using my onebox assistant to improve the tag retrieve reliability.

---

<div class="post-metadata">

### Author: ![mstm](https://avatars.discourse-cdn.com/v4/letter/m/6de8d8/32.png) [@mstm](https://meta.discourse.org/u/mstm)
#### Post date: [February 15, 2022, 4:19pm UTC](https://meta.discourse.org/t/amazon-onebox-broken/199373/8 "2022-02-15T16:19:08Z")

</div>

After updating to 2.9.0.beta2 it no longer works… example:

`https://www.amazon.com/Venicor-Beware-Hamsters-Sign-Accessories/dp/B08HWGJMSH`

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [February 15, 2022, 6:12pm UTC](https://meta.discourse.org/t/amazon-onebox-broken/199373/9 "2022-02-15T18:12:08Z")

</div>

> [@sebastianh](#):
>
> I think consistency would help. So either not onebox it

You can add the amazon domain to the setting `blocked onebox domains`.

---

<div class="post-metadata">

### Author: ![supermathie](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/supermathie/32/507518_2.png) [@supermathie](https://meta.discourse.org/u/supermathie)
#### Post date: [February 16, 2022, 11:01pm UTC](https://meta.discourse.org/t/amazon-onebox-broken/199373/10 "2022-02-16T23:01:46Z")

</div>

2 posts were split to a new topic: [“blocked onebox domains” setting not respected](https://meta.discourse.org/t/blocked-onebox-domains-setting-not-respected/218479)

---

<div class="post-metadata">

### Author: ![mstm](https://avatars.discourse-cdn.com/v4/letter/m/6de8d8/32.png) [@mstm](https://meta.discourse.org/u/mstm)
#### Post date: [February 19, 2022, 7:55am UTC](https://meta.discourse.org/t/amazon-onebox-broken/199373/12 "2022-02-19T07:55:04Z")

</div>

Thanks, seems fixed now here on meta 😃

---

<div class="post-metadata">

### Author: ![dax](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/dax/32/244677_2.png) [@dax](https://meta.discourse.org/u/dax)
#### Post date: [February 20, 2022, 6:56pm UTC](https://meta.discourse.org/t/amazon-onebox-broken/199373/13 "2022-02-20T18:56:48Z")

</div>

Issue fixed per

[https://github.com/discourse/discourse/pull/15998](https://github.com/discourse/discourse/pull/15998)

---

<div class="post-metadata">

### Author: ![mcdanlj](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mcdanlj/32/131829_2.png) [@mcdanlj](https://meta.discourse.org/u/mcdanlj)
#### Post date: [February 21, 2022, 11:48pm UTC](https://meta.discourse.org/t/amazon-onebox-broken/199373/16 "2022-02-21T23:48:34Z")

</div>

Thank you! I was also experiencing no Amazon links oneboxing, and updating to tests-passed ([685d186351](https://github.com/discourse/discourse/commits/685d186351db94940cb3695e2d6f6b0144a620ee)) including that change that fixed most links for me when I rebuilt HTML for affected posts, except so far for one particular link:

> **[Lennox X7935 Carbon Clean Healthy Climate MERV 16 Filter (2 Pack) - Replacement...](https://www.amazon.com/Lennox-Carbon-Healthy-Climate-Filter/dp/B00E5G1K36)**
>
> Cartridge lasts up to one year. As with any filtration product, replacement life cycle depends on the individual conditions and needs of the home. Compatible with any HVAC system, no additional power source needed. Removes OVER 95% of particles...

I had already rebuilt redis as part of the update, but then in case of a transient error I also tried removing the onebox cache using redis-cli and rebuilding HTML again:

```plaintext
# redis-cli 
127.0.0.1:6379> keys *CACHE:onebox__https://www.amazon.com/dp/B00E5G1K36
1) "default:_CACHE:onebox__https://www.amazon.com/dp/B00E5G1K36"
127.0.0.1:6379> del default:_CACHE:onebox__https://www.amazon.com/dp/B00E5G1K36
(integer) 1
127.0.0.1:6379> keys *CACHE:onebox__https://www.amazon.com/dp/B00E5G1K36
(empty array)

```

(rebuild HTML)

```plaintext
127.0.0.1:6379> keys *CACHE:onebox__https://www.amazon.com/dp/B00E5G1K36
1) "default:_CACHE:onebox__https://www.amazon.com/dp/B00E5G1K36"

```

At least for me, on my site, that has remained a bare link, not boxed in any way. So this post is both a possible bug report and a test whether meta, presumably running similar code, is similarly affected. ☺

(For reference: the single post with both working and not-working oneboxing after rebuilding HTML is at [Indoor return laser fume handling? - #7 by mcdanlj - Lasers - Maker Forums](https://forum.makerforums.info/t/indoor-return-laser-fume-handling/84970/7?u=mcdanlj))

Before applying this update, I saw `Failed to onebox https://www.amazon.com/dp/B00E5G1K36 response size too big` in log/rails/production.log but I don’t see any errors there when I try to rebuild html after deleting the item from the redis onebox cache. So it’s clearly something else.

---

<div class="post-metadata">

### Author: ![dax](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/dax/32/244677_2.png) [@dax](https://meta.discourse.org/u/dax)
#### Post date: [February 22, 2022, 12:09pm UTC](https://meta.discourse.org/t/amazon-onebox-broken/199373/17 "2022-02-22T12:09:27Z")

</div>

The error I see for that link or this link `https://www.amazon.com/Lennox-Carbon-Healthy-Climate-Filter/dp/B00E5G1K36` is:

`Sorry, we were unable to generate a preview for this web page, because the following oEmbed / OpenGraph tag could not be found: description`

but checking Iframely I can see the correct `og` tags:

```plaintext
{
  "url": "https://www.amazon.com/dp/B00E5G1K36/ref=tsm_1_fb_lk",
  "title": "Lennox X7935 Carbon Clean Healthy Climate MERV 16 Filter (2 Pack)",
  "description": "Lennox X7935 Carbon Clean Healthy Climate MERV 16 Filter (2 Pack)",
  "image": "https://images-na.ssl-images-amazon.com/images/I/515Mvu2sfzL._SR600,315_PIWhiteStrip,BottomLeft,0,35_PIStarRatingFIVE,BottomLeft,360,-6_SR600,315_ZA383,445,290,400,400,AmazonEmberBold,12,4,0,0,5_SCLZZZZZZZ_FMpng_BG255,255,255.jpg"
}

```

@jamie.wilson

---

<div class="post-metadata">

### Author: ![mcdanlj](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mcdanlj/32/131829_2.png) [@mcdanlj](https://meta.discourse.org/u/mcdanlj)
#### Post date: [February 23, 2022, 1:31pm UTC](https://meta.discourse.org/t/amazon-onebox-broken/199373/18 "2022-02-23T13:31:34Z")

</div>

Found another similar link that appears to be broken in the same way, in case it is useful to have extras for debugging without having to clear caches…

`https://www.amazon.com/gp/product/B07FQ7M16H `

> **[REXBETI Double Head Sheet Nibbler Metal Cutter, Quality Nibbler Drill Attachment...](https://www.amazon.com/REXBETI-Nibbler-Quality-Attachment-Straight/dp/B07FQ7M16H)**
>
> REXBETI Metal Nibbler

---

<div class="post-metadata">

### Author: ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)
#### Post date: [February 23, 2022, 1:40pm UTC](https://meta.discourse.org/t/amazon-onebox-broken/199373/19 "2022-02-23T13:40:48Z")

</div>

Both of those last two links are working for me, are you sure you aren’t just being blocked by Amazon?

---

<div class="post-metadata">

### Author: ![mcdanlj](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mcdanlj/32/131829_2.png) [@mcdanlj](https://meta.discourse.org/u/mcdanlj)
#### Post date: [February 24, 2022, 1:21am UTC](https://meta.discourse.org/t/amazon-onebox-broken/199373/20 "2022-02-24T01:21:35Z")

</div>

@merefield given that both of the failing links fail both here and on Maker Forums, and that simultaneously other links now (after the request size limit increase to 5MB) work on both sites, that seems unlikely to me.

---

<div class="post-metadata">

### Author: ![dax](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/dax/32/244677_2.png) [@dax](https://meta.discourse.org/u/dax)
#### Post date: [March 7, 2022, 7:00am UTC](https://meta.discourse.org/t/amazon-onebox-broken/199373/21 "2022-03-07T07:00:28Z")

</div>

This topic was automatically closed after 14 days. New replies are no longer allowed.

---

<div class="post-metadata">

### Author: ![jamie.wilson](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jamie.wilson/32/185466_2.png) [@jamie.wilson](https://meta.discourse.org/u/jamie.wilson)
#### Post date: [March 7, 2022, 7:39pm UTC](https://meta.discourse.org/t/amazon-onebox-broken/199373/22 "2022-03-07T19:39:00Z")

</div>

> **[REXBETI Double Head Sheet Nibbler Metal Cutter, Quality Nibbler Drill Attachment...](https://www.amazon.com/REXBETI-Nibbler-Quality-Attachment-Straight/dp/B07FQ7M16H)**
>
> REXBETI Metal Nibbler

The Amazon links that were failing to Onebox, such as the `https://www.amazon.com/gp/product/B07FQ7M16` example posted by @mcdanlj, should now render correctly.

---

<div class="post-metadata">

### Author: ![jamie.wilson](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jamie.wilson/32/185466_2.png) [@jamie.wilson](https://meta.discourse.org/u/jamie.wilson)
#### Post date: [March 7, 2022, 7:39pm UTC](https://meta.discourse.org/t/amazon-onebox-broken/199373/23 "2022-03-07T19:39:10Z")

</div>



[Next page](https://meta.discourse.org/t/amazon-onebox-broken/199373.md?page=2)
