Site icon Amelt.net

Firebase SDK:Error “firebase failed to get document because the client is offline…”

Amelt

This post is also available in: 日本語 (Japanese)

React Native, While developing using the Firebase SDK( https://www.npmjs.com/package/firebase ) of npm, I encountered the following error, so I make a note.

@firebase/firestore: Firestore (7.8.1): Could not reach Cloud Firestore backend. Connection failed 1 times. Most recent error: FirebaseError: ...

The cause of the error is not that the android device or emulator you are debugging is offline, but The "databaseURL" setting was missing in the part that defines the Firebase configuration object( https://firebase.google.com/docs/web/setup#config-object ).I think that the same error will occur if the setting is incorrect.

I was developing a login system using the Firebase SDK and set it to store user data in the Cloud Firestore, so I'm sure I got an error.

No tags for this post.