-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
🐛 [cloud_firestore] Generated whereDocumentId not working #11
Comments
Similar issue in other generated query. For the following odm generated code,
the condition is automatically added and hence the queries are not working. [FieldPath([celebrityId]), ==, null] Flutter dependencies (different from the main issue reported)Run Click To Expand
|
This is blocking my work. The setup is not working even if I switch back to older versions of the dependencies. |
See #7 Everything works fine with those versions for me:
|
Bug report
cloud_firestore: ^4.15.6
cloud_firestore_odm: ^1.0.0-dev.83
cloud_firestore_odm_generator: ^1.0.0-dev.83
With the above versions of dependencies, I have generated the cloud firestore code using code generation plugin for my schema.
child: FirestoreQueryBuilder(
query: creatorsRef.whereDocumentId(isEqualTo:"1cZZL06nxrY5Yy9ASZtu").reference, builder:...)
I am getting the following error. Similar issue is happening in iOS.
/FLTFirestoreMsgCodec(26660): An error occurred while parsing query arguments, this is most likely an error with this SDK.
E/FLTFirestoreMsgCodec(26660): java.lang.IllegalArgumentException: Invalid query. When querying with FieldPath.documentId() you must provide a valid String or DocumentReference, but it was of type: null
E/FLTFirestoreMsgCodec(26660): at com.google.firebase.firestore.Query.parseDocumentIdValue(Query.java:527)
E/FLTFirestoreMsgCodec(26660): at com.google.firebase.firestore.Query.parseFieldFilter(Query.java:439)
E/FLTFirestoreMsgCodec(26660): at com.google.firebase.firestore.Query.parseFilter(Query.java:485)
E/FLTFirestoreMsgCodec(26660): at com.google.firebase.firestore.Query.where(Query.java:400)
E/FLTFirestoreMsgCodec(26660): at com.google.firebase.firestore.Query.whereEqualTo(Query.java:109)
E/FLTFirestoreMsgCodec(26660): at io.flutter.plugins.firebase.firestore.utils.PigeonParser.parseQuery(PigeonParser.java:180)
E/FLTFirestoreMsgCodec(26660): at io.flutter.plugins.firebase.firestore.FlutterFirebaseFirestorePlugin.querySnapshot(FlutterFirebaseFirestorePlugin.java:897)
E/FLTFirestoreMsgCodec(26660): at io.flutter.plugins.firebase.firestore.GeneratedAndroidFirebaseFirestore$FirebaseFirestoreHostApi$-CC.lambda$setup$20(GeneratedAndroidFirebaseFirestore.java:2492)
E/FLTFirestoreMsgCodec(26660): at io.flutter.plugins.firebase.firestore.GeneratedAndroidFirebaseFirestore$FirebaseFirestoreHostApi$$ExternalSyntheticLambda3.onMessage(Unknown Source:2)
E/FLTFirestoreMsgCodec(26660): at io.flutter.plugin.common.BasicMessageChannel$IncomingMessageHandler.onMessage(BasicMessageChannel.java:261)
E/FLTFirestoreMsgCodec(26660): at io.flutter.embedding.engine.dart.DartMessenger.invokeHandler(DartMessenger.java:292)
E/FLTFirestoreMsgCodec(26660): at io.flutter.embedding.engine.dart.DartMessenger.lambda$dispatchMessageToQueue$0$io-flutter-embedding-engine-dart-DartMessenger(DartMessenger.java:319)
E/FLTFirestoreMsgCodec(26660): at io.flutter.embedding.engine.dart.DartMessenger$$ExternalSyntheticLambda0.run(Unknown Source:12)
E/FLTFirestoreMsgCodec(26660): at android.os.Handler.handleCallback(Handler.java:938)
E/FLTFirestoreMsgCodec(26660): at android.os.Handler.dispatchMessage(Handler.java:99)
E/FLTFirestoreMsgCodec(26660): at android.os.Looper.loopOnce(Looper.java:210)
E/FLTFirestoreMsgCodec(26660): at android.os.Looper.loop(Looper.java:299)
E/FLTFirestoreMsgCodec(26660): at android.app.ActivityThread.main(ActivityThread.java:8293)
E/FLTFirestoreMsgCodec(26660): at java.lang.reflect.Method.invoke(Native Method)
E/FLTFirestoreMsgCodec(26660): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:556)
E/FLTFirestoreMsgCodec(26660): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1045)
Steps to reproduce
Steps to reproduce the behavior:
Expected behavior
A clear and concise description of what you expected to happen.
Sample project
Providing a minimal example project which demonstrates the bug in isolation from your main App greatly enhances the chance of a timely fix.
Please link to the public repository URL.
Flutter doctor
Run
flutter doctor
and paste the output below:Click To Expand
Flutter dependencies
Run
flutter pub deps -- --style=compact
and paste the output below:Click To Expand
The text was updated successfully, but these errors were encountered: