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

Published on:
Last updated:

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

React Native, While developing using the Firebase SDK( ) 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( ).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.

Kuniyoshi Takemoto is the founder of LLC, and editor of this blog( more and follow me on LinkedIn.