angular / angular/angularfire

Firestore stops receiving updates after a while

Đang mở
#3,360 1 bình luận 3 reaction 0 người được giao Xem trên GitHub
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:**
15.2.9

**Firebase:**
9.22.0

**AngularFire:**
7.5.0

**Other (e.g. Ionic/Cordova, Node, browser, operating system):**
-

### How to reproduce these conditions
I don't know if this is a firebase/firestore issue or angular/fire issue so please tell me if I should post it somewhere else. I can't reproduce these conditions as they are time related and seem random. All I can provide right now is that many of our users have reported that after a few minutes to an hour or a few hours of the website/web-app being open in a browser (any) or on an in-app browser (like Ionic), they stop receiving updates from Firestore. This happens mostly after they actually didn't have an update for many minutes, so the connection didn't have any data pass through it.

Sometimes it can be related to poor network conditions (for example a user gets disconnected or suddenly has really bad network and when that's out of the way, Firestore never seems to come back), but there are cases where users didn't have a disconnection or bad network as we've seen through their logs. We've had this issue for the past 3 years but we didn't have enough data to pinpoint the problem. We don't see any errors coming up, the user just stops receiving new snapshots/querysnapshots/changes etc.

Are we supposed to implement a watchdog for Firestore? Like a "ping" to get data every minute, and if we don't, the watchdog restarts Firestore?

**Failing test unit, Stackblitz demonstrating the problem**
-

**Steps to set up and reproduce**
-

**Sample data and security rules**
-

### Debug output
**Errors in the JavaScript console**
-
**Output from `firebase.database().enableLogging(true);`**
-
**Screenshots**
-
### Expected behavior
Users should NOT have to refresh the page in order to get Firestore updates after leaving the website/web-app open for a long time.

### Actual behavior

Users need to manually refresh the page to see the Firestore updates after leaving the website/web-app open for a long time.

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

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

Hướng nghiên cứu

Issue này nêu Angular 15.2.9, Firebase 9.22.0 và AngularFire 7.5.0 nhưng không cung cấp tệp mã nguồn, bài kiểm thử thất bại hoặc cách tái hiện. Trước tiên, hãy tái hiện phiên trình duyệt hoặc Ionic chạy trong thời gian dài và thu thập phần đầu ra còn thiếu từ console và logging, sau đó tách Firebase khỏi AngularFire. Công việc được xem là hoàn tất khi xác định được nguyên nhân và đảm bảo các bản cập nhật Firestore tiếp tục hoạt động mà không cần làm mới trang.

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
databases, frontend
Loại issue
Lỗi
Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Cần làm rõ
Mức phù hợp với người mới
25/100

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.