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

Fix issue #533 #575

Merged
merged 5 commits into from Jun 1, 2020
Merged

Fix issue #533 #575

merged 5 commits into from Jun 1, 2020

Conversation

Copy link
Contributor

@CrOrc CrOrc commented Oct 23, 2017

As stated in petkaantonov/bluebird#1161, resolving a promise in an XHR callback without active DOM operations will not trigger the promise chain to execute. But wrapping fetch promise resolution in setTimeout magically resolves it.

Experienced this issue with different promise polyfills: bluebird, es6-promise, core-js/fn/promise

Adding setTimeout fixes #533.

@xemasiv
Copy link

@xemasiv xemasiv commented Nov 2, 2017

👍 for this

@ADagen
Copy link

@ADagen ADagen commented Dec 18, 2017

Hey guys, let's move on.

@wmertens
Copy link

@wmertens wmertens commented Mar 17, 2018

👍 looks great, we still have to support IE11 so I don't understand why this is not merged?

jamiekemp pushed a commit to jamiekemp/fetch that referenced this issue Sep 12, 2018
@ILoveITScience
Copy link

@ILoveITScience ILoveITScience commented Jan 8, 2019

Whats the status of the issue? We also have to suport IE 11 and need this fix.

@wmertens
Copy link

@wmertens wmertens commented Jan 8, 2019

@mislav what is your opinion of this?

@ILoveITScience
Copy link

@ILoveITScience ILoveITScience commented Jan 9, 2019

I'm testing https://github.com/stefanpenner/es6-promise at the moment. It seem to fix my problem.

@dasa
Copy link

@dasa dasa commented Jan 9, 2019

This may no longer be an issue in newer versions of IE 11. I'm not able to repo using the test at: https://github.com/lowkay/MutationObserverSchedulerBug

@CrOrc
Copy link
Contributor Author

@CrOrc CrOrc commented Mar 13, 2019

Errors in build are not caused by my changes

HeadlessChrome 73.0.3683 (Linux 0.0.0) native Response default status is 200 OK FAILED
HeadlessChrome 73.0.3683 (Linux 0.0.0) native Response default status is 200 OK when an explicit undefined status code is passed FAILED

Default native response statusText is '' instead of 'OK' for (Headless)Chrome 73.0.3683.
Everything seems to work for HeadlessChrome 72.0.3626 (Windows 7.0.0).

See Chromium Issue 907441: Change Response's statusText's default

@CrOrc
Copy link
Contributor Author

@CrOrc CrOrc commented Mar 14, 2019

See #696 Change Response's statusText's default

@superzadeh
Copy link

@superzadeh superzadeh commented Sep 24, 2019

Any update on this? I'm also running into the bug described in #533 and would need this. I know IE is never fun, but our customers don't have a choice unfortunately.

@nomnom11
Copy link

@nomnom11 nomnom11 commented Sep 24, 2019

what is this problem

@JakeChampion JakeChampion merged commit 74e4fe8 into github:master Jun 1, 2020
1 check was pending
@CrOrc CrOrc deleted the CrOrc-fix-resolve-IE-11 branch Jun 14, 2020
@ntucker
Copy link

@ntucker ntucker commented Feb 22, 2021

This breaks jest timer mocks

@ntucker
Copy link

@ntucker ntucker commented Feb 22, 2021

setTimeout() here is only called after resolution. but the promise exposed here doesn't resolve until after it is finished. Therefore, there's no way to tell jest to advance the setTimeout timer, since it isn't a timer to advance until a time to which there is no user level hookup

Copy link

@aldarmak aldarmak left a comment

Is it the key

@github github locked as resolved and limited conversation to collaborators Apr 9, 2021
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 this pull request may close these issues.