-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
React Native createUserInFirestore => Error: Unsupported field value: undefined #36
Comments
I'm also Facing the same issue is it resolved? @milch-shake |
yeah, i am just using another method: try { |
so Still the Google sign in is not working right ? @milch-shake |
the error is generated from createUserInFirestore function not from user registration function |
I research this error and find that , this error comes when we trying to set a field with a value of undefined in firebase firestore . So , i resolved this error by examine all the data-source which we send through createUserInFirebase function, So , i go to the same function in the nodemodule at location node_modules/@flyerhq/react-native-firebase-chat-core/lib/utils.js and add this code which simply remove the key which value undefined and the function works properly:
exports.createUserInFirestore = createUserInFirestore; |
While running createUserInFirestore with minimum setup given from https://docs.flyer.chat/react-native/firebase/firebase-usage
{
firstName: 'John',
id: credential.user.uid, // UID from Firebase Authentication
imageUrl: 'https://i.pravatar.cc/300',
lastName: 'Doe',
}
getting Error: Error: Unsupported field value: undefined
while setting all data:
{
firstName: userData?.fullname,
id: UID,
imageUrl: userData?.imagePath,
lastName: ' ',
metadata: ' ',
lastSeen: firebaseCurrentUser?.metadata?.lastSignInTime,
role : userRole
}
the await will never ends and i didn't get response.
The text was updated successfully, but these errors were encountered: