Closed GiomScript closed 4 months ago
This looks similar to https://github.com/firebase/firebase-js-sdk/issues/7354
Edit: Nevermind. The error looks similar, but ERROR Error checking if following: [FirebaseError: Failed to get document because the client is offline.]
tells me this is a different issue.
Hi,It looks similar, but it has never been resolved. Thanks.Best regards,GiorgiOn
Hi,It looks similar, but it has never been resolved. Thanks.Best regards,GiorgiOn May 31, 2024, at 12:21 PM, Daniel La Rocque @.> wrote: This looks similar to #7354 —Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.>
Hi @GiomScript does the issue occur if experimentalForceLongPolling
is set to false
?
Yes, I have tried all options here true or false, no difference:
export const db = initializeFirestore(app, { experimentalForceLongPolling: true, // useFetchStreams: false, // experimentalAutoDetectLongPolling: false, });
Hi @GiomScript. Thanks for the report. I'll take a look next week.
Could you tell me, is this issue 100% reproducible? Are you able to connect to Firestore at all? Or does it just happen sometimes for some requests? Thank you.
Hi Denver,I can connect to Firestore, but get disconnected in a couple of seconds. It does fetch the data initially, but disconnects and does not reconnect, says the client is offline.Thanks for taking the time to look into it.
Thanks. If you're able, could you enable debug logging by calling setLogLevel('debug')
, reproduce, then capture the logs for the entire application? You can post the logs at https://gist.github.com/, and can share them directly with me if you're worried about sharing any secrets.
After looking at this issue more, I need some logs from you in order to continue investigation. Please provide full debug logs.
Hi,Sorry, I was busy with some other project. I will try to get to it tomorrow. I have not done full debugging before. Do I just put it at the App.js or every point I’m communicating with Firestore?
You only need to call it once, at the beginning of your application
Hi,I’m having trouble with dependencies that setLogLevel from @optimizely/react-sdk use. I tried other logger libraries and had to build issues on EAS dev builds on all of them. I will continue working on this tomorrow and keep you updated. Thanks for your patience.
Would something like this work:
import { setLogLevel as setFirestoreLogLevel } from "firebase/firestore";
setFirestoreLogLevel('debug');
[edited by @dconeybe] I moved the logs to https://gist.github.com/dconeybe/cfeb5f7384d6b29ef5ba42248af67dfb to keep this issue easy to scroll trough.
I see 2 occurrences of this in the logs:
LOG [2024-06-07T16:53:52.284Z] @firebase/firestore: Firestore (10.12.2):WebChannelConnection RPC 'BatchGetDocuments' 0x29424ef2 failed with status:0 response text:The operation couldn’t be completed. No space left on device
It looks like your app may have exhausted its disk space allocation. The error of "'Listen' stream 0x8ad3222a transport errored" is pretty misleading in this case. Could you double-check this?
[edited by @dconeybe] I moved the logs to https://gist.github.com/dconeybe/3a59f138e2c16b3a4b060cd87558eacf to keep this issue easy to scroll trough.
@GiomScript Thanks for the updated logs. I'm investigating them with a team mate.
I have one question though: Do you documents include any non-ASCII characters in their names of contents? I'm asking because we recently fixed a bug related to UTF-8 encoding of characters that require more than one byte being split across internal buffer boundaries, which should be fixed in this version.
Thanks for your help!I don’t think that’s the case. Documents are videos and images uploaded from iPhones. Please let me know if you have any questions.
How large are the videos and images? Note that Firestore documents have a maximum size of 1 MiB (1,048,576 bytes).
See https://firebase.google.com/docs/firestore/quotas
To store large files, consider using Cloud Storage for Firebase instead, as that is its intended use case: https://firebase.google.com/docs/storage
Files are uploaded to the Firebase storage and file paths are uploaded to the Firestone. Files are compressed before upload.I had no issues, the problem just started couple weeks ago and it has gotten worse lately.
Hmm ok. Could you try to create a minimal application that can be used to reproduce the problem? That would really help narrow down the investigation.
I just started testing the app in Apple TestFlight, and so far it’s performing fine. Let me see if it is my local development setup that’s causing this problem. I will let you know how it goes in the next week. Again, thanks for your help. Have a great weekend!
Hey @GiomScript. 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.
@GiomScript 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.
I faced this issue, it turned our when I created firestore I didn't choose the (default) name, instead I gave it a custom name. That was a mistake
Operating System
ios 17.5.1
Browser Version
Expo
Firebase SDK Version
10.12.2
Firebase SDK Product:
Auth, Database, Firestore, Storage
Describe your project's tooling
React Native with Expo
Describe the problem
I am experiencing a persistent issue with my React Native application that uses Firebase Firestore for data storage and retrieval. The app frequently encounters errors indicating that the client is offline, even though the device has an active internet connection. This problem occurs when attempting to fetch data from Firestore, such as checking if a user is following another user or fetching posts. The errors disrupt the normal functionality of the app and prevent data from being retrieved or displayed correctly.
Here are the specific error messages encountered:
These errors occur intermittently but often enough to significantly impact the user experience. The app is built using React Native and uses Firebase Firestore for backend services.
Steps and code to reproduce issue
https://gist.github.com/dconeybe/51a2cc3ea9760bd9050ccf138c15475f