Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

176
Views
add subcollection to existing doc
    const chatRef = collection(db, 'chats', uuid, 'messages');
    await addDoc(chatRef, {
        timestamp: serverTimestamp(),
        message: Input,
        user: user.email,
        photoURL: user.photoURL,
    });

I'm trying to add a subcollection to chats/uui but it doesn't work

Im getting this error code :

Unhandled Runtime Error
Error: FIRESTORE (9.6.8) INTERNAL ASSERTION FAILED: Unexpected state

Source
components\ChatScreen.js (76:21) @ _callee$

  74 | 
  75 |         const chatRef = collection(db, 'chats', uuid, 'messages');
> 76 |         await addDoc(chatRef, {
     |                     ^
  77 |             timestamp: serverTimestamp(),
  78 |             message: Input,
  79 |             user: user.email,
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!