collectionData doesn't allow angular app to become stable with angular 17 and ssr (getDocs does)
- Ngôn ngữ chính
- TypeScript
- Star
- 7.8k
- Fork
- 2.2k
- Merge trung bình
- 22 giờ 28 phút
- Pull request đã merge (30 ngày)
- 6
Mô tả
### Version info
**Angular:**
17.0.9
**Firebase:**
10.7.1
**AngularFire:**
17.0.1
**Other (e.g. Ionic/Cordova, Node, browser, operating system):**
Windows
### How to reproduce these conditions
GitHub repo to clone as needs SSR to reproduce
https://github.com/pdela/testing-ng17-ssr
**Steps to set up and reproduce**
Clone the repo
install dependencies
npm run start
### Expected behavior
Angular app to become stable in reasonable time (millis)
### Actual behavior
The problem is that firebase prevents angular app to become stable in client, thus hydration process doesn't start, except after waiting for around 120 seconds
Edit:
Unfortunately I still have this problem in the demo above and in another project ( using angular 17.3.x and firebase 10.11.x) and this time using getDoc method.
I'm pretty sure the problem is originated in firestore SDK, as the 2 pending macrotasks that blocks angular being stable point to a setTimout inside firestore source code.
Hướng dẫn đóng góp
Hướng nghiên cứu
Clone repository tái hiện được liên kết, cài đặt các dependency của nó và chạy npm run start. So sánh các trường hợp collectionData và getDoc/getDocs trong khi quan sát các macrotask Firestore đang chờ, vốn làm trì hoãn tính ổn định và hydration của Angular. Được xem là hoàn tất khi ứng dụng SSR nhanh chóng đạt trạng thái ổn định và hydration bắt đầu mà không phải chờ khoảng 120 giây.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- angular, firebase, typescript
- Lĩnh vực
- cloud, frontend
- Loại issue
- Lỗi
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 25/100