I just updated my Expo mobile application from firebase@9.0.0-beta.7 to firebase@9.0.1 and came across following error: @firebase/firestore: Firestore (9.0.0): Could not reach Cloud Firestore backend. Backend didn't respond within 10 seconds
.
I'm running mobile app in Expo Go with android studio emulator.
In application Auth works fine as I can log user in and out but when I try to do something with Firestore I get following error: Failed to get document because the client is offline.
This happens for example in basic getDoc() function
const dbRef = doc(db, 'exampleColletion', 'id');
await getDoc(dbRef).then(document => {
const information = document.data();
if (information !== undefined) {
eventsRetreived(information);
}
}).catch((err) => {
eventsRetreived(err);
console.log(err.message)
})
I have made some test by using either firebase@9.0.1
or firebase@9.0.0
but in both I face the same problem but in firebase@9.0.0-beta.7
everything is working fine (and I'm not changing any code but changing only the version of firebase).
If more code or information is needed plz tell what I need to add and I will edit this post as needed.
EDIT
Found related github issue but even is closed I'm still facing the issue after testing firebase@9.0.2
https://github.com/firebase/firebase-js-sdk/issues/5402
EDIT2
Seems like issue is appearing in Expo v. 42. At the moment Expo support by default compat version of Firebase so the solution at the moment is to use firebase@9.0.0-beta.7
or compat version that is supported by Expo and is installed through expo install firebase