[email protected] cause "Could not reach Cloud Firestore backend." error.
Operating System
Windows 11
Browser Version
Chrome 120.0.0.0
Firebase SDK Version
10.7.2
Firebase SDK Product:
Firestore
Describe your project's tooling
React 18 with craco.
I used react-query@^3 and @react-query-firebase/firestore to use firebase with hook.
Actually @react-query-firebase/firestore depends on firebase@^9, but I think there doesn't seem to be a significant relationship, as there are no issues observed with version [email protected].
Describe the problem
Console
Network
Description
I have encountered the 'offline' error in my project today, and the issue occurs only when accessing a specific Firestore document. Intermittently, it success to access the document, but most of the time, the error occurs.
Though not certain, it seems suspicious when the document name or path contains an _(it just a speculation...).
The recent change in my project was upgrading from firebase@^9 to firebase@^10.
So, after downgrading to firebase@9, the problem was resolved.
However, to pinpoint the exact version where the issue occurred, I conducted tests by incrementally upgrading the minor version starting from 10.0.0.
The error did not occur up to version 10.6.0, but it occurs with version 10.7.0.
Steps and code to reproduce issue
It might be challenging to implement reproduction steps since the problem occurs intermittently with a specific document.
Hi @youngeun-ahn, thank you for filing this issue. I have a suspect, but not sure if it is the root cause. Could you please try enabling the experimentalForceLongPolling and see if it solves the problem?
Other than that, let's try setting debug level logging to get more log info. Is there any abnormal activity in network tab while this bug happens?
Hello @milaGGL . I apologize for the delayed response. I was on a trip this week, so I couldn't check your message earlier.
I tried enabling the experimentalLongPolling option and checking with debug-level logs.
But the bug still occurred and I couldn't find any suspicious logs.
One difference thing is that there are no occurrences of "404" in the network tab.
Screenshots
I've obscured my project name in the screenshot
| Console | Network |
|---|---|
Strange. Would you be able to provide a minimal repro app so that I can reproduce and debug it on my end?
Hey @youngeun-ahn. We need more information to resolve this issue but there hasn't been an update in 5 weekdays. I'm marking the issue as stale and if there are no new updates in the next 5 days I will close it automatically.
If you have more information that will help us get to the bottom of this, just add a comment!
Hi @youngeun-ahn
there is an issue with Firebase JS SDK from 10.7.0 and above. So I advise you to use 10.6.0 untile new release is published.
Thank you
REF: https://github.com/firebase/firebase-js-sdk/issues/8017#issuecomment-1938183043
Hey @youngeun-ahn. We need more information to resolve this issue but there hasn't been an update in 5 weekdays. I'm marking the issue as stale and if there are no new updates in the next 5 days I will close it automatically.
If you have more information that will help us get to the bottom of this, just add a comment!
Since there haven't been any recent updates here, I am going to close this issue.
@youngeun-ahn if you're still experiencing this problem and want to continue the discussion just leave a comment here and we are happy to re-open this.