[cloud_firestore/invalid-argument] #16784
Unanswered
rashid4kjbn
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
_[cloud_firestore/invalid-argument] Client specified an invalid argument. Note that this differs from failed-precondition. invalid-argument indicates arguments that are problematic regardless of the state of the system (e.g., an invalid field name).
I am getting this error while applying a series of query, it only happens when i applying filter using whereIn on field named
inputTypeId
. Specifically when the list have more than 3 value, when the list have 3 or less values, query is working fine.you can find the query below
.collection("MyCollection") .where("managerUserId", isEqualTo: user.userId) .where("agentUserId", isEqualTo: fieldAssistantUserId) .where("isApproved", isEqualTo: false) .where("rankId", whereIn: farmerCategoryNum.isNotEmpty && contractsInSeason.isEmpty ? farmerCategoryNum : null) .where("jobId", whereIn: contractsInSeason.isEmpty ? null : contractsInSeason) .where("inputTypeId", whereIn: input.isNotEmpty ? input : null) .where("jobMustBeApprovedOn", isLessThan: isUrgent ? getCurrentDateTime() .add(const Duration(days: 15)) .millisecondsSinceEpoch : null) .orderBy("jobMustBeApprovedOn", descending: false)
Beta Was this translation helpful? Give feedback.
All reactions