React-redux-firebase: bug(profile): firebase v5.0.* causes userData.uid is undefined when creating profile

Created on 16 May 2018  路  3Comments  路  Source: prescottprue/react-redux-firebase

What is the current behavior?

I'm probably missing something obvious, but I keep getting an error where undefined is provided in place of string when trying to write profile with creating new user.

image

It appears that in createUserProfile it attempts to access uid on userData, but it actually is found a layer deeper on user.

image

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem via codesandbox or similar.

onSubmit:

    this.props.firebase.createUser({
      email: values.email,
      password: values.password,
    }, {
      email: values.email,
      organization: values.organization,
    });

rrfConfig:

const rrfConfig = {
  enableLogging: false,
  useFirestoreForProfile: true,
  userProfile: 'users',
};

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

I'm using:

"firebase": "^5.0.1",
"react-redux-firebase": "^2.1.1",
"redux-firestore": "^0.5.2",
bug

Most helpful comment

I should mention that this issue also affects firebase.

Looks like an issue with compatibility with firebase versions 5.X.X

Downgrading to a 4.X.X version (4.6.0 to be precise) resolved this for me. Will continue to follow this and upgrade firebase back to 5.X.X when it is closed.

All 3 comments

I should mention that this issue also affects firebase.

Looks like an issue with compatibility with firebase versions 5.X.X

Downgrading to a 4.X.X version (4.6.0 to be precise) resolved this for me. Will continue to follow this and upgrade firebase back to 5.X.X when it is closed.

@kx-emeka Great to know, thanks for reaching out.

Looking into this today.

Fixed in v2.1.2 release.

Was this page helpful?
0 / 5 - 0 ratings