You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, when upgrading from firebase-js-sdk 10.x to firebase-js-sdk 11.0.0 we get the following error.
Even though as you can see, we did call initializeApp() first.
akshaybabloo, luke-rogers, yo1106, Proper-Job, mvergarair and 2 more
@JGSolutions "support" is a loaded term, we are not a supported product as it related to the Google Cloud terms of service—but there are people working on the library.
AngularFire v18 is not compatible with Firebase v11, we need better error messaging in the JS SDK but the odd error messages that you are seeing here is because your environment has multiple conflicting versions of Firebase installed.
AngularFire v19 will support Firebase v11 and Angular v19, we just released v19.0.0-rc.2. ng add @angular/fire@next if this RC is looking good I'll plan to cut v19 final shortly.
changed the title [-]Update to firebase-js-sdk 11.0.0 fails: No Firebase App '[DEFAULT]' has been created - call initializeApp() first (app/no-app)[/-][+]Firebase v11 support[/+]on Dec 12, 2024
i was able to comile and start the server when i run the app i get this:
app.routes.ts:49 ERROR RuntimeError: NG0203: inject() must be called from an injection context such as a constructor, a factory function, a field initializer, or a function used with runInInjectionContext. Find more at https://angular.dev/errors/NG0203
at injectInjectorOnly (core.mjs:1095:11)
at ɵɵinject (core.mjs:1105:40)
at inject (core.mjs:1190:10)
at run (angular-fire.mjs:115:10)
at angular-fire.mjs:162:56
at _ZoneDelegate.invoke (zone.js:369:28)
at Object.onInvoke (core.mjs:6494:25)
at _ZoneDelegate.invoke (zone.js:368:34)
at ZoneImpl.run (zone.js:111:43)
at zone.js:2538:40
i think this something on my side which I am looking into
Yeah, that's the error that caused us a lot of grief in our test suite. It turns out that the rxjs-interopt pipe we're using in our methods to make them SSR safe requires an injection context. So you can used it outside of a component or provider factory. If it's in a test you can wrap in TestBed.provideInjectionContext FWIW
Because that was a forcing function we're now reshuffling a lot of our stuff to use inject() internally rather than rely on constructor injection. Sorry that seems to be making for a rougher upgrade 😞
Still happening but seems at a different line number: at run (angular-fire.mjs:115:10)
chunk-DZ7BV6I4.js?v=05488ea1:59 ERROR RuntimeError: NG0203: inject() must be called from an injection context such as a constructor, a factory function, a field initializer, or a function used with runInInjectionContext. Find more at https://angular.dev/errors/NG0203
at injectInjectorOnly (core.mjs:1095:11)
at ɵɵinject (core.mjs:1105:40)
at inject (core.mjs:1190:10)
at run (angular-fire.mjs:115:10)
at angular-fire.mjs:170:48
at _ZoneDelegate.invoke (zone.js:369:28)
at Object.onInvoke (core.mjs:6494:25)
at _ZoneDelegate.invoke (zone.js:368:34)
at ZoneImpl.run (zone.js:111:43)
at zone.js:2538:40
Activity
google-oss-bot commentedon Oct 26, 2024
This issue does not seem to follow the issue template. Make sure you provide all the required information.
JGSolutions commentedon Dec 4, 2024
Is there any support for this project?
jamesdaniels commentedon Dec 12, 2024
@JGSolutions "support" is a loaded term, we are not a supported product as it related to the Google Cloud terms of service—but there are people working on the library.
AngularFire v18 is not compatible with Firebase v11, we need better error messaging in the JS SDK but the odd error messages that you are seeing here is because your environment has multiple conflicting versions of Firebase installed.
AngularFire v19 will support Firebase v11 and Angular v19, we just released v19.0.0-rc.2.
ng add @angular/fire@next
if this RC is looking good I'll plan to cut v19 final shortly.[-]Update to firebase-js-sdk 11.0.0 fails: No Firebase App '[DEFAULT]' has been created - call initializeApp() first (app/no-app)[/-][+]Firebase v11 support[/+]JGSolutions commentedon Dec 12, 2024
Ok thanks for the help.
Maybe support was the wrong word to use.
i was able to comile and start the server when i run the app i get this:
app.routes.ts:49 ERROR RuntimeError: NG0203: inject() must be called from an injection context such as a constructor, a factory function, a field initializer, or a function used with
runInInjectionContext
. Find more at https://angular.dev/errors/NG0203at injectInjectorOnly (core.mjs:1095:11)
at ɵɵinject (core.mjs:1105:40)
at inject (core.mjs:1190:10)
at run (angular-fire.mjs:115:10)
at angular-fire.mjs:162:56
at _ZoneDelegate.invoke (zone.js:369:28)
at Object.onInvoke (core.mjs:6494:25)
at _ZoneDelegate.invoke (zone.js:368:34)
at ZoneImpl.run (zone.js:111:43)
at zone.js:2538:40
i think this something on my side which I am looking into
jamesdaniels commentedon Dec 12, 2024
@JGSolutions no worries.
Yeah, that's the error that caused us a lot of grief in our test suite. It turns out that the rxjs-interopt pipe we're using in our methods to make them SSR safe requires an injection context. So you can used it outside of a component or provider factory. If it's in a test you can wrap in TestBed.provideInjectionContext FWIW
Because that was a forcing function we're now reshuffling a lot of our stuff to use inject() internally rather than rely on constructor injection. Sorry that seems to be making for a rougher upgrade 😞
JGSolutions commentedon Dec 13, 2024
@jamesdaniels As long you guys are aware of the problem and you guys are on it, all good with me.
Thanks again
jamesdaniels commentedon Dec 13, 2024
@JGSolutions our zone wrappers will now noop when outside of an injector context, cutting
rc.3
now, give that a spin and LMK how it goesJGSolutions commentedon Dec 13, 2024
@jamesdaniels
Thanks for the quick update.
Still happening but seems at a different line number: at run (angular-fire.mjs:115:10)
chunk-DZ7BV6I4.js?v=05488ea1:59 ERROR RuntimeError: NG0203: inject() must be called from an injection context such as a constructor, a factory function, a field initializer, or a function used with
runInInjectionContext
. Find more at https://angular.dev/errors/NG0203at injectInjectorOnly (core.mjs:1095:11)
at ɵɵinject (core.mjs:1105:40)
at inject (core.mjs:1190:10)
at run (angular-fire.mjs:115:10)
at angular-fire.mjs:170:48
at _ZoneDelegate.invoke (zone.js:369:28)
at Object.onInvoke (core.mjs:6494:25)
at _ZoneDelegate.invoke (zone.js:368:34)
at ZoneImpl.run (zone.js:111:43)
at zone.js:2538:40
jamesdaniels commentedon Dec 13, 2024
yeah I caught that one earlier today, addressing in #3590
jamesdaniels commentedon Dec 13, 2024
Rc.4 out.
5 remaining items