Error: Cannot instantiate cyclic dependency! AngularFireAuth
I think this error can be related to the followings: https://github.com/angular/angularfire/issues/2365 https://github.com/angular/angularfire/issues/2403
Issue 2365 is not completely fixed because error happens again when refreshing page. Angular: "@angular/cdk": "~9.2.4", "@angular/common": "^9.1.9", "@angular/compiler": "^9.1.9", "@angular/core": "^9.1.9", Firebase: "firebase": "^7.14.5",
AngularFire: "@angular/fire": "^6.0.0",
How to reproduce these conditions
Steps to set up and reproduce Use auth guard on lazy URL and then refresh a page that use any AngularFire service (AngularFireAuth, AngularFirestore, etc)
Debug output
** Errors in the JavaScript console ** Error: Cannot instantiate cyclic dependency! AngularFireAuth at throwCyclicDependencyError (core.js:8090) at R3Injector.hydrate (core.js:17189) at R3Injector.get (core.js:16943) at NgModuleRef$1.get (core.js:36329) at Object.get (core.js:33972) at getOrCreateInjectable (core.js:5848) at Module.ɵɵdirectiveInject (core.js:21103) at NodeInjectorFactory.ProvidersProviderListComponent_Factory [as factory] (provider-list.component.ts:15) at getNodeInjectable (core.js:5993) at instantiateRootComponent (core.js:12819) at createRootComponent (core.js:26475) at ComponentFactory$1.create (core.js:34097) at ViewContainerRef.createComponent (core.js:15698) at RouterOutlet.activateWith (router.js:9149) at RouterOutlet.ngOnInit (router.js:9054) at callHook (core.js:4726) at callHooks (core.js:4690) at executeInitAndCheckHooks (core.js:4630) at refreshView (core.js:12013) at refreshComponent (core.js:13445) at refreshChildComponents (core.js:11716) at refreshView (core.js:12051) at refreshEmbeddedViews (core.js:13391) at refreshView (core.js:12022) at refreshComponent (core.js:13445) at refreshChildComponents (core.js:11716) at refreshView (core.js:12051) at renderComponentOrTemplate (core.js:12129) at tickRootContext (core.js:13652) at detectChangesInRootView (core.js:13686) at RootViewRef.detectChanges (core.js:15395) at ApplicationRef.tick (core.js:43132) at core.js:42975 at ZoneDelegate.invoke (zone-evergreen.js:364) at Object.onInvoke (core.js:41654) at ZoneDelegate.invoke (zone-evergreen.js:363) at Zone.run (zone-evergreen.js:123) at NgZone.run (core.js:41427) at Object.next (core.js:42971) at SafeSubscriber.schedulerFn [as _next] (core.js:37119) at SafeSubscriber.__tryOrUnsub (Subscriber.js:183) at SafeSubscriber.next (Subscriber.js:122) at Subscriber._next (Subscriber.js:72) at Subscriber.next (Subscriber.js:49) at EventEmitter.next (Subject.js:39) at EventEmitter.emit (core.js:37079) at checkStable (core.js:41566) at onLeave (core.js:41729) at Object.onInvoke (core.js:41657) at ZoneDelegate.invoke (zone-evergreen.js:363)
** Screenshots **
Expected behavior
No error at all
Actual behavior
That error. sometimes makes crash the app
Any workaround for this issue?
Hello angularFire team. I literally spend a ton of money in your app for my clients. At least answer us. It’s a shame that core features are broken. It’s a shame you don’t manage the PR. At least give us back the projets lead and we can manage it like a TRUE open source project.
Should have been addressed in prior patch release, closing stale issue. If still encountering troubles with the auth-gaurds please open another issue & we welcome are most definitely open to PRs.