firebase / firebase/firebase-cpp-sdk

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

Abierto
#1,505 4 comentarios 0 reacciones 0 asignados Ver en GitHub
api: firestore new type: question
Lenguaje dominante
C++
Estrellas
326
Forks
137
Merge medio
3 d 9 h
PR fusionados (30 d)
5

Descripción

### [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.

Guía de contribución

Abrir la guía de contribución

Línea de trabajo

Comienza revisando los comentarios de firestore/integration_test_internal/src/transaction_test.cc y el timeout de Firestore de 10 segundos notificado en Windows. Intenta establecer una configuración de red reproducible que implique VPN o NextDNS y, a continuación, determina si es necesario cambiar el comportamiento del SDK o las indicaciones de recuperación. Se considera completado cuando haya una reproducción fiable y una resolución documentada y validada.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
cpp
Área
databases
Tipo de issue
Error
Dificultad
4/5
Tiempo estimado
3-5 días
Estado de actividad
Estancado
Claridad
Necesita aclaración
Aptitud para principiantes
25/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.