Comments (5)
I'm also Facing the same issue is it resolved? @milch-shake
from react-native-firebase-chat-core.
I'm also Facing the same issue is it resolved? @milch-shake
yeah, i am just using another method:
try {
authResponse = await auth().createUserWithEmailAndPassword( [USER E-MAIL], [PASSWORD HASH]);
} catch (e) {
authResponse = await auth().signInWithEmailAndPassword([USER E-MAIL], [PASSWORD HASH]);
}
from react-native-firebase-chat-core.
I'm also Facing the same issue is it resolved? @milch-shake
yeah, i am just using another method:
try { authResponse = await auth().createUserWithEmailAndPassword( [USER E-MAIL], [PASSWORD HASH]); } catch (e) { authResponse = await auth().signInWithEmailAndPassword([USER E-MAIL], [PASSWORD HASH]); }
so Still the Google sign in is not working right ? @milch-shake
from react-native-firebase-chat-core.
I'm also Facing the same issue is it resolved? @milch-shake
yeah, i am just using another method:
try { authResponse = await auth().createUserWithEmailAndPassword( [USER E-MAIL], [PASSWORD HASH]); } catch (e) { authResponse = await auth().signInWithEmailAndPassword([USER E-MAIL], [PASSWORD HASH]); }
the error is generated from createUserInFirestore function not from user registration function
from react-native-firebase-chat-core.
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:
`/** Creates {@link User} in Firebase to store name and avatar used on rooms list */
const createUserInFirestore = async (user) => {
const dataToSet = {
createdAt: firestore_1.default.FieldValue.serverTimestamp(),
firstName: user.firstName,
imageUrl: user.imageUrl,
lastName: user.lastName,
// Add other fields here if they have values
updatedAt: firestore_1.default.FieldValue.serverTimestamp(),
};
// Remove fields with undefined values
for (const key in dataToSet) {
if (dataToSet.hasOwnProperty(key) && dataToSet[key] === undefined) {
delete dataToSet[key];
}
}
await (0, firestore_1.default)()
.collection(exports.USERS_COLLECTION_NAME)
.doc(user.id)
.set(dataToSet);
};
exports.createUserInFirestore = createUserInFirestore;
`
from react-native-firebase-chat-core.
Related Issues (13)
- Build failed: compileDebugKotlin HOT 4
- Can not create Room using `Id`
- Spread operator should be used instead
- Pagination? HOT 3
- [TypeError: _data$lastSeen.toMillis is not a function. (In '_data$lastSeen.toMillis()', '_data$lastSeen.toMillis' is undefined)] HOT 5
- Is there any way to close room after user report or user block? HOT 1
- Unable to install example HOT 1
- "User is typing" does Flyer chat support this ? HOT 1
- Does Flyer chat support suggested replies for the message received in the chat?
- Preview of an image before uploading it and sending it HOT 1
- Forward message?
- [Expo] Error: You attempted to use a firebase module that's not installed on your Android project by calling firebase.app(). HOT 19
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-native-firebase-chat-core.