-
Notifications
You must be signed in to change notification settings - Fork 26
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
The present-but-broken AbortController was fixed in Safari Technology Preview Release 74 #26
Comments
Ah right, if AbortController is fully working in the stable version; the polyfill needs to detect the working AbortController implementation and not install itself over it (while still installing itself on top of the broken AbortController versions in earlier Safari versions). PR welcome if you're up for it and otherwise I will take a look at this later at some point. |
…ri and Technology Preview. Starting from version 12.2 the Safari will ship the implemented version of the abordable fetch API
…ri and Technology Preview. Starting from version 12.2 the Safari will ship the implemented version of the abordable fetch API
…ri and Technology Preview. Starting from version 12.2 the Safari will ship the implemented version of the abordable fetch API
…ri and Technology Preview. Starting from version 12.2 the Safari will ship the implemented version of the abordable fetch API
I have created a fix that is checking the version of the Safari browser on desktop and also checks if we use iOS mobile device. |
Could we justify avoiding this extra complexity by just assuming that since Safari has now fixed their regression of a broken implementation, that eventually (soon) all users will be on a corrected Safari and thus we don't need to patch Safari at all? |
I guess we could if we are fine with shipping broken polyfill for the Safari const isAbortBrokenPromise = new Promise((resolve, reject) => {
const controller = new AbortController();
controller.abort();
fetch('/', {
signal: controller.signal,
}).then(resolve, reject);
});
isAbortBrokenPromise.then(
() => console.log('broken'),
() => console.log('not broken')
); |
If I understand you correctly, I think what I'm suggesting is different. It's going back to how this polyfill worked before the reported breakage in 12.0.2. In other words, this polyfill would still patch Safari 11 (since it has no And in 12.0.2-12.0.3, where the broken So it's really only breakage in that version window of 12.0.2-12.0.3 or whatever. And I was asking if that breakage could be tolerable, given that most users will fairly quickly be upgraded to a Safari version that has a working |
Sorry, my bad. The Safari 11 indeed doesn't ship the native
I will leave answering that question to the author of the polyfill. In my opinion, this might be problematic for some time only. |
Same issues in iOS 12.2 beta :( Hope guys can fix it. |
… Safari 12.0.x, 12.1.x specifically but not >= 12.2 The native AbortController in Safari 12.2 and above works (starting with Safari Technology Preview Release 74) so the polyfill should not install for these versions. The latest versions of Chrome/Firefox for IOS still have the "present but broken" native AbortController so always polyfill over their native implementations for now (the symptom otherwise is that cancelling never works, the HTTP call happens even if the .abort() happens before the fetch() and the fetch promise is not rejected. This commit fixes github issue #26
Fixed on master now and released to npm as v1.2.3 The fixed version should "just work" on all browsers / browser versions, including Safari 12.0.x, 12.2 etc and Chrome/Firefox for IOS. Please file another github ticket if you find any remaining issue for some browser / browser version. |
Problem still here... Also, this solution looks kinda... broken to me:
I mean, what will happen, when new Safari version will appear - new release? Maybe, it is better to think of other solution here... |
@kgusarov this fix handles the broken AbortController in 12.1.x and also in all 12.2.x releases (even future point releases and major releases). When a stable 12.3 is released it will have the working native AbortController. So the fix should work for your 12.1 release too. Can you enter "navigator.userAgent" into the devtools console and paste the output here? |
@mo |
@kgusarov do you have any "user agent switching" browser extension installed or some "privacy / anti tracking" browser extension that prevents JS from reading navigator.userAgent? I assume you have already double checked that you really have version 1.2.3 and that there isn't some cache issue that prevents the latest version of the polyfill from loading. |
@mo this problem is on our client's laptop, he was nice enough to bring to our office(!) for us to check the problem. No extensions are used there, and even dev tools were initially disabled. We checked everything, and the fix still doesn't work. |
Thanks for fixing the polyfill. |
The upcoming new version of Safari will ship the native Abordable Fetch controller. The latest preview release 74 released recently has fixed the missing API:
https://developer.apple.com/safari/technology-preview/release-notes/
The reported issue #23 and #24 pull requests weter supposed to fix the broken API, but in the recent version of Safari Preview, the polyfill brakes the browser runtime.
The text was updated successfully, but these errors were encountered: