-
Notifications
You must be signed in to change notification settings - Fork 934
Firestore: No reponse form the getDocs() when used with the query constraints endBefore & limitToLast #6158
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
Comments
I can confirm that |
Just want to provide an update: there is another bug reported on endBefore and limitToLast, and it is fixed via: #6168 Although the two reports do not have the same symptom, it is possible that they are from different platforms. Let's wait to see if the next release did fix the issue. We will look into this again if it does not. |
@wu-hui Thanks for the fix. I have tested this in the One suggestion: in the future, please ensure that it throws some errors when awaiting a response from the async functions if something goes wrong with some kind of timeout or any other solution. Because when the async functions do not respond, the app exhibits undesirable behaviour. Please close this issue if it can be closed without any further action needed. Thanks. |
I just tested const activeUsers = await getDocs(query(colRef, where('status', '==', 'active')))
console.log('resolved!') |
Thanks for confirming! I do not know why it manifest as a timeout in your environment, maybe something we should look into. Are you reporting a new issue, or you are experiencing the same issue with It seems like you are reporting a new one, from the snippet you pasted. I am going to close this one, and feel free to open a new ticket for your issue. |
Hi @wu-hui, I considered the issues to be the same or have the same root cause. My observation is that const activeUsers = await getDocs(query(colRef, where('status', '==', 'active')))
console.log('resolved!') // <-- never reached |
I can confirm that this now works for me |
For some reason this doesnt get data for me. ^ But this does: |
[REQUIRED] Describe your environment
[REQUIRED] Describe the problem
There was no response from the
getDocs()
function when used with query constraintsendBefore
&limitToLast
.Earlier, this was working on the
Beta
(9.0.0-beta.8) version of the SDK. After an upgrade to thelatest
version, it broke.My main concern is that while awaiting a response from the getDocs function, it does not throw any errors either.
Steps to reproduce:
orderBy(name)
andlimit(5)
.startAfter(page1 last cursor)
,orderBy(name)
andlimit(5)
.endBefore(page2 first cursor)
,orderBy(name)
andlimitToLast(5)
.Relevant Code:
The text was updated successfully, but these errors were encountered: