[Bug]: Progress Sync between Web and Android not working correctly when using downloaded book #648

Closed
opened 2026-04-24 23:32:25 +02:00 by adam · 4 comments
Owner

Originally created by @Alistair1231 on GitHub (Jul 25, 2023).

Steps to reproduce

  1. Play downloaded audiobook on Phone, then Pause
  2. Play in Browser at PC, then pause
  3. Continue on Phone

Expected behaviour

  • Phone should resume last position from browser

Actual behaviour

  • Phone doesn't even see the progress from the browser
  • What is curious is, that it shows 19 minutes of playback in the first picture as its latest entry. That is incorrect.
    • However, if you add the 1h11m duration from the PC and add it to the last time of the Phone, you get the correct time. So maybe it got confused with the timestamps? But that doesn't explain why the PC time isn't even visible on the Phone.

Click to see pictures

EDIT: as an addition, I want to mention, that this seems to be a problem with downloaded books. If I press the Cast button, and then just close it without actually casting to a device, that forces the player to use the remote book instead of the local one. When doing that, it does jump to the correct place.

Environment data

Audiobookshelf Version: v2.3.3 (docker)

  • Android App: version 0.9.65-beta

Android Issue

Android version:
Android 13

Device model:
Xiaomi Pocophone F2 Pro

Stock or customized system:
Lineage OS 20, no root

Originally created by @Alistair1231 on GitHub (Jul 25, 2023). ### Steps to reproduce 1. Play downloaded audiobook on Phone, then Pause 2. Play in Browser at PC, then pause 3. Continue on Phone ### Expected behaviour - Phone should resume last position from browser ### Actual behaviour - Phone doesn't even see the progress from the browser - What is curious is, that it shows 19 minutes of playback in the first picture as its latest entry. That is incorrect. - However, if you add the 1h11m duration from the PC and add it to the last time of the Phone, you get the correct time. So maybe it got confused with the timestamps? But that doesn't explain why the PC time isn't even visible on the Phone. - <details><summary><h3>Click to see pictures</h3></summary> <img src=https://github.com/advplyr/audiobookshelf-app/assets/26165288/cb330697-f4de-40e9-a2a1-221a3a99e081/> <img src="https://github.com/advplyr/audiobookshelf-app/assets/26165288/936b0d5c-0f96-43e2-b241-eefa3b958d1d" width=450px/> </details> EDIT: as an addition, I want to mention, that this seems to be a problem with downloaded books. If I press the Cast button, and then just close it without actually casting to a device, that forces the player to use the remote book instead of the local one. When doing that, it does jump to the correct place. ### Environment data Audiobookshelf Version: v2.3.3 (docker) - [X] Android App: version 0.9.65-beta #### Android Issue Android version: Android 13 Device model: Xiaomi Pocophone F2 Pro Stock or customized system: Lineage OS 20, no root
adam added the bug label 2026-04-24 23:32:25 +02:00
adam closed this issue 2026-04-24 23:32:26 +02:00
Author
Owner

@nichwall commented on GitHub (Jul 27, 2023):

To clarify, you are not closing the player on the phone while you listen on the computer? You're only pausing the phone

@nichwall commented on GitHub (Jul 27, 2023): To clarify, you are not closing the player on the phone while you listen on the computer? You're only pausing the phone
Author
Owner

@Alistair1231 commented on GitHub (Jul 27, 2023):

Yes. I only pause the playback. Generally it goes like this:

  1. Play on Phone
  2. Pause Phone, and minimize app by using home button (not closing in task switcher and not double pressing back button)
  3. Go to PC and listen in browser for a while, generally at least 20 min
  4. Pause playback in browser, while generally keeping the tab open
  5. Go to phone and resume playback. It doesn't recognize the play time from PC.

I did some trial and error now after your question and I have gotten some interesting results!
It seems that the issue might be somehow related to the app being either closed, or frozen by battery optimizations of the phone.

If I keep the app open and on screen, while I have active playback on the PC, it syncs perfectly without issues, every 10s it jumps forwards and shows the sync in the history.

However if I close the app using the task switcher, and then have playback on PC, then it looses track of the playback and does not properly sync back up once I restart the app and start playback.

In these trials it did receive the playback position from the PC in it's history however, so I could jump back to the correct position with a click on the history entry. This was not the case initially. It happened multiple times, that the app just did not recognize any other playback. So there might be layers to this, however what was easily reproducible, was that it never continued at the correct position, if playback occurred while the app was closed.

My assumption is, that due to Android's battery optimizations, the app gets frozen or killed after a while and that breaks the sync.

@Alistair1231 commented on GitHub (Jul 27, 2023): Yes. I only pause the playback. Generally it goes like this: 1. Play on Phone 2. Pause Phone, and minimize app by using home button (not closing in task switcher and not double pressing back button) 3. Go to PC and listen in browser for a while, generally at least 20 min 4. Pause playback in browser, while generally keeping the tab open 5. Go to phone and resume playback. It doesn't recognize the play time from PC. I did some trial and error now after your question and I have gotten some interesting results! It seems that the issue might be somehow related to the app being either closed, or frozen by battery optimizations of the phone. If I keep the app open and on screen, while I have active playback on the PC, it syncs perfectly without issues, every 10s it jumps forwards and shows the sync in the history. However if I close the app using the task switcher, and then have playback on PC, then it looses track of the playback and does not properly sync back up once I restart the app and start playback. In these trials it did receive the playback position from the PC in it's history however, so I could jump back to the correct position with a click on the history entry. This was not the case initially. It happened multiple times, that the app just did not recognize any other playback. So there might be layers to this, however what was easily reproducible, was that it never continued at the correct position, if playback occurred while the app was closed. My assumption is, that due to Android's battery optimizations, the app gets frozen or killed after a while and that breaks the sync.
Author
Owner

@advplyr commented on GitHub (Sep 10, 2023):

I was able to reproduce this and it will be fixed in the next release

@advplyr commented on GitHub (Sep 10, 2023): I was able to reproduce this and it will be fixed in the next release
Author
Owner

@advplyr commented on GitHub (Sep 19, 2023):

Fixed in v0.9.66-beta

@advplyr commented on GitHub (Sep 19, 2023): Fixed in [v0.9.66-beta](https://github.com/advplyr/audiobookshelf-app/releases/tag/v0.9.66-beta)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/audiobookshelf-app#648