Ionic 4 ERROR Error: Uncaught (in promise): overlay does not exist

full:

ERROR Error: Uncaught (in promise): overlay does not exist
at resolvePromise (polyfills.js:3189)
at resolvePromise (polyfills.js:3146)
at polyfills.js:3250
at ZoneDelegate.push…/node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask (polyfills.js:2781)
at Object.onInvokeTask (vendor.js:53209)
at ZoneDelegate.push…/node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask (polyfills.js:2780)
at Zone.push…/node_modules/zone.js/dist/zone.js.Zone.runTask (polyfills.js:2553)
at drainMicroTaskQueue (polyfills.js:2959)
at ZoneTask.push…/node_modules/zone.js/dist/zone.js.ZoneTask.invokeTask [as invoke] (polyfills.js:2860)
at invokeTask (polyfills.js:4102)

This issue popped up after running a --prod build for android in order to reduce the ready time.
now whenever I run android the first screen that comes up is the modal. in the chrome inspector of the device I can manually go to the home, and then when I navigate to the modal is fine, however, whenever going back or dismiss() I get that error:
I have followed these previous posts:
this one
here
as well as followed all subsequent links in the threads

did you found any solution?

yea the issue was where i was putting my modal as an entry component. If you have a component that is used as a modal or pop over make sure that you are placing it in the correct module for the component as a ‘entryComponent’

1 Like

+1 thank you i were using sidemenu component and not added it in entry components array in app moule

so after i add it the problem disappeared

before

@NgModule({

declarations: [

AppComponent,

SidemenuComponent

],

entryComponents: ,

imports: [

BrowserModule,

HttpClientModule,

IonicModule.forRoot(),

IonicStorageModule.forRoot(),

AppRoutingModule

],

providers: [

StatusBar,

SplashScreen,

{ provide: RouteReuseStrategy, useClass: IonicRouteStrategy }

],

bootstrap: [AppComponent]

})

export class AppModule { }

after

@NgModule({

declarations: [

AppComponent,

SidemenuComponent

],

entryComponents: [SidemenuComponent],

imports: [

BrowserModule,

HttpClientModule,

IonicModule.forRoot(),

IonicStorageModule.forRoot(),

AppRoutingModule

],

providers: [

StatusBar,

SplashScreen,

{ provide: RouteReuseStrategy, useClass: IonicRouteStrategy }

],

bootstrap: [AppComponent]

})

export class AppModule { }