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

Imcompatibility with older iOS systems #133

Closed
Enngage opened this issue Apr 8, 2023 · 5 comments
Closed

Imcompatibility with older iOS systems #133

Enngage opened this issue Apr 8, 2023 · 5 comments

Comments

@Enngage
Copy link

Enngage commented Apr 8, 2023

Hey!

Thanks for this library! I just wanted to reach out that in our app (Angular) we found out that the version 3.0.4 is not working in iPhones 13 (or older) without applying the latest apple's update.

I don't really have much specifics, but basically what happened is that we upgraded anchorme from v2 to 3.0.4 and suddenly our app stopped working for some iPhone users. It basically broke the app entire angular build which prevented us from logging the error in the first place so it was difficult to debug. From the reports of our users we found out that this affected only users using iPhone 13 or older. However, if these users applied the latest Apple update (16.4.1), it started working again.

Also, if we downgraded anchorme from 3.0.4 to 2.1.2 it started working for all users again. Note that the downgrade in package.json was the only change we did.

It was really difficult to debug as we had literally no idea what was going on, but finally we were able to track it down to this library. It's not ideal as we've had to basically wait for users to report their issue and us asking them what device and platform they were using in order to track this one down.

Hopefully you can look at this to shed some more light or to prevent this from happening, cheers!

@o-alexandrov
Copy link

The actual error message in iOS browser is:

invalid regular expression: invalid group specifier name

@danspam
Copy link

danspam commented Apr 25, 2023

This is due to the lookbehind in the following regex:

export const final = `(?<=\\b|_)((${email})|(${file})|(${url}))(\\b)?`;

Safari iOS does not support them until v16.4 (released March 2023), according to caniuse: https://caniuse.com/js-regexp-lookbehind

@nfm
Copy link

nfm commented May 9, 2023

We just ran into this too and have had to revert back to the 2.x release of anchorme.

@farce1
Copy link

farce1 commented Jan 16, 2024

Also, if we downgraded anchorme from 3.0.4 to 2.1.2 it started working for all users again. Note that the downgrade in package.json was the only change we did.

This workaround seems to be still valid. Hopefully, a potential fix will be added someday.

@alexcorvi
Copy link
Owner

should be fixed in the latest version 3.0.7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants