Maximum call stack size exceeded at MergeMapSubscriber.notifyError

I am developing an app that was working fine but now I am seeing this error that says “Maximum call stack size exceeded at MergeMapSubscriber.notifyError”, which I don’t have any idea about it.

I don’t know which code snippet to share here to I am sharing my app.module.ts here

import {NgModule} from '@angular/core';
import {BrowserModule} from '@angular/platform-browser';
import {RouteReuseStrategy} from '@angular/router';

import {IonicModule, IonicRouteStrategy} from '@ionic/angular';
import {SplashScreen} from '@ionic-native/splash-screen/ngx';
import {StatusBar} from '@ionic-native/status-bar/ngx';

import {AppRoutingModule} from './app-routing.module';
import {AppComponent} from './app.component';
import {HttpClientModule, HTTP_INTERCEPTORS} from '@angular/common/http';
import {BarcodeScanner} from '@ionic-native/barcode-scanner/ngx';
import {AuthHttpRequestInterceptor} from './services/auth-http-request.interceptor';
import {AuthGuard} from './services/auth.guard';
import {LoginGuard} from './login/login.guard';
import {AgmCoreModule} from '@agm/core';
import {NativeGeocoder} from '@ionic-native/native-geocoder/ngx';
import {Geolocation} from '@ionic-native/geolocation/ngx';
import {BrowserAnimationsModule} from '@angular/platform-browser/animations';
import { TooltipModule } from 'ng2-tooltip-directive';

    declarations: [AppComponent],
    entryComponents: [],
    imports: [
            apiKey: '',
            libraries: ['places']
    providers: [
            provide: RouteReuseStrategy,
            useClass: IonicRouteStrategy
            provide: HTTP_INTERCEPTORS,
            useClass: AuthHttpRequestInterceptor,
            multi: true,
    bootstrap: [AppComponent]
export class AppModule {

Please help…

Is there somewhere MergeMap in the code you control?

This error likely indicates an infinite loop somewhere

Does the error show in devtools? Can you show the call stack shown with the error?

Yes @Tommertom,

And the answer to the other q? Do you have mergemap somewhere?

Other auestion- is this a prod build or dev build?

No, I am not using mergemap and using dev build.

well, then it is interesting to know what you have done before the error occured.

or just rebuild the project if minimal info on error persists?

I have recently added ng2-tooltip-directive and implemented behaviour subject for passing data to the next route.

well, then I would start looking at your implementation of behavioursubject. Maybe there is something wrong there as the error relates to RXJS usage

The main problems with routes that I have recently identified, I commented on one lazy loaded route, and everything works fine.

const routes: Routes = [
    path: '',
    component: Tab2Page,
  // {
  //   path: 'detail',
  //   loadChildren: () => import('./detail/detail.module').then( m => m.DetailPageModule)
  // }

Now can you please tell me what should I do?

well there is still minimal info to go around. I would suggest removing what you added and build slowly (and retesting) until you have found the exact line of code that creates the issue.