Firebase query returning less documents than requested the first time.

I have a firebase query to get all documents posted by the authenticated user by using a filter sort of like: "posted_by == authenticateduser". I also set the grid view to infinite scroll with a page size of 10. and then I order by time created in decreasing order. Now the problem is when I run my app in test mode/run mode and navigate to the page with this query, it only returns the same 3 documents the first time. I can then navigate to any other page and then navigate back to the page and then it gives me all the documents I am expecting, and continues to work fine afterwards. If I refresh the session or start a new one, I experience the same problem again the first time navigating to that page. There are no caches on the query. It is almost like the query needs a warm up or a refresh before giving me all my results. Has anyone experienced something similar and does anyone have an idea on how to fix it please?

1
5 replies