iOS , book autoplays, when opening the app after the phone is left for an extended period of time, controls in app doesn't show up #290

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

Originally created by @BionicAlice on GitHub (Sep 8, 2022).

Steps to reproduce

  1. Play an audiobook pause it or let it do the sleep function (sleep function is what triggered it last time, I set sleep to 30min)
  2. wait some time, seems to be over an hour , last time for me was 8 hours (never manually close the app)
    3.click the app icon.

Expected behaviour

  • audiobook app opens, latest book is in a paused state, I can see the player controls in app

Actual behaviour

  • Audibook app opens, last audiobook listened to starts auto playing. There is no controls. There is lockscreen controls so I can pause the book. If I click the same book again, it will pause for a second( like a new instance is opening) and now it will work correctly.

Environment data

Audiobookshelf server is on docker
Audiobookshelf Version: server: 2.1.5 , IOS 0.9.58

  • Android App?
  • [x ] iOS App?

iOS Issue

iOS Version: 16

iPhone model: Iphone XS Max

Originally created by @BionicAlice on GitHub (Sep 8, 2022). ### Steps to reproduce 1. Play an audiobook pause it or let it do the sleep function (sleep function is what triggered it last time, I set sleep to 30min) 2. wait some time, seems to be over an hour , last time for me was 8 hours (never manually close the app) 3.click the app icon. ### Expected behaviour - audiobook app opens, latest book is in a paused state, I can see the player controls in app ### Actual behaviour - Audibook app opens, last audiobook listened to starts auto playing. There is no controls. There is lockscreen controls so I can pause the book. If I click the same book again, it will pause for a second( like a new instance is opening) and now it will work correctly. ### Environment data Audiobookshelf server is on docker Audiobookshelf Version: server: 2.1.5 , IOS 0.9.58 - [ ] Android App? - [x ] iOS App? #### iOS Issue iOS Version: 16 iPhone model: Iphone XS Max
adam added the bug label 2026-04-24 23:15:24 +02:00
adam closed this issue 2026-04-24 23:15:27 +02:00
Author
Owner

@BionicAlice commented on GitHub (Sep 8, 2022):

Should mention book is not and has not been downloaded only Direct play.

@BionicAlice commented on GitHub (Sep 8, 2022): Should mention book is not and has not been downloaded only Direct play.
Author
Owner

@BionicAlice commented on GitHub (Sep 8, 2022):

Just happened again. I am unsure if I paused my session or if a different app took over the sound. I then talked via viber for about 20-30 min. Did some work for about 20 min, talked on viber again for about 15 Right after that I clicked on the app icon for audiobookshelf it started auto playing what I was listening to before, without controls visible in the app. Still visible on lockscreen. Direct play as before.

@BionicAlice commented on GitHub (Sep 8, 2022): Just happened again. I am unsure if I paused my session or if a different app took over the sound. I then talked via viber for about 20-30 min. Did some work for about 20 min, talked on viber again for about 15 Right after that I clicked on the app icon for audiobookshelf it started auto playing what I was listening to before, without controls visible in the app. Still visible on lockscreen. Direct play as before.
Author
Owner

@ronaldheft commented on GitHub (Sep 9, 2022):

Thanks for reporting this. I’ve seen this myself, but haven’t figured out the steps to reproduce it.

I caught some logging from the issue yesterday, that I’m planning to dig into.

@ronaldheft commented on GitHub (Sep 9, 2022): Thanks for reporting this. I’ve seen this myself, but haven’t figured out the steps to reproduce it. I caught some logging from the issue yesterday, that I’m planning to dig into.
Author
Owner

@ronaldheft commented on GitHub (Sep 14, 2022):

I caught this bug and managed to pull the logs from it.

Looks like WebKit is crashing. Capacitor reloads WebKit, and during the reinitialization, triggers the playerRate to change, which causes the iOS player to resume playback. Normally this is not an issue during first startup, because the AudioPlayer is not initialized yet, but since the AudioPlayer is fully initialized and it's just WebKit that crashed, we end up with this weird state.

Now that I know the cause, I can work to resolve the issue. My end goal will be to ensure at any point WebKit is reloaded, the native player and the web player can get back in sync.

@ronaldheft commented on GitHub (Sep 14, 2022): I caught this bug and managed to pull the logs from it. Looks like WebKit is crashing. Capacitor reloads WebKit, and during the reinitialization, triggers the playerRate to change, which causes the iOS player to resume playback. Normally this is not an issue during first startup, because the AudioPlayer is not initialized yet, but since the AudioPlayer is fully initialized and it's just WebKit that crashed, we end up with this weird state. Now that I know the cause, I can work to resolve the issue. My end goal will be to ensure at any point WebKit is reloaded, the native player and the web player can get back in sync.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/audiobookshelf-app#290