question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

AngularFire 2.0.0-beta.2 + Firebase SDK 3.0.3 + Angular hmr: 0.8.1 Fails

See original GitHub issue

Since I updated my project (based on https://github.com/r-park/todo-angular2-firebase) to AngularFire 2.0.0-beta.2 + Firebase SDK 3.0.3 + Angular hmr: 0.8.1, HMR fails when trying to reload the modules (see below). Any ideas?

thanks!

EXCEPTION: Error: Uncaught (in promise): EXCEPTION: Error in :0:0
ORIGINAL EXCEPTION: Error: Firebase App named '[DEFAULT]' already exists.
ORIGINAL STACKTRACE:
Error: Firebase App named '[DEFAULT]' already exists.
    at Error (native)
    at Z (http://localhost:3000/vendor.js?69a408dd1fd1676af158:56918:112)
    at Object.initializeApp (http://localhost:3000/vendor.js?69a408dd1fd1676af158:56916:248)
    at _getFirebase (http://localhost:3000/vendor.js?69a408dd1fd1676af158:55828:24)
    at ReflectiveInjector_._instantiate (http://localhost:3000/vendor.js?69a408dd1fd1676af158:13841:28)
    at ReflectiveInjector_._instantiateProvider (http://localhost:3000/vendor.js?69a408dd1fd1676af158:13779:26)
    at ReflectiveInjector_._new (http://localhost:3000/vendor.js?69a408dd1fd1676af158:13768:22)
    at ReflectiveInjectorDynamicStrategy.getObjByKeyId (http://localhost:3000/vendor.js?69a408dd1fd1676af158:13422:51)
    at ReflectiveInjector_._getByKeyDefault (http://localhost:3000/vendor.js?69a408dd1fd1676af158:13948:39)
    at ReflectiveInjector_._getByKey (http://localhost:3000/vendor.js?69a408dd1fd1676af158:13920:26)
ERROR CONTEXT:

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:4
  • Comments:9

github_iconTop GitHub Comments

1reaction
alex88commented, Sep 26, 2016

Same issue here, using

@NgModule({
  imports: [
    BrowserModule,
    HttpModule,
    FormsModule,
    routing,
    NgSemanticModule,
    AngularFireModule.initializeApp(firebaseConfig, myFirebaseAuthConfig);
  ],
  declarations: [
    AppComponent,
    HomeComponent,
    AboutComponent,
    LoginComponent
  ],
  providers: [
    ApiService
  ],
  bootstrap: [AppComponent]
})

and still having that same error, there are no other calls of initializeApp in any part of the app

1reaction
ronakvbhatt07commented, Aug 16, 2016

@dually8 hey yes i got it. I was initializing it in cunstroctur. And i got that. Thank you. Now its working fine

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot find namespace 'firebase'. #234 - angular/angularfire
I am using angularfire2 in an ionic 2 project and I was getting the same error. Typings for firebase 3 seem not to...
Read more >
angular/fire - npm
The official Angular library for Firebase.. Latest version: 7.5.0, last published: a month ago. Start using @angular/fire in your project by ...
Read more >
Not getting response after Angular Fire Auth - Stack Overflow
I have tested your code using angularfire 2.0.0 and firebase 3.0.0 and the problem surely relies on angularfire 2.0.0.
Read more >
Firebase 3, AngularFire 2 Cannot Catch Error with
to Firebase Google Group. Hi,. Firebase v3.2.1. AngularFire 2.0.1. I try to set my firebase database, but I got an error but I...
Read more >
Open Source Product Listing | Tenfold
angularfire @1.2.0, MIT, https://github.com/firebase/angularfire. angularjs@1.8.2, MIT, https://github.com/angular/angular.js. ansi-align@2.0.0 ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found