-
Notifications
You must be signed in to change notification settings - Fork 136
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
[BUG] IntersectionObserver not polyfilled on iOS device #302
Comments
This is now fixed -- polyfillpolyfill/polyfill-service#1936 (comment) |
@JakeChampion unfortunately it is not fixed. Calling the service (https://polyfill.io/v3/polyfill.js?features=IntersectionObserver) using the |
It's probably caused by the user agent being recognised as
|
I checked the error log and these are the user agent strings that still produce errors (do not get polyfilled):
Note that the fix you linked did solve a few of the reported errors. This one for example does get polyfilled: So I think the detection script parses the |
@JakeChampion Can you please reopen this ticket? Or should this ticket be moved to another repository? |
Ahh, I think the problem is most likely in one of these libraries: https://github.com/Financial-Times/polyfill-useragent-normaliser When I have some extra time I will try to get them running locally and hopefully eventually be able to get you a pull request. |
Hmm, the problem seems to be even deeper: https://github.com/ua-parser/uap-core This is from their tests: - user_agent_string: 'Mozilla/5.0 (iPod touch; CPU iPhone OS 9_3_2 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) Mobile/13F69'
family: 'Mobile Safari UI/WKWebView'
major: '9'
minor: '3'
patch: '2' The OS version is used as the browser version. If you check any of the online user agent string analysers you get some mixed results about the version:
https://en.wikipedia.org/wiki/Safari_version_history does not contain enough information either. Here they state that the mobile safari version would probably be |
I have files an issue at |
@JakeChampion there seems to be no activity in https://github.com/ua-parser/uap-core Since you did most work on https://github.com/Financial-Times/polyfill-useragent-normaliser, do you have a suggestion on how to proceed? With iOS reaching version 12 the problem of the Safari version being detected as the iOS version becomes greater. Over time more modern feature polyfills will not be served. |
Sorry to bother you, still need some advise. |
I got a response, created a pull request: ua-parser/uap-core#458 |
Sorry for lack of communication on this @EECOLOR, if you give me a list of user-agent string and what you want them parsed as, I will add them to both: |
@JakeChampion no worries, it happens.
If you check https://github.com/ua-parser/uap-core/pull/458/files you can see what I changed, which is essentially: "don't assume the OS version is the browser version for Apple devices". The pull request (the changes) also contains user agent strings and expected versions. |
@JakeChampion The pull request to uap-core has been merged. |
@JakeChampion any indication on when you can integrate the changes? |
@JakeChampion now that uap-core has been merged, should I open a ticket at the useragent_parser or will you handle it from here? |
I've made a PR for it, Financial-Times/useragent_parser#42 |
@JakeChampion for some reason that pull request does not include the correct changes. You can see it if you search for If you look it up here you see it is undertermined: https://github.com/ua-parser/uap-core/blob/master/tests/test_ua.yaml |
@EECOLOR This is the one :-) Financial-Times/useragent_parser#43 |
@EECOLOR I actually figured out how to detect the correct Safari version based on the AppleWebkit token in the useragent string so I went with that instead |
@JakeChampion Great! Where did you find that information? |
These all now work 🎉 I'll be closing this issue now as I've confirmed all useragents which were not working for IntersectionObserver now are. If you find others, please feel free to comment back on this issue and I can reopen it, or we can start a new issue :-) |
@JakeChampion Thanks for the effort Jake, this was a tricky one! |
What
I am receiving reports of the following error:
My polyfill request looks like this: https://polyfill.io/v3/polyfill.js?unknown=polyfill&features=default%2CSymbol%2Cfetch%2CArray.prototype.find%2CIntersectionObserver%2CWeakSet%2Ces2015%2Ces2016%2Ces2017&flags=gated
The user agent string:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/12.1.2 Safari/605.1.15
When I call the service with my user agent string spoofed I am receiving the following header in the javascript file:
A search in the rest of the file however shows no sign of
IntersectionObserver
.It might be related to: #285
The text was updated successfully, but these errors were encountered: