【发布时间】:2020-09-06 17:07:38
【问题描述】:
我在使用 expo 的 react-native 应用程序中通过 Firebase Javascript SDK 使用 Firestore,但在从 expo 弹出后,即使我的设备已连接到互联网,我也会收到此错误:
@firebase/firestore: Firestore (7.19.1): Could not reach Cloud Firestore backend. Backend didn't respond within 10 seconds.
This typically indicates that your device does not have a healthy Internet connection at the moment. The client will operate in offline mode until it is able to successfully connect to the backend.
我该如何解决这个问题,还是应该只使用 react-native-firebase 包?
【问题讨论】:
-
我也有同样的问题。
-
@ColdCerberus 尝试将
firebase.firestore().settings({experimentalForceLongPolling: true})添加到您的 firebase config.js
标签: android firebase react-native google-cloud-firestore react-native-android