podverse / podverse-rn

Podverse mobile app written in React Native for iOS, Android, and F-Droid
https://podverse.fm/about
GNU Affero General Public License v3.0
207 stars 35 forks source link

Episodes not being marked as played automatically when finished #1704

Open EricKerby opened 1 year ago

EricKerby commented 1 year ago

Not sure if anyone else is seeing this, but recently I've noticed downloaded podcast episodes I complete (either let play to the end or skip forward to the end) are frequently not being marked as "played". I find myself going into the menu for the episode and marking them as played manually.

See attached screenshot showing an episode that was clearly played (0 min left) but not showing the "played" checkmark icon. The icon shows up after I manually mark the episode as played.

This is happening on a Pixel 7 Pro on Podverse version 4.12.3 Build 5181.

Screenshot_20230305-235130

mitchdowney commented 1 year ago

@EricKerby thanks for the bug report. I would guess either there is a problem with the playback-active-track-changed event handling, OR this could be a network / syncing error. Are you using the app as a Premium user? If yes, then the "mark as played" handling only fires one time at the end of the track, but we don't have a fallback in place if that "mark as played" request were to fail to reach the server for some reason.

I dunno what we need to do to fix it, but I'll try looking into it. I have seen the issue on iOS as well.

EricKerby commented 1 year ago

Yes, I am using the app as a Premium user. I'm seeing this somewhat consistently across both strong cellular and wifi network connections. Happy to test a bit more in depth if there are things I can try/report.

EricKerby commented 1 year ago

I've noticed that often the episode isn't marked as played right away when it completes, but after selecting to play another episode from the episodes list, the previously played one will then be marked as played.

mitchdowney commented 1 year ago

@EricKerby ah, that might be a known issue then. Around January I reduced the frequency the episodes list info refreshes because it was slowing down the whole app. That leads to other UX problems though, like the UI not updating quickly and accurately.

If this is a UI bug, then that is less serious, as the server or internal storage should still be accurate. Regardless, there's a lot of room for improvement with our player track ended and update history events.

mitchdowney commented 1 year ago

@EricKerby I made a change which may or may not help with this...I increased the "end of episode reached" range from within 1 minute of the end, to 2 minutes of the end of the episode. I have noticed that sometimes media files will sometimes have slightly different durations than they report. This is a suspicious change and hopefully doesn't cause more problems...

https://github.com/podverse/podverse-rn/commit/9af3a53d19eab665d889160969f87bdf736ecc62

Another possibility is intermittent network issues. When an episode ends, if the network request fails that marks the episode as complete for your profile, then it wasn't retrying. I'm adding a retry of up to 5 times if a network request fails.

https://github.com/podverse/podverse-rn/commit/6735b082fffcea246a65c8383cd6d6cb5eceb8fc

I don't think either of these changes will truly fix the issue you're seeing...one major initiative we need to work on some day is adding more reliable handling for offline issues. That will be a lot more work though, as there are many requests besides the "mark episode as complete" we'll need to save and retry later when internet connection is available.

Aaaanyway, those two changes will be in v4.12.8. Hopefully they reduce the frequency the issues happen...but there is still the "UI not refreshing until play next episode" issue, we need to add more proper offline handling someday.

mitchdowney commented 1 year ago

Removed "ready for deploy" because I don't have confidence the problem is adequately fixed.

mitchdowney commented 1 year ago

related: https://github.com/podverse/podverse-rn/issues/1797

mitchdowney commented 1 year ago

@EricKerby are you still seeing this issue? The changes I made seem to have improved things for me, although it's still not a definitive fix, as we need to handle "sync offline data with server after internet access is available"...although that will a be a huge initiative to work on, and I'd prefer to group that into a separate ticket.

EricKerby commented 1 year ago

What I do often continue to see is:

This pretty much always happens when I am connected with good internet access.

Currently using Version 4.12.12 Build 5195

mitchdowney commented 10 months ago

@EricKerby are you still seeing this issue? Unfortunately I don't have ideas for how to fix it reliably, and I haven't been seeing other people reporting the issue. Since it doesn't seem to be affecting many users, and I don't have a clear fix in mind, I'm going to unassign it from me to try clear up my queue for other work. Sorry for the bad news :(