Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

collectionData doesn't allow angular app to become stable with angular 17 and ssr (getDocs does)

Đang mở
#3,496 2 bình luận 2 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
25/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
angular, firebase, typescript
Lĩnh vực
cloud, frontend

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.

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.

Ngôn ngữ chính
TypeScript
Star
7.8k
Fork
2.2k
Merge trung bình
3 ngày 6 giờ
Pull request đã merge (30 ngày)
5

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của angular/angularfire

Tất cả issue của angular/angularfire

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.