IONICERROR Error: Uncaught (in promise): overlay does not exist at resolvePromise (zone.js:814)

Ionic version: (check one with “x”)
(For Ionic 1.x issues, please use https://github.com/ionic-team/ionic-v1)
[ ] 2.x
[ ] 3.x
[x ] 4.x

I’m submitting a … (check one with “x”)
[x ] bug report
[ ] feature request

Current behavior:

When I use “ModalCtroller.dismiss()” to close a modal,it happened in the terminal:
“IONICERROR Error: Uncaught (in promise): overlay does not exist at resolvePromise (zone.js:814) “
Expected behavior:

The current modal page should close, but it didn’t
Steps to reproduce:

Related code:

this.modalCtrl.dismiss();

Other information:

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

core.js:1673 ERROR Error: Uncaught (in promise): overlay does not exist
    at resolvePromise (zone.js:814)
    at resolvePromise (zone.js:771)
    at zone.js:873
    at ZoneDelegate.push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask (zone.js:421)
    at Object.onInvokeTask (core.js:3815)
    at ZoneDelegate.push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask (zone.js:420)
    at Zone.push../node_modules/zone.js/dist/zone.js.Zone.runTask (zone.js:188)
    at drainMicroTaskQueue (zone.js:595)
    at ZoneTask.push../node_modules/zone.js/dist/zone.js.ZoneTask.invokeTask [as invoke] (zone.js:500)
    at invokeTask (zone.js:1540)

Author: Fantashit

1 thought on “IONICERROR Error: Uncaught (in promise): overlay does not exist at resolvePromise (zone.js:814)

  1. this.modalController.dismiss(null, undefined);
    

    ^ null is not a valid value for the third argument, this should work

Comments are closed.