angularfire icon indicating copy to clipboard operation
angularfire copied to clipboard

Timeout just in the first load with Angular 18 and SSR

Open quedicesebas opened this issue 1 year ago • 10 comments

Version info

Angular: 18.0.5

Firebase: latest

AngularFire: 18.0.1

How to reproduce these conditions

Clone this minimal reproduction repository containing just a boostraped project that use Firebase to get the SEO data for a page:

https://github.com/quedicesebas/lacomanda-front

Sample data and security rules

I'm just loading the SEO meta tags info form firebase.

You just need to use this two documents:

brandDomains/lafocachera.co {"brandId": "lafocachera"}

seoConfigs/lafocachera { "meta": "card": "summary", "description": "FOCACCIA Y PIZZA AL TAGLIO. Para llevar o DIRECTO A TU CASA", "image": "https://lafocachera.co/assets/lafocachera/meta.jpg", "type": "website", "url": "https://lafocachera.co/" }, "title "La Focachera - Domicilios MOSQUERA FUNZA Y MADRID" }

Debug output

I got this just the first time. If I press F5, reloads well each consequent time.

Page / did not render in 30 seconds.
    at Timeout.<anonymous> (C:\Users\srrge\source\repos\esaes\alacarta\lacomanda-front\node_modules\@angular\build\src\utils\server-rendering\render-page.js:90:90)
    at Timeout.timer (C:\Users\srrge\source\repos\esaes\alacarta\lacomanda-front\node_modules\zone.js\fesm2015\zone-node.js:2249:37)
    at _ZoneDelegate.invokeTask (C:\Users\srrge\source\repos\esaes\alacarta\lacomanda-front\node_modules\zone.js\fesm2015\zone-node.js:398:33)
    at _ZoneImpl.runTask (C:\Users\srrge\source\repos\esaes\alacarta\lacomanda-front\node_modules\zone.js\fesm2015\zone-node.js:158:47)
    at invokeTask (C:\Users\srrge\source\repos\esaes\alacarta\lacomanda-front\node_modules\zone.js\fesm2015\zone-node.js:479:34)
    at Timeout.ZoneTask.invoke (C:\Users\srrge\source\repos\esaes\alacarta\lacomanda-front\node_modules\zone.js\fesm2015\zone-node.js:468:48)
    at Timeout.data.args.<computed> (C:\Users\srrge\source\repos\esaes\alacarta\lacomanda-front\node_modules\zone.js\fesm2015\zone-node.js:2231:32)
    at listOnTimeout (node:internal/timers:573:17)
    at process.processTimers (node:internal/timers:514:7

Expected behavior

Should load the first-time without timeout

Actual behavior

Timeout the first load (in local and deployed to Firebase App Hosting also)

quedicesebas avatar Jun 21 '24 02:06 quedicesebas

@quedicesebas did you find anything about this ?

alexdabast avatar Sep 18 '24 19:09 alexdabast

did you get any solution ?

sadabjr avatar Sep 21 '24 17:09 sadabjr

same, did you find something?

JanKrakowiak avatar Sep 23 '24 11:09 JanKrakowiak

Same, working with firebase. Initially implemented provideExperimentalZonelessChangeDetection() and later deactivated it, and the error persists.

juliansjk avatar Sep 26 '24 02:09 juliansjk

All I did to end up with this error was to generate a new app and add AngularFire to it. I am starting to loose hope with the Angular Fire library, like really loose hope.. after using it for 5 years.

ibnYusrat avatar Oct 02 '24 09:10 ibnYusrat

Is working for me sometime ago, not sure why (maybe current 18 version).

quedicesebas avatar Oct 22 '24 01:10 quedicesebas

Same issue here in our Angular 18/Spring project. Worked previously in Angular 17

joaedsag avatar Nov 04 '24 11:11 joaedsag

Please give AngularFire v19 a spin, we've improved the zone handling and now emit debug messages warning the developer of zonewraps that may be misbehaving.

jamesdaniels avatar Dec 16 '24 14:12 jamesdaniels

Same issue here, have you found any solution?

hanafnafs avatar Jan 06 '25 08:01 hanafnafs

Same, have u solved it?

BIYUEHU avatar Jan 12 '25 05:01 BIYUEHU