-
Notifications
You must be signed in to change notification settings - Fork 310
Uncaught Error: Zone.js has detected that ZoneAwarePromise #401
Comments
The issue sometimes appears in 0.0.39 too. Switch back to 0.0.44. The error occurs only with crosswalk. Without crosswalk, I'm not able to reproduce the error. ionic info Your system information: Cordova CLI: 6.4.0 |
I have the same issue which is reproducible even without crosswalk. Ionic info: Cordova CLI: 6.4.0 |
Same problem here, without crosswalk. It seems to be a race condition because it doesn't happen 100% of the time. Cordova CLI: 6.3.1 |
Any news on this? This happens to our app 8 out of 10 launches. It renders the app unusable as the app is not loaded after this error. I have found this related angular issue angular/zone.js#465 but the solution cannot be applied here as polyfills are added by the build system. |
Could you please provide us with the content of your index.html file? |
Sure here you go
|
Hello everyone! Are you guys using any third party libraries in your apps? And if so, what are they? |
@jgw96 here are our dependencies:
and here our plugins:
Also tried removing crosswalk (as it was mentioned it might be related) but that didn't make any difference. |
Please, be aware of cordova-plugin-inapppurchase plugin is broken. I opened an issue on ionic-native about this: danielsogl/awesome-cordova-plugins#810 I got rid of this issue by removing crosswalk and inapppurchase plugin supported by ionic-native. |
@cleever so you are saying that you have confirmed that this issue is caused by cordova-plugin-inapppurchase? I am confused, you removed crosswalk (why? was the issue still there after removing in-app-purchase?) also you are saying you removed in-app-purchase plugin (the actual plugin or just the wrapper code provided by ionic-native)? Can you please provide more info? |
My issue was also resolved once I fixed the broken cordova-plugin-inapppurchase plugin by installing the forked version listed in @cleever's issue. |
@masimplo Then I started investigating the packages and plugins I had recently installed. So I removed all the plugins and started installing them one by one and testing. Until isolating the in-app-purchase plugin. The problem is not the ionic-native wrapper. But the plugin itself. About crosswalk, I've not tested my app again with crosswalk. But like I said above, ZoneAwarePromise only appeared to me with crosswalk, without crowsswalk and with cordova-plugin-inapppurchase installed, the app show no errors, but it was completely unusable. |
I just tried running the app again after removing cordova-plugin-inapppurchase (nothing else changed, including using xwalk) and it now has started successfully 5/5 times (used to start 2 out of 10). So I guess it is safe to say that this plugin is solely responsible for this behaviour. @jgw96 and @jthoms1 thanks for picking this up so quickly after I asked for your attention on the matter, it is greatly appreciated. @cleever thanks for updating the issue with the actual cause. |
Great, So I'm closing this issue, because it not seems to be an app-script issue nor a crosswalk issue with new app-script versions. This is a cordova plugin issue. Thank you everyone. |
Uh oh!
There was an error while loading. Please reload this page.
Short description of the problem:
Prod build in a android device throw the following error at bootstrap time:
"Uncaught Error: Zone.js has detected that ZoneAwarePromise (window|global).Promise has been overwritten: Most likely cause is that a Promise polyfill has been loaded after Zone.js (Polyfilling Promise api is not necessary when zone.js is loaded. If you must load one, do so before loading zone.js.)"
Steps to reproduce:
npm install @ionic/[email protected] --save-dev
ornpm install @ionic/app-scripts@latest --save-dev
Run project on device:
ionic run android
Open the app.
The screen becomes white and app doesn't load.
Inspecting the device shows the error above.
Which @ionic/app-scripts version are you using?
ionic/app-scripts 0.0.44
Roll-backing to 0.0.39 (my safe zone) resolves the issue.
The text was updated successfully, but these errors were encountered: