angularfire icon indicating copy to clipboard operation
angularfire copied to clipboard

Error: Zone already loaded.

Open Celtiore opened this issue 8 years ago • 24 comments

Hi, 1/ thanks you for your great job 2/ sorry for my english, i'm french :) 3/ i'm a beginner 4/ i'm not sure it's a bug 5/ i'm not sure it's the right place

this morning i'have updated "angularfire2": "^5.0.0-rc.6" to "angularfire2": "^5.0.0-rc.7"

6/ my working code with rc.6 does not work anymore this.afsClient = new AngularFirestore(_firebaseAppFactory(configFirebase, 'firebaseClient'), false); because with rc.7 : (alias) new AngularFirestore(config: FirebaseOptions, name: string, shouldEnablePersistence: boolean, platformId: Object, zone: NgZone)

7/ i start a new blank project ( see github link below ) and now i have the zone.js error !

8/ can you explain me the correct syntax for platformId: Object, zone: NgZone

9/ thanks you

Version info

Angular: "@angular/common": "5.2.10" Firebase: "firebase": "^4.13.1" AngularFire: "angularfire2": "^5.0.0-rc.7"

Other (e.g. Ionic/Cordova, Node, browser, operating system): "ionic-angular": "3.9.2"

How to reproduce these conditions

https://github.com/Celtiore/test-angularfire2

Debug output

Uncaught Error: Zone already loaded. at zone.js:32 at zone.js:644 at FUNCTION (zone.js:9) at Object. (zone.js:12) at Object. (zone.js:3060) at webpack_require (bootstrap 5a89165deffa5ae45da5:54) at Object.defineProperty.value (vendor.js:77357) at webpack_require (bootstrap 5a89165deffa5ae45da5:54) at Object. (vendor.js:125168) at webpack_require (bootstrap 5a89165deffa5ae45da5:54)

Celtiore avatar May 05 '18 12:05 Celtiore

this is solved in 5.0.0-rc.5-next, but i had to downgrade firebase to firebase@^4.13.1

csotomon avatar May 11 '18 14:05 csotomon

This is the problem of new firebase update, here is a solution for this error

** Step: 1** Install the lower version of firebase using this command

npm install [email protected]

** Step: 2**

npm install

Try.

rahuljograna avatar May 12 '18 04:05 rahuljograna

Didn't work for me! I tried the following constellations:

  • "firebase": "4.13.1" and "angularfire2": "5.0.0-rc.5-next"
  • "angularfire2": "5.0.0-rc.11" and "firebase": "^5.0.2"
  • "angularfire2": "5.0.0-rc.11" and "firebase": "5.3.1"

I'm using Angular 6.

Any suggestions?

takahser avatar Aug 09 '18 23:08 takahser

Solution to zone issue: http://olengski.com/subpages/angular5/angular5.html

DanyalKhawaja avatar Oct 12 '18 11:10 DanyalKhawaja