ionic runtime error - zone already loaded

Zubelius

I just wanted to use ionic 3 + firebase authentication. I followed the latest guidelines, youtube, documentation but i always encountered this problem when running 'ionic serve':

Error: Zone already loaded.
    at http://localhost:8100/build/vendor.js:117672:15
    at http://localhost:8100/build/vendor.js:118284:3
    at FUNCTION (http://localhost:8100/build/vendor.js:117649:10)
    at Object.<anonymous> (http://localhost:8100/build/vendor.js:117652:2)
    at Object.<anonymous> (http://localhost:8100/build/vendor.js:120702:30)
    at __webpack_require__ (http://localhost:8100/build/vendor.js:55:30)
    at Object.defineProperty.value (http://localhost:8100/build/vendor.js:69145:66)
    at __webpack_require__ (http://localhost:8100/build/vendor.js:55:30)
    at Object.<anonymous> (http://localhost:8100/build/vendor.js:117167:72)
    at __webpack_require__ (http://localhost:8100/build/vendor.js:55:30)

Ionic Framework: 3.9.2
Ionic App Scripts: 3.1.9
Angular Core: 5.2.10
Angular Compiler CLI: 5.2.10
Node: 9.11.1
OS Platform: Windows 8.1
Navigator Platform: Win32
User Agent: Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.139 Safari/537.36

I have searched everything but nothing helps.

Thing i already did:

  1. I follow everything from this link "Runtime Error Zone already loaded" in ionic 3 but it didn't solve my problem
  2. I tried to remove 'import zone..' but could not find it. Searched the entire files but could not fine import zone. I got from this link How do I determine what zone is already loaded?

I could not find any solutions right now. Any suggestions given are appreciated.

My app.module.ts file

import { RegisterPage } from './../pages/register/register';
import { LoginPage } from './../pages/login/login';
import { CollectionPage } from './../pages/collection/collection';
import { BrowserModule } from '@angular/platform-browser';
import { ErrorHandler, NgModule } from '@angular/core';
import { IonicApp, IonicErrorHandler, IonicModule } from 'ionic-angular';

import { MyApp } from './app.component';
import { HomePage } from '../pages/home/home';
import { ListPage } from '../pages/list/list';

import { StatusBar } from '@ionic-native/status-bar';
import { SplashScreen } from '@ionic-native/splash-screen';

import { AngularFireModule } from 'angularfire2';
import { AngularFireAuthModule } from 'angularfire2/auth';

const firebaseAuth = {
  apiKey: "Axxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
  authDomain: "fxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
  databaseURL: "hxxxxxxxxxxxxxx",
  projectId: "fxxxxxxxxxxxxx",
  storageBucket: "firxxxxxxxxxxxx",
  messagingSenderId: "xxxxxxxxx"
  };

@NgModule({
  declarations: [
    MyApp,
    HomePage,
    CollectionPage,
  ],
  imports: [
    BrowserModule,
    IonicModule.forRoot(MyApp),
    AngularFireModule.initializeApp(firebaseAuth),
    AngularFireAuthModule

  ],
  bootstrap: [IonicApp],
  entryComponents: [
    MyApp,
    HomePage,
    CollectionPage,
  ],
  providers: [
    StatusBar,
    SplashScreen,
    {provide: ErrorHandler, useClass: IonicErrorHandler}
  ]
})
export class AppModule {



}

My register.html file

<ion-header>

  <ion-navbar>
    <ion-title>Register</ion-title>
  </ion-navbar>

</ion-header>


<ion-content padding>

    <ion-list>

        <ion-item>
          <ion-label>Username</ion-label>
          <ion-input type="text" value=""></ion-input>
        </ion-item>

        <ion-item>
          <ion-label>Password</ion-label>
          <ion-input type="password" value=""></ion-input>
        </ion-item>

      </ion-list>

      <div padding>
        <button ion-button color="primary" block (click)="registerUser()">Register</button>
      </div>

</ion-content>

My register.ts file

import { Component, ViewChild } from '@angular/core';
import { IonicPage, NavController, NavParams } from 'ionic-angular';
import { AngularFireAuth } from 'angularfire2/auth';

@IonicPage()
@Component({
  selector: 'page-register',
  templateUrl: 'register.html',
})
export class RegisterPage {

  @ViewChild('username') user;
  @ViewChild('password') password;

  constructor(private fire: AngularFireAuth, public navCtrl: NavController, public navParams: NavParams) {
  }

  ionViewDidLoad() {
    console.log('ionViewDidLoad RegisterPage');
  }

  registerUser() {
    this.fire.auth.createUserWithEmailAndPassword(this.user.value, this.password.value)
    .then(data => {
      console.log('got data ', data);
    })
    .catch(error => {
      console.log('got an error ', error);
    });
    console.log('Would register user with ', this.user.value, this.password.value);
  }

}
Haifeng Zhang

I had the exact problem today. It proves a problem of angularfire2

You can find the issue on github: Runtime Error Zone already loaded

Once I rollback to rc4, everything works properly, hope it helps.

npm install [email protected]

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

"Runtime Error Zone already loaded" in ionic 3

From Dev

SharePoint Online /Angular - Error: Uncaught Error: Zone already loaded

From Dev

Generic error: Runtime compiler is not loaded,

From Dev

How do I determine what zone is already loaded?

From

BrowserModule has already been loaded Error

From Dev

Runtime Error during ionic serve

From Dev

Angular AoT and Rollup - Error: Runtime compiler is not loaded

From Dev

Bind9 Configuration Zone not loaded due to error

From Dev

Ionic 2/3: Runtime Error: Property undefined

From Dev

Ionic - Runtime Error this.fba.logEvent(...).then is not a function

From Dev

ionic3.9.2 runtime error with cordova imported

From Dev

Ionic 2 - Runtime error Cannot find module "."

From Dev

Ionic 2 - Runtime Error No provider for NavController

From Dev

Ionic => Runtime error: Cannot find module "."

From Dev

Runtime Error: Object(...) is not a function Ionic/Firebase/Angular

From Dev

Ionic cordova build error runtime.aar

From Dev

Error: MyCustomHttpApiModule is already loaded. Import in your base AppModule only

From Dev

Turbolinks causing a "jquery-ujs has already been loaded!" error

From Dev

PHP Codeigniter Unexpected Error(Module 'imagick' already loaded)

From Dev

Handle Koin in base fragment (Module already loaded error)

From Dev

Runtime Error Cannot find module "ionic-native" IONIC 2

From Dev

Error "unresolved external symbol" when library is dynamically loaded at runtime

From Dev

Runtime error: dyld: Library not loaded: @rpath/AWSCore.framework/AWSCore

From Dev

"Runtime error event loop already running" during asyncio

From Dev

Ionic2 - Runtime Error Uncaught (in promise): Error: No provider for Http

From Dev

EXCEPTION: Runtime compiler is not loaded

From Dev

Delete MC loaded in runtime

From Dev

IONIC Serve : Runtime Error platform.toLowerCase is not a function

From Dev

Runtime Error: this.userprovider.userSignup(...).subscribe is not a function in Ionic

Related Related

  1. 1

    "Runtime Error Zone already loaded" in ionic 3

  2. 2

    SharePoint Online /Angular - Error: Uncaught Error: Zone already loaded

  3. 3

    Generic error: Runtime compiler is not loaded,

  4. 4

    How do I determine what zone is already loaded?

  5. 5

    BrowserModule has already been loaded Error

  6. 6

    Runtime Error during ionic serve

  7. 7

    Angular AoT and Rollup - Error: Runtime compiler is not loaded

  8. 8

    Bind9 Configuration Zone not loaded due to error

  9. 9

    Ionic 2/3: Runtime Error: Property undefined

  10. 10

    Ionic - Runtime Error this.fba.logEvent(...).then is not a function

  11. 11

    ionic3.9.2 runtime error with cordova imported

  12. 12

    Ionic 2 - Runtime error Cannot find module "."

  13. 13

    Ionic 2 - Runtime Error No provider for NavController

  14. 14

    Ionic => Runtime error: Cannot find module "."

  15. 15

    Runtime Error: Object(...) is not a function Ionic/Firebase/Angular

  16. 16

    Ionic cordova build error runtime.aar

  17. 17

    Error: MyCustomHttpApiModule is already loaded. Import in your base AppModule only

  18. 18

    Turbolinks causing a "jquery-ujs has already been loaded!" error

  19. 19

    PHP Codeigniter Unexpected Error(Module 'imagick' already loaded)

  20. 20

    Handle Koin in base fragment (Module already loaded error)

  21. 21

    Runtime Error Cannot find module "ionic-native" IONIC 2

  22. 22

    Error "unresolved external symbol" when library is dynamically loaded at runtime

  23. 23

    Runtime error: dyld: Library not loaded: @rpath/AWSCore.framework/AWSCore

  24. 24

    "Runtime error event loop already running" during asyncio

  25. 25

    Ionic2 - Runtime Error Uncaught (in promise): Error: No provider for Http

  26. 26

    EXCEPTION: Runtime compiler is not loaded

  27. 27

    Delete MC loaded in runtime

  28. 28

    IONIC Serve : Runtime Error platform.toLowerCase is not a function

  29. 29

    Runtime Error: this.userprovider.userSignup(...).subscribe is not a function in Ionic

HotTag

Archive