firebase / firebase/firebase-cpp-sdk

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

Aperta
#1,505 4 commenti 0 reazioni 0 assegnatari Vedi su GitHub
api: firestore new type: question
Lingua principale
C++
Stelle
326
Fork
137
Merge medio
3g 9h
PR unite (30g)
5

Descrizione

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

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Inizia esaminando i commenti in firestore/integration_test_internal/src/transaction_test.cc e il timeout di Firestore di 10 secondi segnalato su Windows. Cerca di stabilire una configurazione di rete riproducibile che coinvolga VPN o NextDNS, quindi determina se sia necessario modificare il comportamento dell’SDK o le indicazioni per il recupero. Il lavoro è completato quando sono disponibili una riproduzione affidabile e una risoluzione documentata e convalidata.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
cpp
Ambito
databases
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Da chiarire
Idoneità per principianti
25/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.