Skip to content

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

Open
@brianmichel

Description

@brianmichel

[REQUIRED] Please fill in the following fields:

  • Pre-built SDK from the website 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

// We occasionally get transient error like "Could not reach Cloud Firestore
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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions