prescottprue / react-redux-firebase

Redux bindings for Firebase. Includes React Hooks and Higher Order Components.
https://react-redux-firebase.com
MIT License
2.55k stars 558 forks source link

Profile not populated with with "users" collection in firestore #1079

Open sbodrero opened 3 years ago

sbodrero commented 3 years ago

What is the current behavior? Hi, as my config is describe under i want firebase profile to populate with my "users" collection from firestore:

const rrfConfig = {
  useFirestoreForProfile: true, // Firestore for Profile instead of Realtime DB
  userProfile: 'users', // firebase root where user profiles are stored
  logErrors: false,
  enableLogging: true, // enable/disable Firebase's database logging
  fileMetadataFactory: (uploadRes, firestore, metadata, downloadURL) => {
    // upload response from Firebase's storage upload
    const { metadata: { name, fullPath } } = uploadRes;
    // default factory includes name, fullPath, downloadURL
    return {
      name,
      fullPath,
      downloadURL
    };
  }
};

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

const Root = () => (
  <Provider store={store}>
    <ConnectedRouter store={store} history={history}>
      {/* eslint-disable-next-line react/jsx-props-no-spreading */}
      <ReactReduxFirebaseProvider {...rrfProps}>
        <App />
      </ReactReduxFirebaseProvider>
    </ConnectedRouter>
  </Provider>
);

What is the expected behavior?

my profile state only shows isEmpty(pin):true isLoaded(pin):false

I use RRF in an other project with the same config and it works :-/

Which versions of dependencies, and which browser and OS are affected by this issue? Did this work in previous versions or setups?

"react-redux-firebase": "^3.10.0",

Really really thank you forward

choipd commented 3 years ago

Have you set useFirestoreForStorageMeta: true in rrfConfig?