angularfire: Error: No provider for InjectionToken FirebaseAppConfigToken!

Version info

Angular: 4.1.1

Firebase: 3.9.0

AngularFire: 4.0.0-rc0

Other (e.g. Ionic/Cordova, Node, browser, operating system): Firefox 52 on Ubuntu 16.04 LTS, node 6.10.3

  1. Create a new angular project
  2. Create a component that injects a service that injects itself angularfire
  3. Try to open the component in a angular material dialog.

Debug output

** Errors in the JavaScript console ** ERROR Error: Uncaught (in promise): Error: No provider for InjectionToken FirebaseAppConfigToken! injectionError@http://localhost:5555/node_modules/@angular/core/bundles/core.umd.js:1238:86 [angular] noProviderError@http://localhost:5555/node_modules/@angular/core/bundles/core.umd.js:1276:12 [angular] ReflectiveInjector_.prototype.throwOrNull@http://localhost:5555/node_modules/@angular/core/bundles/core.umd.js:2777:19 [angular] ReflectiveInjector.prototype.getByKeyDefault@http://localhost:5555/node_modules/@angular/core/bundles/core.umd.js:2816:20 [angular] ReflectiveInjector.prototype.getByKey@http://localhost:5555/node_modules/@angular/core/bundles/core.umd.js:2748:20 [angular] ReflectiveInjector.prototype.get@http://localhost:5555/node_modules/@angular/core/bundles/core.umd.js:2617:16 [angular] get@ng:///AppModule/module.ngfactory.js:51:95 [angular] get@ng:///AppModule/module.ngfactory.js:56:52 [angular] get@ng:///AppModule/module.ngfactory.js:461:64 [angular] anonymous/AppModuleInjector.p… Stack trace: [object Object]

** Output from firebase.database().enableLogging(true); **

** Screenshots **

Expected behavior

The component renders

Actual behavior

Error is thrown and angular app crashes

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Reactions: 4
  • Comments: 20 (1 by maintainers)

Most upvoted comments

@AlvaroRM88 in the app.module. then declare it like so imports: [AngularFireModule.initializeApp(firebaseConfig)]

Is there any solution…Still i am struggling with this …

Is there any solution?

Please post it because I have 4.2.5 I known that this is the last version

Thanks

Get Outlook for iOShttps://aka.ms/o0ukef


From: rahultyagiji notifications@github.com Sent: Tuesday, July 4, 2017 10:51:09 PM To: angular/angularfire2 Cc: MarinoRaul; Comment Subject: Re: [angular/angularfire2] Error: No provider for InjectionToken FirebaseAppConfigToken! (#971)

I was able to solve it by updating angular core… I will post the working version number combinations later today.

— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/angular/angularfire2/issues/971#issuecomment-312977778, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AB5qSwyOf84pl0i6RD8UNSxAEwgXwMP1ks5sKuwNgaJpZM4NZFPP.