小编mle*_*mos的帖子

Firebase Firestore 在物理设备上进行 WiFi 故障时出现错误:无法到达 Cloud Firestore 后端

尝试从 Firestore 获取文档时,如果设备通过 Wifi 连接,则连接失败并显示以下错误消息:

\n
W/Firestore( 4903): (21.4.3) [OnlineStateTracker]: Could not reach Cloud Firestore backend. Backend didn\'t respond within 10 seconds\nW/Firestore( 4903): 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.\n
Run Code Online (Sandbox Code Playgroud)\n

重现

\n

通常,在物理设备中运行时会发生错误。\n我创建了一个小应用程序,以便能够在对其余代码的干扰最小的情况下重现错误。请参阅下面的代码。

\n

当您在调试器上点击运行(我正在使用 VSCode),然后单击 (+) 按钮向 Firestore 发出请求时,它会尝试几秒钟(您将看到进度指示器,没有测试应用程序),然后调用snapshot = await docRef.get()失败并显示以下错误消息:

\n
PlatformException(Error performing get, Failed to get document …
Run Code Online (Sandbox Code Playgroud)

firebase flutter google-cloud-firestore

7
推荐指数
1
解决办法
1295
查看次数

标签 统计

firebase ×1

flutter ×1

google-cloud-firestore ×1