Open When - An Expo + Firebase Firestore Platform

I was able to fix doing the following:

  • Downgrading to firebase 7.9.0 (newer versions seem not to be fully compatible with expo)
  • using these import statements and initializations
import * as firebase from 'firebase'
import "firebase/firestore"
const db = firebase.firestore();

I had the same problem, but the solution it isn’t downgrading the version for the firebase package. Searching on the internet and other people with the same error, I was found these:

  • The firefire firebase does not show any error messages and finding a solution is very difficult
  • The default configuration on firestore put false the condition rules for security, and this is the real problem.

Finally, the solution is changing the rule on the firestore.

rules_version = ‘2’;
service cloud.firestore {
match /databases/{database}/documents {
match /{document=**} {
allow read, write: if TRUE # change FALSE for TRUE

Expo + Firestore has become my go-to stack for all apps. I’ve built a number of libraries/products around it. In case it’s useful for anyone here:

1 Like