Upgrade to angular 20 gives issues with AngularFire: Cannot read properties of undefined (reading 'then')
LanderBeeuwsaert opened this issue ยท 8 comments
During our upgrade to Angular 20, our project compiles successfully
However the moment we go to the application/website, angularFire gives issues.
In chrome devtools we see:
it seems to be this line that is failing:
I got curious and tried out with zoneless and still got the same error, but it's just a little more readible:
Is angularFire considered to be already compatible with Angular 20?
Anybody else experiencing the same?
This issue does not seem to follow the issue template. Make sure you provide all the required information.
Seeing this error with Firestore getDoc (broken in Angular 20 zoneless).
TypeError: Cannot read properties of undefined (reading 'then')
getToken is also broken (also returns a Promise like getDoc).
Not supported yet, that was a breaking change I need to find a mitigation to. Hopefully should have a release candidate to test shortly.
Please give the RC a spin, @angular/fire@20.0.0-rc.0 published on NPM @next. I'll cut next week if there aren't any show stoppers.
The rc.0 version seems to resolve the type errors in getDoc and getToken. Also no longer need to do "overrides": { "rxjs": "7.8.2" } in package.json to make 'canActivate' in auth-guard/auth-guard.d.ts compile.
Thank you!
@jamesdaniels works, thanks!
Please give the RC a spin,
@angular/fire@20.0.0-rc.0published on NPM@next. I'll cut next week if there aren't any show stoppers.
I'm trying it from there, thanks!
If anyone wants to try it in a new project and doesn't know how, they simply need to add @next in the schematics or installation:
ng add @angular/fire@next
fixed


