atn832 / fake_cloud_firestore

BSD 2-Clause "Simplified" License
118 stars 88 forks source link

type 'MethodChannelFieldValue' is not a subtype of type 'MockFieldValuePlatform' in type cast #281

Open gert7 opened 7 months ago

gert7 commented 7 months ago

I'm experiencing an exception when running flutter test, but not when executing the test individually:

type 'MethodChannelFieldValue' is not a subtype of type 'MockFieldValuePlatform' in type cast
│  #0      MockDocumentReference._applyValues (package:fake_cloud_firestore/src/mock_document_reference.dart:163:48)
│ #1      MockDocumentReference._applyValues.<anonymous closure> (package:fake_cloud_firestore/src/mock_document_reference.dart:154:9)
│ #2      _LinkedHashMapMixin.forEach (dart:collection-patch/compact_hash.dart:625:13)
│ #3      MockDocumentReference._applyValues (package:fake_cloud_firestore/src/mock_document_reference.dart:153:13)
│ #4      MockDocumentReference._applyValues.<anonymous closure> (package:fake_cloud_firestore/src/mock_document_reference.dart:154:9)
│ #5      _LinkedHashMapMixin.forEach (dart:collection-patch/compact_hash.dart:625:13)
│ #6      MockDocumentReference._applyValues (package:fake_cloud_firestore/src/mock_document_reference.dart:153:13)
│ #7      MockDocumentReference._setRawData.<anonymous closure> (package:fake_cloud_firestore/src/mock_document_reference.dart:138:7)
│ #8      _LinkedHashMapMixin.forEach (dart:collection-patch/compact_hash.dart:625:13)
│ #9      MockDocumentReference._setRawData (package:fake_cloud_firestore/src/mock_document_reference.dart:118:10)
│ #10     MockDocumentReference.set (package:fake_cloud_firestore/src/mock_document_reference.dart:215:12)
│ <asynchronous suspension>
│ #11     StackZoneSpecification._registerUnaryCallback.<anonymous closure> (package:stack_trace/src/stack_zone_specification.dart:124:15)
│ <asynchronous suspension>
ming-chu commented 6 months ago

@gert7 Would you please provide the minimal code to reproduce the issue?