Using React Native Firebase instance for React Redux Firebase setup - FirebaseError: Firebase: Need to provide options

178 Views Asked by At

I am attempting to migrate to using React Native Firebase with an app that was previously using React Redux Firebase with the Firebase Web JS SDK. I want to use a Firestore instance with this app.

I am following the instructions per React-Redux-Firebase integration of native modules.. Here is what my App.tsx looks like roughly.

import RNFirebase from '@react-native-firebase/app';
import '@react-native-firebase/auth';
import '@react-native-firebase/firestore';

import { ReactReduxFirebaseProvider, firebaseReducer } from 'react-redux-firebase'
import { createFirestoreInstance } from "redux-firestore"; // <- needed if using firestore

// Have also tried const firebase = RNFirebase.app() and passing this into the rrfProps below with no luck


const rrfConfig = {
  userProfile: "users",
  useFirestoreForProfile: true, // Firestore for Profile instead of Realtime DB
};

const rootReducer = combineReducers({
 firebase: firebaseReducer
 firestore: firestoreReducer // <- needed if using firestore
})

const initialState = {}
const store = createStore(rootReducer, initialState)

const rrfProps = {
 firebase: RNFirebase,
 config: rrfConfig,
 dispatch: store.dispatch,
 createFirestoreInstance // <- needed if using firestore
}

...

I am using Expo Managed Workflow and have done the proper setup to link the Google-Services-Info.plist to my Expo development build. However, when attempting to bundle and load my app in my development build, I receive the following error:

FirebaseError: Firebase: Need to provide options, when not being deployed to hosting via source. (app/no-options).

I have tried following the steps listed in @react-native-firebase integration with react-redux-firebase V3 but I have had no luck with solving this issue. Any help would be appreciated.

0

There are 0 best solutions below