In the event that you have a stable internet connection and you experience one of the following error notifications:
Could not reach Cloud Firestore backend
Failed to get document because the client is offline
It might be possible that either your network service provider, company firewall or personal anti-virus software does not allow the ports needed to communicate to Firebase over Websockets, and require you to establish a connection using "Long Polling".
Steps to enable "Long Polling" for your device
Note: Long Polling will be set per device, per browser and is not enabled for everyone on your project when changed. Long Polling might have degraded performance when compared to Websockets.
Step 1 - Navigate to "Manage Project"
Figura A - Existing User
Figure B - Pending Invite User
Step 2 - Enable "Long Polling" under your Connection Settings
Toggle the switch to enable the setting
Note: If you are logged into your project, you will automatically be logged out and you need to log into your project after the change for the setting to take effect.
Navigate back to your Project Dashboard and log into your project.
If the above solution does not solve your connection issue, it might be related to your database rules.