firebase / firebase/firebase-js-sdk

RFC: Usage of experimentalForceLongPolling option.

Open
#1,674 239 comments 43 reactions 0 assignees View on GitHub
api: firestore needs-attention question
Dominant language
TypeScript
Stars
5.1k
Forks
1k
Avg merge
2d 21h
Merged PRs (30d)
37

Description

Are you experiencing the error `Could not reach Cloud Firestore backend. Backend didn't respond within 10 seconds` despite your network seeming healthy? Please visit https://debug-my.firebaseapp.com/ and check the results at the end. If the tests "with default options" fail (or are very slow) but the "with forceLongPolling" ones succeed, then this indicates your traffic is likely going through a proxy that is buffering responses in a way that is not compatible with Firestore.

As a workaround, you can [force long-polling](https://firebase.google.com/docs/reference/js/firebase.firestore.Settings.html#experimentalforcelongpolling) as follows:
```
firebase.firestore().settings({ experimentalForceLongPolling: true });
```

## Have you enabled `experimentalForceLongPolling` and `experimentalAutoDetectLongPolling` to solve a reproducible connection issue related to a specific environment?

We would like to know:

1. What environment causes the problem (app platform, antivirus software, network proxy, network conditions, etc.)?
2. What is the behavior without `experimentalForceLongPolling` or `experimentalAutoDetectLongPolling`?
3. Does `experimentalAutoDetectLongPolling` completely resolve the issue?
3. Does `experimentalForceLongPolling` completely resolve the issue?
4. Please visit https://debug-my.firebaseapp.com/, wait for "All tests done" (about 60 seconds), paste the results into a [gist](https://gist.github.com/), and paste the link in your comment.

If there is an existing comment concerning the environment you are using, feel free to just add a 👍 to it.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.