firebase-js-sdk
firebase-js-sdk copied to clipboard
getCountFromServer does not accept startAfter Query Constraint
Operating System
macOS 14.4.1 (23E224)
Browser Version
Arc Version 1.42.0 (49714)
Firebase SDK Version
10.11.1
Firebase SDK Product:
Firestore
Describe your project's tooling
Nest.js app with webpack
Describe the problem
When calling getCountFromServer
with no orderBy
constraints and a startAfter
constraint accepting a snapshot the following error was raised:
3 INVALID_ARGUMENT: Cursor has too many values
Steps and code to reproduce issue
Call getCountFromServer
with a query using a startAfter
constraint.
Hi @bridges-wood!
Congratulations, I think you might have found a bug. Looking through the SDK code, I have a theory as to why this might happen.
I still need to reproduce the bug, at which point we can prioritize fixing this. I'll update this issue as we make progress.
Thanks for reporting this!
Here's a follow up for you @bridges-wood.
Cursor support in aggregations is a known limitation. To make this work will require some engineering work. I cannot make any promises on when this work will be prioritized, as we are also working on other query features.
@tom-andersen Thanks for the update.