Toast throwing Error after disappearing


#1

hey, i am trying out the toast when using it in the following way:

          let toastSuccess = Toast.create({
            message: 'Login success',
            duration: 3000
          });
          this.nav.present(toastSuccess);

the toast is showing up, disappearing after 3 seconds and then i got the following output in my cli:

24    725285   group    EXCEPTION: Error: More tasks executed then were scheduled.
25    725289   error    EXCEPTION: Error: More tasks executed then were scheduled.
26    725300   error    STACKTRACE:
27    725304   error    Error: More tasks executed then were scheduled.
    at ZoneDelegate._updateTaskCount (http://192.168.178.102:8100/build/js/angular2-polyfills.js:398:24)
    at ZoneDelegate.invokeTask (http://192.168.178.102:8100/build/js/angular2-polyfills.js:369:27)
    at Zone.runTask (http://192.168.178.102:8100/build/js/angular2-polyfills.js:263:48)
    at ZoneTask.invoke (http://192.168.178.102:8100/build/js/angular2-polyfills.js:431:34)
  -------------   Elapsed: 3067 ms; At: Tue May 03 2016 13:42:02 GMT+0200 (CEST)   -------------
    at Object.Zone.longStackTraceZoneSpec.onScheduleTask (http://192.168.178.102:8100/build/js/angular2-polyfills.js:1354:23)
    at ZoneDelegate.scheduleTask (http://192.168.178.102:8100/build/js/angular2-polyfills.js:342:50)
    at Zone.scheduleMacroTask (http://192.168.178.102:8100/build/js/angular2-polyfills.js:283:40)
    at http://192.168.178.102:8100/build/js/angular2-polyfills.js:133:26
    at setTimeout (eval at createNamedFn (http://192.168.178.102:8100/build/js/angular2-polyfills.js:973:18), <anonymous>:3:37)
    at ToastCmp.onPageDidEnter (http://192.168.178.102:8100/build/js/app.bundle.js:62372:17)
    at ctrlFn (http://192.168.178.102:8100/build/js/app.bundle.js:53163:38)
    at Toast.ViewController.didEnter (http://192.168.178.102:8100/build/js/app.bundle.js:53110:9)
28    725313   groupEnd
29    725319   error    Uncaught Error: More tasks executed then were scheduled., http://192.168.178.102:8100/build/js/app.bundle.js, Line: 75685

by what, do you think, is this error caused? how can i avoid it?

thanks in advance.


Can't trace runtime errors because of bundled js file
#2

It seems to be caused by an Angular/zone.js issue which should be already resolved:

At least it’s not reproducible in a basic demo plunker based on Ionic 2.0.0-beta.6.

Therefore I guess that updating your project to beta.6 should solve the problem.