Seeking forward resets playback to 0 when streaming large files via Cloudflare Tunnel #1284

Closed
opened 2026-04-24 23:56:33 +02:00 by adam · 3 comments
Owner

Originally created by @aakashbashyal21 on GitHub (Oct 4, 2025).

I have verified that the bug is not already awaiting release

Yes

What was the Problem?

Audio streams correctly through a Cloudflare Tunnel, but seeking forward causes playback to reset to position 0 instead of the intended position. This issue only occurs on Android desktop, browsers, PWA, and mobile web apps work correctly with the same Cloudflare setup.

Steps to Reproduce the Issue

When i use the small files 13mb and 4-5 min it works correctly but usually my files are large files upto 1hrs+ and 90-80mb+.

Relevant Logs Showing the Problem (not sure this is the exact issues??)
14:31:04.380 seekForward methodData: {"value":10}
14:31:04.381 seekPlayer mediaCount = 1 | 52314
14:31:04.382 onPositionDiscontinuity: oldPosition=42314/0, newPosition=52314/0, isPlaying=false reason=SEEK
14:31:04.382 seek: Jivan Ke Dwar Ki Kunji, currentTime=52.314
14:31:04.405 STATE_BUFFERING : 52314
14:31:04.408 onPositionDiscontinuity: oldPosition=52314/0, newPosition=0/0, isPlaying=false, reason=2
14:31:04.408 EVENT_IS_LOADING_CHANGED : true
14:31:04.420 onMetadata {"duration":7024.620396,"currentTime":52.314,"playerState":"BUFFERING"}
14:31:04.638 STATE_READY : -9223372036854775807
14:31:04.648 onMetadata {"duration":7024.620396,"currentTime":0,"playerState":"READY"}

What was Expected?

After successfully seeking to 52314ms, there's a second onPositionDiscontinuity event with reason=2 that immediately resets position to 0. The currentTime goes from 52.314s back to 0s.

Phone Model

Not specific to any phone

Phone OS

Android

Audiobookshelf App Version

Android App - 0.10.1

Installation Source

Google Play Store

Additional Notes

This is specific to the cloudfare tunnel.

Originally created by @aakashbashyal21 on GitHub (Oct 4, 2025). ### I have verified that the [bug is not already awaiting release](https://github.com/advplyr/audiobookshelf-app/issues?q=is%3Aissue%20label%3A%22awaiting%20release%22) Yes ### What was the Problem? Audio streams correctly through a Cloudflare Tunnel, but seeking forward causes playback to reset to position 0 instead of the intended position. This issue only occurs on Android desktop, browsers, PWA, and mobile web apps work correctly with the same Cloudflare setup. ### Steps to Reproduce the Issue When i use the small files 13mb and 4-5 min it works correctly but usually my files are large files upto 1hrs+ and 90-80mb+. ##### Relevant Logs Showing the Problem (not sure this is the exact issues??) ``` 14:31:04.380 seekForward methodData: {"value":10} 14:31:04.381 seekPlayer mediaCount = 1 | 52314 14:31:04.382 onPositionDiscontinuity: oldPosition=42314/0, newPosition=52314/0, isPlaying=false reason=SEEK 14:31:04.382 seek: Jivan Ke Dwar Ki Kunji, currentTime=52.314 14:31:04.405 STATE_BUFFERING : 52314 14:31:04.408 onPositionDiscontinuity: oldPosition=52314/0, newPosition=0/0, isPlaying=false, reason=2 14:31:04.408 EVENT_IS_LOADING_CHANGED : true 14:31:04.420 onMetadata {"duration":7024.620396,"currentTime":52.314,"playerState":"BUFFERING"} 14:31:04.638 STATE_READY : -9223372036854775807 14:31:04.648 onMetadata {"duration":7024.620396,"currentTime":0,"playerState":"READY"} ``` ### What was Expected? After successfully seeking to 52314ms, there's a second onPositionDiscontinuity event with reason=2 that immediately resets position to 0. The currentTime goes from 52.314s back to 0s. ### Phone Model Not specific to any phone ### Phone OS Android ### Audiobookshelf App Version Android App - 0.10.1 ### Installation Source Google Play Store ### Additional Notes This is specific to the cloudfare tunnel.
adam added the bug label 2026-04-24 23:56:33 +02:00
adam closed this issue 2026-04-24 23:56:33 +02:00
Author
Owner

@aakashbashyal21 commented on GitHub (Oct 11, 2025):

This specifically occurs enabling the proxy on A record of the cloudflare.

@aakashbashyal21 commented on GitHub (Oct 11, 2025): This specifically occurs enabling the proxy on A record of the cloudflare.
Author
Owner

@p-rintz commented on GitHub (Oct 21, 2025):

I have the same issue on iOS. And seemingly not only on the audibookshelf-app itself. I also tried two different app that has the same issue.

Seeking works on audiobooks with small file sizes (small chapters).
Broken on podcasts (single large files)

Tested on Plappa, Audibookshelf App and Shelfplayer.

So it seems to me like this isnt just an app issue.

@p-rintz commented on GitHub (Oct 21, 2025): I have the same issue on iOS. And seemingly not only on the audibookshelf-app itself. I also tried two different app that has the same issue. Seeking works on audiobooks with small file sizes (small chapters). Broken on podcasts (single large files) Tested on Plappa, Audibookshelf App and Shelfplayer. So it seems to me like this isnt just an app issue.
Author
Owner

@aakashbashyal21 commented on GitHub (Oct 22, 2025):

Yes looks like a issue on cloud flare A record, can you once disable, the orange cloud on your DNS configuration on cloudflare. I disabled that and it worked, but not sure that is the solution.

Image
@aakashbashyal21 commented on GitHub (Oct 22, 2025): Yes looks like a issue on cloud flare A record, can you once disable, the orange cloud on your DNS configuration on cloudflare. I disabled that and it worked, but not sure that is the solution. <img width="2560" height="1410" alt="Image" src="https://github.com/user-attachments/assets/aa47f6ea-061a-4f29-ad74-a9d55eb2b933" />
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/audiobookshelf-app#1284