Amazon links are failing to onebox

Amazon links are failing to onebox with a 503 error. This was reported on a customer’s site. I’m able to reproduce the issue on Meta and on our sandbox site: Amazon onebox tests - Demo. I’ve tested on the sandbox site just in case false positive results are returned on Meta due to cached oneboxes. The link below should show the issue though:

https://www.amazon.com/Moog-Grandmother-Semi-Modular-Keyboard-Synthesizer/dp/B07FJF9TLJ/ref=pd_sbs_5

https://www.amazon.com/Moog-Grandmother-Semi-Modular-Keyboard-Synthesizer/dp/B07FJF9TLJ/ref=pd_sbs_5

On my local development site, the above link is converted to a onebox without any issue. Possibly the problem on production sites is related to the onebox user agent. I don’t think that user agent gets set in development mode.

4 Likes

Onebox does currently send a custom user agent when making requests on various Amazon sites. However, we’re sending a very old user agent which wouldn’t be commonly seen.

I’ve created a simple PR to update the user agent to a more modern one. This may help with the 503 errors.

Please note, however, that during manual testing of this change I couldn’t establish a clear pattern of what was triggering the 503s. In many cases, sending the old user agent would result in a 503 - but sometimes it wouldn’t. Therefore, I wouldn’t guarantee that this will fix the problem, but I think it will go some way to helping reduce the number of errors.

7 Likes

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