angularfire icon indicating copy to clipboard operation
angularfire copied to clipboard

angularFire 19 upgrade crashes when deploying to production

Open LanderBeeuwsaert opened this issue 11 months ago • 6 comments

This seems to be in angular/core If we revert to firebase-js-sdk 10 and angularFire 18 the issue disappears. It doesn't happen on our dev builds (esbuild) but it does happen when we deploy to production. So my non-expert guess would be that treeshaking is somehow involved?

Image Image Image

LanderBeeuwsaert avatar Dec 15 '24 23:12 LanderBeeuwsaert

This issue does not seem to follow the issue template. Make sure you provide all the required information.

google-oss-bot avatar Dec 15 '24 23:12 google-oss-bot

Since this is an @angular/core I'd recommend filing a bug over in https://github.com/angular/angular. Is it crashing during the SSR or CSR cycle? Node and browser versions will be helpful to debug.

jamesdaniels avatar Dec 16 '24 14:12 jamesdaniels

We don't use SSR, so just "normal" CSR. I've created a bug report in the angular repo: https://github.com/angular/angular/issues/59213 node: 22.4.0 browser: Version 131.0.6778.140 (Officiële build) (64-bits)

LanderBeeuwsaert avatar Dec 17 '24 06:12 LanderBeeuwsaert

@jamesdaniels I have researched further but haven't been able to make a reproduction that showcases the issue. I tried but I need to be missing something.

What I found is that it only happens if I enable optimization in angular.json Also, the moment I comment out the subscription to AngularFire Auth authState it goes away as well Image The stacktrace with sourcemaps gives: Image Image Image Image

LanderBeeuwsaert avatar Dec 26 '24 09:12 LanderBeeuwsaert

any updates on this issue?

Tashuan avatar Jan 08 '25 14:01 Tashuan

I've been able to make a minimal reproduction: https://github.com/LanderBeeuwsaert/notify-scheduler-issue2

LanderBeeuwsaert avatar Feb 24 '25 11:02 LanderBeeuwsaert