firebase / firebase/firebase-cpp-sdk

[Bug] Firestore Can't Connect To Internet And Goes Offline Errantly

未关闭
#1,505 4 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
api: firestore new type: question
主要语言
C++
星标
326
派生
137
平均合并
3 天 9 小时
30 天内合并 PR
5

描述

### [REQUIRED] Please fill in the following fields:

* Pre-built SDK from the [website](https://firebase.google.com/download/cpp) or open-source from this repo: open-source
* Firebase C++ SDK version: ~11.3.0
* Problematic Firebase Component: Firestore
* Other Firebase Components in use: Auth
* Platform you are using the C++ SDK on: Windows
* Platform you are targeting: desktop

### [REQUIRED] Please describe the issue here:

As part of our authorization flow we check a document in our firestore instance to see if the email is allow listed and then if it is we continue our authorization flow into the actual auth component using the standard sign in function with an email and password.

We have observed that on some Windows machines (sometimes running VPN, NextDNS, or similar networking tools) that the calls to Firestore eventually time out after 10 seconds and the client goes offline. We see this log message:

```
WARNING: 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.
```

The machines can reach the internet in a browser just fine. If I remove this check against the firestore document the auth component succeeds without issue.

#### Steps to reproduce:

I haven't tried to use the quickstarts since I've been unable to reliably reproduce the problem on my machine. But it seems like machines that have whatever the correct configuration is to induce this problem it's 100% reproducible.

What happened? How can we make the problem occur?
I'm not entirely sure how to repro the issue, but I'd love advice on how to validate if a computer can connect to Firestore (or should be able to) outside of the SDK just so I can run a quick sanity check on these machines outside of our SDK code.

#### Relevant Code:
Currently unknown although I do see some comments here https://github.com/firebase/firebase-cpp-sdk/blob/7b5adbe644b09ac46bb3a1f12c8289c5d09f1274/firestore/integration_test_internal/src/transaction_test.cc#L53 regarding an issue just like this, but I'm unsure how we recover from this situation or if there's something we should be doing when the SDK gets into this state.

贡献指南

打开贡献指南

调研方向

首先查看 firestore/integration_test_internal/src/transaction_test.cc 中的注释,以及 Windows 上报告的 Firestore 10 秒超时问题。尝试建立涉及 VPN 或 NextDNS 的可复现网络配置,然后确定是否需要更改 SDK 行为或恢复指导。只有实现可靠复现并获得有文档记录且经过验证的解决方案后,才算完成。

由索引模型根据 Issue 内容生成。

评估

技术栈
cpp
领域
databases
Issue 类型
缺陷
难度
4/5
预计耗时
3-5 天
活跃度
停滞
描述清晰度
需要澄清
新手友好度
25/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。