Firestore stops receiving updates after a while
- 主要言語
- TypeScript
- スター
- 7.8k
- フォーク
- 2.2k
- 平均マージ
- 22時間 28分
- マージ済み PR(30日)
- 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
- 見積もり時間
- 1週間以上
- 活発さ
- 停滞
- 明瞭さ
- 説明が足りない
- 初心者へのやさしさ
- 25/100