Status Update
Comments
pa...@outlook.com <pa...@outlook.com> #2
Hello, can you please attach a sample that reproduces your error?
di...@gmail.com <di...@gmail.com> #3
I’ve attached two screen recordings demonstrating the mediator's behavior during the first and second launches after installation. Additionally,
vl...@dialpad.com <vl...@dialpad.com> #4
Based on first_launch_after_installation.mp4
, your paging state is indeed showing null
for nextKey, so it makes sense that Paging concluded there are no more items to load.
So I think the question is why the PagingState
contains only an empty page and null
values. My guess is either
- RemoteMediator REFRESH actually returned empty data - what is the returned
allNewsItems
value on initial REFRESH? - RemoteMediator REFRESH successfully loaded data and inserted it into database, but Paging hasn't processed that yet by the time Append is triggered, so PagingState is empty.
The second case doesn't seem likely though.
If you attach an executable app, I can look into this further.
Otherwise, you may gain more insight through Paging logs with adb shell setprop log.tag.Paging VERBOSE
. You can also try implementing RemoteKeys
in this
pa...@outlook.com <pa...@outlook.com> #5
Hey! I ran into this same issue. It is in fact the second case you mentioned and is documented
I've published a repo
de...@gmail.com <de...@gmail.com> #6
One more repo with such an issue
For the record, setting enablePlaceholders to true in the PagingConfig appears to mitigate the problem
Yup, it seems it works for a test project but it doesn't work on a prod app.
However,
du...@google.com <du...@google.com>
jb...@google.com <jb...@google.com>
pa...@outlook.com <pa...@outlook.com> #8
Got it. Now that we know you aren't interested in solving this problem we can finally update our project manager on our decision to drop this library as a result. Thanks.
cl...@google.com <cl...@google.com>
la...@gmail.com <la...@gmail.com> #9
sk...@gmail.com <sk...@gmail.com> #10
This bug still exists in version 3.3.5
sk...@gmail.com <sk...@gmail.com> #11
If you use LazyVerticalStaggeredGrid in Compose and set the key, this bug will also cause IndexOutOfBoundsException: index: 60, size: 60 at androidx.paging.pagestore.checkindex
Description
Component used: Paging Version used: 3.1.0 (bug is present since 3.0.0) Devices/Android versions reproduced on: All Android devices and versions
If this is a bug in the library, we would appreciate if you could attach:
================================================================================
This issue has been present since at least version 3.0.0.
Increasing or decreasing page size and prefetch distance did not fix the problem.
Explanation of the issue, as observed in the attached video example:
NOTE: This happens when there is any update to the database. It does not need to be restricted to the items presented to the user. In my current app (not the one attached here) I have a Conversation (shows a list of messages) and an option to open the Conversation details (in a separate fragment on top of the Conversation fragment) where it always loads those details from the server, even though none of them have any relation to the messages being listed in the previous fragment. Despite that, when returning to the Conversation fragment, the scroll state has been completely lost.
Again, this has been happening since 3.0.0, through all the 3.1.0 betas, and into the latest stable. This is not new, and has already been reported by other users in many places, but apparently it has been ignored for over 2 years now. I hope that this time it can finally get some overdue attention.