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/plugin-session-replay-browser does not support older Safari versions (<17) #820

Closed
markmssd opened this issue Jul 24, 2024 · 4 comments
Labels
bug Something isn't working sessionreplay

Comments

@markmssd
Copy link

Expected Behavior

It should load on older Safari browsers too (<16)

Current Behavior

It crashes with error

SyntaxError: Invalid regular expression: invalid group specifier name

Here's a related SO post: https://stackoverflow.com/questions/51568821/works-in-chrome-but-breaks-in-safari-invalid-regular-expression-invalid-group

Possible Solution

Compile rrweb and rrweb-snapshot properly in @amplitude/plugin-session-replay-browser should fix the issue.

Steps to Reproduce

Using @amplitude/analytics-browser, @amplitude/plugin-web-attribution-browser, or @amplitude/experiment-js-client causes no issues. When we use @amplitude/plugin-session-replay-browser, it causes the problem.

I boiled it down to the amplitude/rrweb dependency, which does not support older browser versions. You can see at https://browsersl.ist/#q=%22browserslist%22%3A+%5B%0A++%22defaults%22%2C%0A++%22not+op_mini+all%22%0A%5D that Safari <17 are not supported.

Environment

  • JS SDK Version: 2.9.3
  • Installation Method: Yarn
  • Browser and Version: Safari 16
@markmssd markmssd added the bug Something isn't working label Jul 24, 2024
@lewgordon-amplitude
Copy link

Hey @markmssd thanks for reporting this. We think we may have a fix for this and will be looking into this soon!

@markmssd
Copy link
Author

markmssd commented Aug 2, 2024

Awesome thanks! Let me know if I can provide more details to help :)

@kwalker3690
Copy link

This has been fixed in the latest version!

@markmssd
Copy link
Author

Thanks @kwalker3690 and @lewgordon-amplitude ! It's indeed working properly now. There is still the issue happening, around ~20x a day instead of thousands, but I personally can't reproduce anymore. I'm suspecting Ad Blockers blocking some scripts and causing this maybe?

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

No branches or pull requests

3 participants