Error: Cannot activate an already activated outlet

Hello, it shocks me when I’m running on Android platform the app with ionic 4, it works perfectly, but when i run it with --prod (i dont have any configuration on prod, only by default) or when i do the build in --prod --release. it crashes when i do click on some button on tabbar, giving me this error, it shows tabbar and blank page (firestore error it appears at the beginning without doing click):

ERROR Error: Uncaught (in promise): TypeError: Object(...)(...).firestore is not a function
TypeError: Object(...)(...).firestore is not a function
    at main.644ff130e44eccc7ef10.js:1
    at e.invoke (polyfills.6a757adabc27cc17898f.js:1)
    at t.run (polyfills.6a757adabc27cc17898f.js:1)
    at t.runOutsideAngular (main.644ff130e44eccc7ef10.js:1)
    at new t (main.644ff130e44eccc7ef10.js:1)
    at main.644ff130e44eccc7ef10.js:1
    at so (main.644ff130e44eccc7ef10.js:1)
    at ao (main.644ff130e44eccc7ef10.js:1)
    at t.get (main.644ff130e44eccc7ef10.js:1)
    at ao (main.644ff130e44eccc7ef10.js:1)
    at P (polyfills.6a757adabc27cc17898f.js:1)
    at P (polyfills.6a757adabc27cc17898f.js:1)
    at polyfills.6a757adabc27cc17898f.js:1
    at e.invokeTask (polyfills.6a757adabc27cc17898f.js:1)
    at Object.onInvokeTask (main.644ff130e44eccc7ef10.js:1)
    at e.invokeTask (polyfills.6a757adabc27cc17898f.js:1)
    at t.runTask (polyfills.6a757adabc27cc17898f.js:1)
    at g (polyfills.6a757adabc27cc17898f.js:1)
Se @ main.644ff130e44eccc7ef10.js:1
main.644ff130e44eccc7ef10.js:1 Ionic Native: deviceready event fired after 588 ms
main.644ff130e44eccc7ef10.js:1 ERROR Error: Uncaught (in promise): Error: Cannot activate an already activated outlet
Error: Cannot activate an already activated outlet
    at t.activateWith (main.644ff130e44eccc7ef10.js:1)
    at t.activateRoutes (main.644ff130e44eccc7ef10.js:1)
    at main.644ff130e44eccc7ef10.js:1
    at Array.forEach (<anonymous>)
    at t.activateChildRoutes (main.644ff130e44eccc7ef10.js:1)
    at t.activateRoutes (main.644ff130e44eccc7ef10.js:1)
    at main.644ff130e44eccc7ef10.js:1
    at Array.forEach (<anonymous>)
    at t.activateChildRoutes (main.644ff130e44eccc7ef10.js:1)
    at t.activate (main.644ff130e44eccc7ef10.js:1)
    at P (polyfills.6a757adabc27cc17898f.js:1)
    at P (polyfills.6a757adabc27cc17898f.js:1)
    at polyfills.6a757adabc27cc17898f.js:1
    at e.invokeTask (polyfills.6a757adabc27cc17898f.js:1)
    at Object.onInvokeTask (main.644ff130e44eccc7ef10.js:1)
    at e.invokeTask (polyfills.6a757adabc27cc17898f.js:1)
    at t.runTask (polyfills.6a757adabc27cc17898f.js:1)
    at g (polyfills.6a757adabc27cc17898f.js:1)
    at t.invokeTask [as invoke] (polyfills.6a757adabc27cc17898f.js:1)
    at m (polyfills.6a757adabc27cc17898f.js:1)

Ok, i see the error… its something related with:

import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { TabsPage } from './tabs.page';

const routes: Routes = [
  {
    path: 'tabs',
    component: TabsPage,
    children: [
      {
        path: 'tab1',
        children: [
          {
            path: '',
            loadChildren: '../tab1/tab1.module#Tab1PageModule',
            children: [

  {
    path: 'object/:id',
    loadChildren: '../object-detail/object-detail.module#objectDetailPageModule',
  }
            ]
          }
        ]
      },
      {
        path: 'tab2',
        children: [
          {
            path: '',
            loadChildren: '../tab2/tab2.module#Tab2PageModule'
          }
        ]
      },
      {
        path: 'tab3',
        children: [
          {
            path: '',
            loadChildren: '../tab3/tab3.module#Tab3PageModule'
          }
        ]
      },
      {
        path: '',
        redirectTo: '/tabs/tab1',
        pathMatch: 'full'
      }
    ]
  },
  {
    path: '',
    redirectTo: '/tabs/tab1',
    pathMatch: 'full'
  }
];

@NgModule({
  imports: [
    RouterModule.forChild(routes)
  ],
  exports: [RouterModule]
})
export class TabsPageRoutingModule { }
Ionic:

   Ionic CLI                     : 6.11.7 (/usr/local/lib/node_modules/@ionic/cli)
   Ionic Framework               : @ionic/angular 4.11.10
   @angular-devkit/build-angular : 0.803.24
   @angular-devkit/schematics    : 10.1.0
   @angular/cli                  : 8.3.29
   @ionic/angular-toolkit        : 2.3.3

Capacitor:

   Capacitor CLI   : 1.5.3
   @capacitor/core : 1.5.3

Cordova:

   Cordova CLI       : 8.0.0
   Cordova Platforms : android 8.0.0
   Cordova Plugins   : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 4.1.0, (and 16 other plugins)

Utility:

   cordova-res : 0.15.1
   native-run  : 1.0.0

System:

   Android SDK Tools : 26.1.1 (/home/manel/Android/Sdk)
   NodeJS            : v12.18.3 (/usr/local/bin/node)
   npm               : 6.14.8
   OS                : Linux 4.13

Hey I am getting the same error . Can you tell me where exactly was the issue

2020-10-09 12:33:35.216 19484-19484/io.ionic.starter E/Capacitor/Console: File: http://localhost/vendor-es2015.js - Line 39108 - Msg: ERROR Error: Uncaught (in promise): Error: Cannot activate an already activated outlet
    Error: Cannot activate an already activated outlet
        at IonRouterOutlet.activateWith (http://localhost/vendor-es2015.js:106445:19)
        at ActivateRoutes.activateRoutes (http://localhost/vendor-es2015.js:80059:40)

It is hard to troubleshoot routing problems piecemeal. Is there any way you can provide public access to a minimal repo on GitHub or Gitlab that reproduces the problem reliably?

I faced this issue when tried in the browser using ionic serve, but when I ran it in the device worked fine