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

In IE11 resolve is not always executed #533

Closed
petronellius opened this issue Jun 12, 2017 · 4 comments · Fixed by #575
Closed

In IE11 resolve is not always executed #533

petronellius opened this issue Jun 12, 2017 · 4 comments · Fixed by #575

Comments

@petronellius
Copy link

Our app is making scheduled request every N seconds. After some time IE11 stops doing requests.
I try to search web and it looks like there is a bug in IE11. It does not handle XHR callbacks properly.
See similar issue on bluebird repository.
So I try workaround - wrap resolve to setTimeout and it works.

@mislav
Copy link
Contributor

mislav commented Jun 12, 2017

Thanks for letting us know. Unfortunately, I don't think there is anything we can do here to fix IE behavior, sans wrapping every XHR call in an arbitrary setTimeout. We won't do that, because if we choose a value for the timeout e.g. 10 seconds, then we prevent everyone from making requests that may take longer than 10 seconds.

The workaround which you can do in your project is wrapping all your fetch calls in a Promise-based timeout helper as suggested here.

@mislav mislav closed this as completed Jun 12, 2017
CrOrc added a commit to CrOrc/fetch that referenced this issue Oct 23, 2017
@CrOrc
Copy link
Contributor

CrOrc commented Oct 24, 2017

Please reopen this issue.

This issue is not about making XHR call in setTimeout but about resolving Promise with results from completed XHR.

In IE 11 calling resolve within XHR onload handler may hang indefinitely if there's no active DOM operations. But calling resolve within setTimeout works fine.

@mislav
Copy link
Contributor

mislav commented Oct 27, 2017

Ah, I realize now what the OP was proposing above. Thanks for providing more information.

@mislav mislav reopened this Oct 27, 2017
@CrOrc CrOrc mentioned this issue Oct 27, 2017
@ADagen
Copy link

ADagen commented Dec 18, 2017

Hey guys, let's move on.

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

Successfully merging a pull request may close this issue.

4 participants