Open When - An Expo + Firebase Firestore Platform

Ok, well, thanks for the quick response.

I think I’ll eject from expo and try RN FB:

Thanks for that. Did you try also authenticating users and having firestore permissions to read/write only to signed in users? It seems like the request sent from my client always has request.auth null even though user is signed in. Here’s my full question with code on SO:

This is the issue that is tripping us all up:

Various interim solutions are discussed. The specific one I linked to is the first I tried and it worked for me.

Hi, did you find a solution for this problem?


Hi guys,

Those who are testing on android but can’t get firestore to work, I’ve been there too. Here’s the stack overflow question I asked and got a working fix. There’s a deeper insight on the question, if you’re facing the problem.

But now I’m having a different problem, the one that @spettit faced. When I’m trying to enable offline persistence it won’t allow me. I get the following error printed on console:

“Error enabling offline storage. Falling back to storage disabled: FirebaseError: [code=unimplemented]: This platform is either missing IndexedDB or is known to have an incomplete implementation. Offline persistence has been disabled.”

Does anyone know any fix to it?

Thanks in advance

1 Like

In the end I built my app outside expo using react-native-firebase which implements offline persistence out of the box. I’ve not tried it on android but on iOS react-native-firebase does everything I want it to do.

I’ve used this solution to build my firestore app. However, recently I faced security rules are not working properly on this one. Anyone having same issue?

allow read, write: if request.auth != null;

Always failed getting document with request.auth != null option

releated issue is here.

Great to hear that you had such a positive experience.

I’m keen to migrate my app away from Firebase Realtime DB to Firestore, I had a quick crack at it but it’s mostly a rewrite of my actions and cloud functions :frowning: , and it didn’t seem like Firestore had solid support for React Native at the time.

Do you have an Expo link for iOS?

Thanks… it’s working (Y)

import firebase from "firebase"

// Initialize Firebase
var config = {
  apiKey: "XXXX",
  authDomain: "",
  databaseURL: "",
  projectId: "XXX",
  storageBucket: "",
  messagingSenderId: "XXXX"

var db = firebase.firestore();

    var db = firebase.firestore();
    var docRef = db.collection("users");
    const output = {};

		.then(querySnapshot => { (documentSnapshot) {
				return (output[] =;
      this.setState({dataSource: Object.entries(output)}) ;
      console.log("datasource:", this.state.dataSource );
1 Like

Are you getting a massive object as well? Cant work out if I’m doing something wrong or if thats the actual results

1 Like

Does it work yet? I am not able to make it work. Please help me out.

It gives the error - TypeError: _firebase2.default.firestore is not a function. (In ‘_firebase2.default.firestore()’, ‘_firebase2.default.firestore’ is undefined)


1 Like

Have you imported firebase/firestore where you are calling firebase.firestore()



import '@firebase/firestore';

I’m having the same issue as well

TypeError: _firebase2.default.firestore is not a function. (In ‘_firebase2.default.firestore()’, ‘_firebase2.default.firestore’ is undefined)
even when using



import '@firebase/firestore';

Thanks for the help

1 Like

Hey did you get the solution for that even I am getting the same error.

Error: firebase.firestore is not a function. (In ‘firebase.firestore()’, ‘firebase.firestore’ is undefined)

P.S.: I have imported;
import * as firebase from ‘firebase’;
import ‘firebase/firestore’;

It works fine when I use firebase.database(), but I need to use firestore… all my data is in firestore could you help?

I solved it by using

import * as firebase from 'firebase/app';
import 'firebase/firestore';

I think how you import depends on your firebase version.

So what is the version of both the imports


Did you find a solution for this?