dart_firebase_admin icon indicating copy to clipboard operation
dart_firebase_admin copied to clipboard

Fetching Firestore Documents results in parsing error

Open markbreuss opened this issue 1 year ago • 0 comments
trafficstars

I tried this lib for a couple of collections which all worked fine.

On a given collection however I get this error:

ERROR - 2024-03-30 15:11:12.058685 POST /apps/execute_automation Error thrown by handler. type 'String' is not a subtype of type 'num' in type cast package:firebaseapis/firestore/v1.dart 5451:39 new Value.fromJson package:firebaseapis/firestore/v1.dart 4604:27 new MapValue.fromJson. dart:collection MapBase.map package:firebaseapis/firestore/v1.dart 4601:74 new MapValue.fromJson package:firebaseapis/firestore/v1.dart 5461:26 new Value.fromJson package:firebaseapis/firestore/v1.dart 2449:41 new ArrayValue.fromJson. dart:_internal ListIterable.toList package:firebaseapis/firestore/v1.dart 2451:20 new ArrayValue.fromJson package:firebaseapis/firestore/v1.dart 5441:28 new Value.fromJson package:firebaseapis/firestore/v1.dart 2958:27 new Document.fromJson. dart:collection MapBase.map package:firebaseapis/firestore/v1.dart 2955:74 new Document.fromJson package:firebaseapis/firestore/v1.dart 5057:26 new RunQueryResponseElement.fromJson package:firebaseapis/firestore/v1.dart 1888:49 ProjectsDatabasesDocumentsResource.runQuery. dart:_internal ListIterable.toList package:firebaseapis/firestore/v1.dart 1890:10 ProjectsDatabasesDocumentsResource.runQuery

Which is this line: image

I could not pinpoint the exact document that got it to fail but this is the general data structure: image

markbreuss avatar Mar 30 '24 14:03 markbreuss