newuser-2267e78f-9635-4fe8-bb0d-23098bd32d89 avatar image

Amazon Login JS SDK breaking when loading on a page with RequireJS

We use the Login With Amazon JS SDK on our login page.

Within the last 24 hours we've started receiving errors on our login pages that reference the Amazon Login JS SDK:

Error: Mismatched anonymous define() module: function (){return Z}

This happens intermittently, around 50% of the time a page loads in Chrome, and nearly 100% of the time on Safari. Removing the Amazon Login JS SDK from the page fixes the issue.

This is preventing all of our own JS on the page from working. We use RequireJS to load our own JS files.

I believe this is an issue because of these lines of code at the bottom of the Amazon Login JS SDK:

"function" === typeof define && define([], function() {
    return Z

On our page we do have a function named define, which is provided by RequireJS. Amazon's SDK attempts to invoke this function, and if it does this before our own code, the above error is shown and prevents all of our own code from loading, thus breaking our entire login page.

This is occurring with the ABMNZN SDK 2020-07-28-6xpzxs20 version of the SDK.

login with amazon
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

0 Answers