One of Firestore Developers indicates in this Github Thread that this might be a very common error to occur. As he mentions here:
your problem might be related to your browser throttling the page when it’s in a background tab, causing our Firestore connection to time out.
This means that something on your environment might be affecting your connection to Firestore, causing the error that you are facing.
In this post from the Community – @firebase/firestore: Firestore (5.0.4): Could not reach Cloud Firestore backend. Backend didn’t respond within 10 seconds, it’s indicated some possible solutions that I think might help you, since your case seems to be the same as of them – even though they are using another language, which should not be the problem.
I would recommend you to try following the below steps:
-
Open the Firebase Console, open or create a new project.
-
In the Database section, click the Get Started button for Cloud Firestore.
-
Select a starting mode for your Cloud Firestore Security Rules: Test mode or Locked mode
-
Click Enable.
Another option, would be to check any antvirus or firewall that might be blocking your application to access Firestore in the backend.
Besides that, if even after all of these steps and tests you are still facing the issue, I would recommend you to reach out to the Firebase/Firestore Support directly. They have some free options to contact them and since they are the direct developers, I believe they should be able to investigate further in case it’s needed.