Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Amplitude-js 8.21.4 breaks compatibility with safari 12 #576

Open
heyvard opened this issue Feb 1, 2023 · 4 comments
Open

Amplitude-js 8.21.4 breaks compatibility with safari 12 #576

heyvard opened this issue Feb 1, 2023 · 4 comments
Labels
bug Something isn't working

Comments

@heyvard
Copy link

heyvard commented Feb 1, 2023

8.21.4 includes a new version of filter-obj that uses the Optional chaining operator. This is not supported on safari 12 https://caniuse.com/mdn-javascript_operators_optional_chaining

Expected Behavior

The lib is usable for users on safari 12

Current Behavior

Our app crashes on users with ios 12 and safari 12

Possible Solution

Revert dependency upgrades in 8.21.4 ? Add meassaures to ensure compatibility

Steps to Reproduce

  1. Include 8.21.4 as a dependency in a simple next js app
  2. Deploy app
  3. Open app in safari 12 (I recommend browserstack)
  4. The app will not load, since it is not able to parse the javascript

Environment

  • JS SDK Version: 8.21.4
  • Installation Method: npm dependency i next js app
  • Browser and Version: Safari 12
@heyvard heyvard added the bug Something isn't working label Feb 1, 2023
@heyvard
Copy link
Author

heyvard commented Feb 1, 2023

This is using next 12.3.1.

@heyvard
Copy link
Author

heyvard commented Feb 1, 2023

It seems to only be a problem when using next.js . Using CRA it works.

@Golfenstein3D
Copy link

Golfenstein3D commented Feb 9, 2023

No next.js here. /node_modules/amplitude-js/amplitude.js bundled with my code and minified with uglify-js 3.16.1. Fails on if (descriptor?.enumerable) { in a function called includeKeys. Reverting to amplitude-js 8.21.3 fixed the issue. iOS 12.5.7 (highest available for iPod Touch - the unfortunately-discontinued, reasonably-priced QA device a.k.a. "phone for your kid").

@ngoctuan001
Copy link

We having the same problem , do you have any other alternatives, or is there any progress on this ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants