Ionic-framework: RC4 toast with duration produces "Error: Uncaught (in promise): false"

Created on 21 Dec 2016  路  4Comments  路  Source: ionic-team/ionic-framework

Ionic version: (check one with "x")
[ ] 1.x
[x] 2.x

I'm submitting a ... (check one with "x")
[ x] bug report
[ ] feature request
[ ] support request => Please do not submit support requests here, use one of these channels: https://forum.ionicframework.com/ or http://ionicworldwide.herokuapp.com/

Current behavior:

I use ToastController to create toast with duration. After update to rc4 I got "Error: Uncaught (in promise): false" when duration timeout is expired:
Error: Uncaught (in promise): false
at resolvePromise ([email protected]:468)
at resolvePromise ([email protected]:453)
at zone.[email protected]:502
at ZoneDelegate.invokeTask ([email protected]:265)
at Object.onInvokeTask (unpkg.com/@angular/[email protected]/bundles/core.umd.js:5966)
at ZoneDelegate.invokeTask ([email protected]:264)
at Zone.runTask ([email protected]:154)
at drainMicroTaskQueue ([email protected]:401)
at HTMLDivElement.ZoneTask.invoke ([email protected]:339)

If you use IonicErrorHandler for ErrorHandler provider ({ provide: ErrorHandler, useClass: IonicErrorHandler }), this error is catched and shown always.

Expected behavior:
When I create toast with duration, I expect no error.

Steps to reproduce:

Open
http://plnkr.co/edit/rgLbhN7Voq8PBLTI0bEx?p=preview

Open developer tools to see console log.
Click on button with "CLICK ME" and on dismissing the toast you will error.

Related code:

let toast = this.toastController.create({
          message: `Hi! I am here!`,
          duration: 2000,
          dismissOnPageChange: true
        });
    toast.present();

Other information:

Ionic info: (run ionic info from a terminal/cmd prompt and paste output below):

Your system information:

Cordova CLI: 6.4.0
Ionic Framework Version: 2.0.0-rc.4
Ionic CLI Version: 2.1.17
Ionic App Lib Version: 2.1.7
Ionic App Scripts Version: 0.0.47
ios-deploy version: Not installed
ios-sim version: Not installed
OS: Windows 7
Node Version: v6.9.1
Xcode version: Not installed

Most helpful comment

Known problem RC4
https://github.com/driftyco/ionic/issues/9659

Temporary solution is to remove dismissOnPageChange: true and it will work, and hopefully you can put that back (if you need it) on next release !

All 4 comments

Known problem RC4
https://github.com/driftyco/ionic/issues/9659

Temporary solution is to remove dismissOnPageChange: true and it will work, and hopefully you can put that back (if you need it) on next release !

Thanks for the issue, I'm going to close this as a duplicate of #9589. I've also submitted a fix for this here: https://github.com/driftyco/ionic/pull/9747

I have the same problems. Hope to fix it as soon. Thanks!

Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

alexbainbridge picture alexbainbridge  路  3Comments

danbucholtz picture danbucholtz  路  3Comments

aslamj picture aslamj  路  3Comments

SebastianGiro picture SebastianGiro  路  3Comments

giammaleoni picture giammaleoni  路  3Comments