googlearchive / firebase-dart

Dart wrapper for Firebase
https://pub.dev/packages/firebase
404 stars 144 forks source link

Uncaught FirebaseError: Function DocumentReference.set() called with invalid data. Unsupported field value: undefined (found in field name) #327

Closed aravind1999 closed 3 years ago

aravind1999 commented 4 years ago

I am trying ot use firebase to create a chatting app. But when i try to send a message it shows me this error

Console log: Uncaught FirebaseError: Function DocumentReference.set() called with invalid data. Unsupported field value: undefined (found in field name) at new ni (http://localhost:5000/__/firebase/7.15.5/firebase-firestore.js:1:50833) at cf.ka (http://localhost:5000/__/firebase/7.15.5/firebase-firestore.js:1:175994) at http://localhost:5000/__/firebase/7.15.5/firebase-firestore.js:1:180040 at ff (http://localhost:5000/__/firebase/7.15.5/firebase-firestore.js:1:180078) at http://localhost:5000/__/firebase/7.15.5/firebase-firestore.js:1:180191 at jr (http://localhost:5000/__/firebase/7.15.5/firebase-firestore.js:1:45676) at lf (http://localhost:5000/__/firebase/7.15.5/firebase-firestore.js:1:180166) at hf.Ja (http://localhost:5000/__/firebase/7.15.5/firebase-firestore.js:1:176706) at Up.set (http://localhost:5000/__/firebase/7.15.5/firebase-firestore.js:1:264059) at Dp.add (http://localhost:5000/__/firebase/7.15.5/firebase-firestore.js:1:280639) ni @ firebase-firestore.js:1 cf.ka @ firebase-firestore.js:1 (anonymous) @ firebase-firestore.js:1 ff @ firebase-firestore.js:1 (anonymous) @ firebase-firestore.js:1 jr @ firebase-firestore.js:1 lf @ firebase-firestore.js:1 hf.Ja @ firebase-firestore.js:1 Up.set @ firebase-firestore.js:1 Dp.add @ firebase-firestore.js:1 saveMessage @ main.js:65 onMessageFormSubmit @ main.js:124

main.js error occurence:

// Check that the user entered a message and is signed in. if (messageInputElement.value && checkSignedInWithMessage()) { saveMessage(messageInputElement.value).then(function () {

Help me rectify this

kevmoo commented 3 years ago

I need to know what type of data you're trying to set.

no-response[bot] commented 3 years ago

Without additional information we're not able to resolve this issue, so it will be closed at this time. You're still free to add more info and respond to any questions above, though. We'll reopen the case if you do. Thanks for your contribution!