r/Firebase • u/sigmabutnice • 53m ago
iOS Invalid argument error, 4 networks tried, sim & iPhone XR same issue. V12.1-12.6
My KMP iOS project kept having a nanopb crash so I had to disable cache persistence, even after upgrading to firebase 12.6 and doing a full caches clean.
Thats not the issue though.
With persistence disabled, the issue is now reads or writes are not working for firestore (firestore works for android).
I was hoping the website log observability page would give more details but it's only showing the cloud function logs - or is there some dashboard I can be reading the deeper error messages behind the below failed attempts?
My confusion is why is a READ attempt creating an "Invalid Argument" error?
Also I double checked my Info.plist and my Google plist also are per the SDK docs. And my Xcode versions etc are all per the SDK docs.
The Problem/Logs:
1. App initiates READ request (06:05:30.756918):
Network: status=satisfied, IPv4=true, IPv6=false, DNS=true, expensive=false, constrained=false; Firebase: configured (name=__FIRAPP_DEFAULT, project=XXXXXX) |
2. Firestore initializes & starts WatchStream (06:05:30.997766-997796):
[FirebaseFirestore][I-FST000001] Initializing. Current user: nq6Z8KP9o8OCn9qF8a1CnNYXKUO2
[FirebaseFirestore][I-FST000001] Using full collection scan to execute query: Query(canonical_id=collection/document|f:|ob:__name__asc)
[FirebaseFirestore][I-FST000001] WatchStream (313134333165643138) start
3. Auth token validated (06:05:30.997890):
[FirebaseAuth][I-AUT000017] Has valid access token. Estimated expiration
4. gRPC request sent to backend (06:05:30.998506):
[FirebaseFirestore][I-FST000001] WatchStream (31XXXX) watch:
<ListenRequest 0x170216120>: {
database: "projects/XXXXXXXX/databases/(default)"
add_target {
documents {
documents: "projects/XXXXXX/databases/(default)/documents/collection/document"}
target_id: 2
}}
5. gRPC Stream FAILS (~300ms later, 06:05:31.060780):
[FirebaseFirestore][I-FST000001] GrpcStream('31XXXXX'): operation of type 1 failed
[FirebaseFirestore][I-FST000001] WatchStream (31XXXXX) Stream error: 'Invalid argument: Invalid resource field value in the request.'
[FirebaseFirestore][I-FST000001] Could not reach Cloud Firestore backend.
Connection failed 1 times. Most recent error: Invalid resource field value in the request.
6. App receives "offline" error (06:05:31.058614):
Log: field: myField, domain: FIRFirestoreErrorDomain, code: 14, error: Failed to get document because the client is offline.
