Firestore stops receiving updates after a while
- 主要語言
- TypeScript
- 星號
- 7.8k
- 分支
- 2.2k
- 平均合併
- 22 小時 28 分鐘
- 30 天內合併 PR
- 6
描述
### 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.
貢獻指南
研究方向
該 issue 提到了 Angular 15.2.9、Firebase 9.22.0 和 AngularFire 7.5.0,但沒有提供原始檔、失敗的測試或重現步驟。首先重現長時間執行的瀏覽器或 Ionic 工作階段,並收集缺少的主控台與記錄輸出,然後將 Firebase 與 AngularFire 隔離。完成的標準是找出原因,並確保 Firestore 更新不需重新整理頁面即可恢復。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- angular, firebase, typescript
- 領域
- databases, frontend
- Issue 類型
- 缺陷
- 難度
- 5/5
- 預估耗時
- 一週以上
- 活躍度
- 停滯
- 描述清晰度
- 需要釐清
- 新手友好度
- 25/100