Amplify-js: ES6 arrow function syntax breaking Internet Explorer 11 (IE11)

Created on 27 Apr 2020  路  13Comments  路  Source: aws-amplify/amplify-js

Describe the bug

Amplify does not work in Internet Explorer 11. It's possible this was broken by a dependency like @aws-sdk. It's unclear how to restore IE11 support to an application implementing Amplify.

To Reproduce

Repro available here: https://github.com/sawyerh/amplify-nextjs-ssr

Expected behavior
It's unclear what the official browser support is for Amplify, however the Amplify SDK previously worked in IE 11, and according to this comment AWS is still supporting IE11.

Screenshots
image

What is Configured?

"dependencies": {
    "aws-amplify": "3.0.9",
    "aws-amplify-react": "4.1.8",
    "next": "9.3.5",
    "react": "16.13.1",
    "react-dom": "16.13.1"
  }
aws-sdk-js bug

Most helpful comment

it seems there is one more package that got missed which targets ES2016 output https://github.com/aws/aws-sdk-js-v3/blob/v1.0.0-gamma.2/packages/middleware-serde/tsconfig.json#L3
I'll create an issue with aws-sdk to get this prioritized.

All 13 comments

Same as https://github.com/aws-amplify/amplify-js/issues/5405
The issue is with an upgrade of underlying aws-sdk that is exporting the package with ES2016 syntax https://github.com/aws/aws-sdk-js-v3/blob/v1.0.0-beta.5/packages/middleware-serde/tsconfig.json#L3 and there is an open issue related to this https://github.com/aws/aws-sdk-js-v3/issues/1099

I have the same issue, is there an older version that didn't had this problem?

Awaiting a version bump for https://www.npmjs.com/package/@aws-sdk/eventstream-serde-browser

Having same issue.
@ericclemmons
How long till the version bump?

Still an issue, I think. :/

  "dependencies": {
    ...
    "aws-amplify": "~3.0.12",
    "aws-amplify-angular": "~5.0.12",
    ...
  }

image

it seems there is one more package that got missed which targets ES2016 output https://github.com/aws/aws-sdk-js-v3/blob/v1.0.0-gamma.2/packages/middleware-serde/tsconfig.json#L3
I'll create an issue with aws-sdk to get this prioritized.

https://github.com/aws/aws-sdk-js-v3/pull/1245 has been merged - looks like this problem will be solved soon 馃憤

I bumped aws-amplify version up to 3.0.18, but still getting the same error.

image

I've also tried a variety of polyfills:

import "babel-polyfill"; 
import "promise-polyfill";
import "core-js/es/typed-array/uint32-array";
import "core-js/es/array/find";
import "core-js/es/object/assign";
import "core-js/es/object/entries";

Still not working. Any help would be appreciated!

I ended up removing this package and using a different solution for logging in AWS Cognito users

  • Amazon Cognito Auth (https://www.npmjs.com/package/amazon-cognito-auth-js)
    It works in IE 11.

"Amazon Cognito Auth" ^ is already archived. The module doesn't support PKCE, so I'd stick with amplify-js.

As it's mentioned, the latest aws sdk v1.0.0-gamma.3 release has the bugfix. It is now tagged to gamma. I resolved this issue by installing @aws-sdk/middleware-serde@gamma.

Resolving as this issue is in our latest release, 3.0.22

Awesome! Thank you!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

shinnapatthesix picture shinnapatthesix  路  3Comments

guanzo picture guanzo  路  3Comments

karlmosenbacher picture karlmosenbacher  路  3Comments

cgarvis picture cgarvis  路  3Comments

simon998yang picture simon998yang  路  3Comments