-
Notifications
You must be signed in to change notification settings - Fork 26
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
Error when using pagination with realtime query #5442
Comments
Here is a video that exemplifies the problem: |
Hello! 👋 Thanks for reaching out! Could you kindly invite me as a collaborator on the test project? I'd like to try something to help troubleshoot the issue. You can invite me using this email: [email protected] Looking forward to your response! 😊 |
Done! :D |
Thank you! |
Hello again! I’ve been testing different approaches, and I noticed that after disabling Infinite Scroll to try something, I encountered several serialization errors. This might be affecting the list and causing it not to refresh as expected. Could you please check the integrity of your documents to see why this error appears when Infinite Scroll is disabled? This might help identify the root cause and potentially resolve the issue. Let me know how it goes, and thanks again for your collaboration! Also it seems that Infinite Scroll package needs an update because is having some issues about the queries: #2843 (comment) |
Hi, I’ve resolved the serialization errors by restoring a Firestore backup. The issue occurred because some documents contained an integer value instead of a string due to schema adaptations, and I hadn’t removed those documents. You should be able to try again now. Let me know if you encounter any issues! PS: I Think that in your tests you are loading the whole collection into memory. |
I'm so sorry for that, I've created new records with the "LiberadaParaFaturamento" situation, so it should work now. (PS: The document numbers may be different from the ones in the first video.) |
It looks like I can now confidently mark this as a bug. Please avoid making any changes to the test project for now. I’ll be sending it to the engineering team for further review. |
Can we access your project?
Current Behavior
I have a component used by both pages and other components (such as inside a bottom sheet). This component receives a String parameter, which is used to filter data in a Firestore query with real-time updates enabled ("Listen for changes" toggled). The parameter can be null; if provided, the query applies the filter; otherwise, it does not.
When I call this component from a bottom sheet with a filter parameter, everything works as expected. However, after closing the bottom sheet and navigating to another page with the same component (but without the filter parameter), the query removes the filter. The issue arises because the query starts from the last known position of the query (or the last rendered component) rather than resetting properly.
After inspecting the generated code and debugging, I suspect the issue occurs because the nextPageMarker is not being reset when the bottom sheet is dismissed (or when pop() is called on the active page).
Here is a snippet of the code:
If I disable the "Listen for changes" option, it does not happen.
Expected Behavior
When the component (or bottom sheet) containing the query is dismissed, and the user navigates to another page that also includes the same component, the query should start from the beginning. It should not continue from the last item that was loaded on the previous page or component.
Steps to Reproduce
Reproducible from Blank
Bug Report Code (Required)
IT4kz/Hqx89Prttc15PTbcZKo2E6Jn56TL07r+5xb0gvIrbyOu9/PffOQBZWYMTiSlNhHFabgj0d7s7GjoSTFfUnFzqaGq5z+sx6ERXvTXq8SpSyPKjpenwnRJ5QJ0id1J6Z2yJTKvNfdGAb3EOpN9itTT7tCZ+/Zwh9f6PHaOI=
Visual documentation
Environment
Additional Information
It is causing problems to my costumers since it is showing incorrect information, so they think that losses some data and opens a support ticket, and, we need realtime data at all instances of this component, so, disabling realtime is not possible.
The text was updated successfully, but these errors were encountered: