-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Firefox: calling resolve() don't resolve then() #1022
Comments
I just wanted to update you that although no one commented yet we're debating how to fix this. You can work around it by calling |
Thank you, it works. I'm using |
@toverux a synchronus scheduler is problematic since it can break some invariants about promises like the order of things. You can use |
Ok, thank you for your help :) |
Hello, I'm affected by this issue as well. I've adopted Bluebird because it was cross browser and I'd hate to have this be an issue. I was able to workaround by the above or using setTimeout, which I am not in favor of. I would like to see a fix for this in the library, so my code is not having to use workarounds everywhere. I understand bluebird is fast, but fast means nothing if not reliable. Workarounds throughout my codebase means i might as well use alternative libraries. |
I cannot reproduce on firefox 45 |
I just want to add I'm also seeing a weird bug that just started with iOS 9.3 mobile iPhone that may be related. As soon as i updated code that was working find before stopped working. Tracing it down it seems like there is some race condition or something causing promises to not return. Here's my basic code:
I can get the "before" to consistently log, but sometimes the "after" doesn't. And as soon as it fails, there is no recovery. In my specific situation, i'm actually using HammerJS with a swipe and taps in a Cordova App that triggers this race condition. I don't know if that related but I thought it might help. Again, as soon as I updated to iOS9.3 it just basically stopped working correctly. |
Just a followup, I changed my code to new Promise(function(resolve, reject) { resolve() }).then(...) but was still having issues with the promise not resolving. As suggested above I'm now wrapping all resolve()'s in timeouts like new Promise(function(resolve, reject) { This seems to fix the issue, but now i have wrap all the all the resolve / rejects to make sure this race condition does't happen. |
@petkaantonov Will try that asap. Thank you! |
I'm using BlueBird version 3.3.3.
Platform: Ubuntu with Firefox 45 / Chromium 48
When I call
resolve()
, the promise listener registered with.then()
is never called on Firefox, but it is on Chromium.Relevant code :
By tracing the code with some console.logs, I see that the
resolve
inmakeSilent
is called, but after that, nothing more happens. No errors in the console.I also tried to remove
makeSilent
by replacing.click(makeSilent(resolve))
with.click(resolve)
, but it's doesn't work too.The text was updated successfully, but these errors were encountered: