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

554
Views
Firestore - Exception 'FIRInvalidArgumentException', reason: 'Unsupported type: _SwiftValue'

Terminating app due to uncaught exception 'FIRInvalidArgumentException', reason: 'Unsupported type: _SwiftValue'

I' trying to create or update document in Firestore and getting that error.

DispatchQueue.main.asyncAfter(deadline: .now() + 0.2, execute: {

         let docData: [String: Any] = [
              "firebase_buyer_id": "222", // todo - set buyer id correctly
              "firebase_seller_id": "String(describing: self!.ad.ownerId)",
              "reference_object": [        
                   "reference_object_id": "testing_id",
                   "last_updated_time": Timestamp(date: Date()),
                   "chat_item_list": [
                                    {
                                        [
                                            "chat_id": "12", // set chat id
                                            "owner_id": "222",
                                            "time_stamp": Timestamp(date: Date()),
                                            "message": "testing message - hi, message send successfully"
                                        ]
                                    }
                  ]
             ]
          ]

          self!.db.collection((self?.collectionName)!).document((self?.refId)!).setData(docData){ err in
                  if let err = err {
                        print("Error writing document: \(err)")
                  } else {
                        print("Document successfully written!")
                  }
           }
 })
over 4 years ago · Santiago Trujillo
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!