Originally created by @dmmsta on GitHub (Oct 14, 2023).
Steps to reproduce
Open ABS App
Choose book
Start playback (listening via any BT device
Pause playback via the BT device (headphone "pause" gesture / button)
Attempt playback re-start via the BT device
Expected behaviour
Playback resumes in same way as if pause/play via the app icon
Actual behaviour
ABS app appears to reset or act as if opening for the first time. Have to open the app, select the book that was being listened to and initiate playback as if first time opening for specific session.
Seems as if the app is force closed in iOS, but is still open in app switcher
Environment data
Audiobookshelf Version:
[ 0.9.66 (23) ] iOS App?
Stock or customized system:
Stock + InTune MDM (for work)
iOS Issue
iOS Version:
17.0.3
iPhone model:
iPhone 12 (MGJ53B/A
Originally created by @dmmsta on GitHub (Oct 14, 2023).
### Steps to reproduce
1. Open ABS App
2. Choose book
3. Start playback (listening via _any_ BT device
4. Pause playback via the BT device (headphone "pause" gesture / button)
5. Attempt playback re-start via the BT device
### Expected behaviour
- Playback resumes in same way as if pause/play via the app icon
### Actual behaviour
- ABS app appears to reset or act as if opening for the first time. Have to open the app, select the book that was being listened to and initiate playback as if first time opening for specific session.
- Seems as if the app is force closed in iOS, but is still open in app switcher
### Environment data
Audiobookshelf Version:
- [ 0.9.66 (23) ] iOS App?
Stock or customized system:
- Stock + InTune MDM (for work)
#### iOS Issue
iOS Version:
- 17.0.3
iPhone model:
- iPhone 12 (MGJ53B/A
adam
added the bug label 2026-04-24 23:35:52 +02:00
Further testing shows that the above issue is not limited to BT device interactions.
With/without BT device connected, if paused for +5sec's ABS app. seems to reset and have to restart playback as if not listened yet...
@dmmsta commented on GitHub (Oct 14, 2023):
Further testing shows that the above issue is not limited to BT device interactions.
With/without BT device connected, if paused for +5sec's ABS app. seems to reset and have to restart playback as if not listened yet...
Have you already tried uninstalling and reinstalling the iOS app?
@nichwall commented on GitHub (Oct 14, 2023):
Probably the same as https://github.com/advplyr/audiobookshelf-app/issues/770 and https://github.com/advplyr/audiobookshelf-app/issues/844
Have you already tried uninstalling and reinstalling the iOS app?
While I haven't tested those specific situations - it reads exactly the same.
Checked the following situation:
Start playback (iPhone speaker)
Lock phone (playback continues)
Pause playback from lock screen
Allow screen to sleep
Awake screen after 30secs
ABS "player" no longer visible from lock screen
Unlock phone, open app switcher, and ABS is visible, with last book showing (in the app switch preview...likely just the last known app screen rather than live)
Select app, and it restarts
@dmmsta commented on GitHub (Oct 14, 2023):
While I haven't tested those specific situations - it reads exactly the same.
Checked the following situation:
1. Start playback (iPhone speaker)
2. Lock phone (playback continues)
3. Pause playback from lock screen
4. Allow screen to sleep
5. Awake screen after 30secs
6. ABS "player" no longer visible from lock screen
Unlock phone, open app switcher, and ABS is visible, with last book showing (in the app switch preview...likely just the last known app screen rather than live)
Select app, and it restarts
Have been experiencing the same behavior on iphone 13, iOS 17.0.3, abs server 2.4.4, app version 0.9.66 - I ran the above steps with two other apps (plexamp, tidal) and they did not close the way that audiobookshelf does, so it seems to be specific to this app.
@jpcastberg commented on GitHub (Oct 15, 2023):
Have been experiencing the same behavior on iphone 13, iOS 17.0.3, abs server 2.4.4, app version 0.9.66 - I ran the above steps with two other apps (plexamp, tidal) and they did not close the way that audiobookshelf does, so it seems to be specific to this app.
Do you log into the server via local only? I was having the same problem, it seems to be an "offline" issue, until I installed Tailscale and now it only does it on my Android that is not going through Tailscale to the library. If you watch the sync at the top when you first start your book as soon as its done refreshing it seems to press pause and then you have to do press play again. Also if you are not connected to your library via an internet connection it also seems to force close the app when you press pause via a Bluetooth connection. I have been able to consistently reproduce the problem if I go back to my local IP and use offline.
@oswalt0 commented on GitHub (Oct 15, 2023):
Do you log into the server via local only? I was having the same problem, it seems to be an "offline" issue, until I installed Tailscale and now it only does it on my Android that is not going through Tailscale to the library. If you watch the sync at the top when you first start your book as soon as its done refreshing it seems to press pause and then you have to do press play again. Also if you are not connected to your library via an internet connection it also seems to force close the app when you press pause via a Bluetooth connection. I have been able to consistently reproduce the problem if I go back to my local IP and use offline.
When I build the app from source in xcode, this issue does not occur - both when the phone is connected and piping output to xcode, and when I disconnect the phone and run the built app independently.
Digging around in my iphone console, I found some log lines (relating to the official release, not built from source) that could be relevant:
default 14:34:00.502036-0700 runningboardd Suspending assertion 34-9076-530472 (target:[xpcservice<com.apple.WebKit.GPU([app<com.audiobookshelf.app(C40A1E62-0183-4498-B76C-AB27BF016ED4)>:9076])>:9079:9079])
default 14:34:00.502078-0700 runningboardd Suspending assertion 34-9076-530473 (target:[xpcservice<com.apple.WebKit.Networking([app<com.audiobookshelf.app(C40A1E62-0183-4498-B76C-AB27BF016ED4)>:9076])>:9077:9077])
default 14:34:00.502115-0700 runningboardd Suspending assertion 34-9076-530471 (target:[xpcservice<com.apple.WebKit.WebContent([app<com.audiobookshelf.app(C40A1E62-0183-4498-B76C-AB27BF016ED4)>:9076])>:9078:9078](WebProcess9078))
// ...
error 14:34:00.504306-0700 runningboardd <private>
// ...
default 14:34:00.510304-0700 runningboardd Executing termination request for: <RBSProcessPredicate <RBSProcessIdentifierPredicate| 9076>>
default 14:34:00.510641-0700 runningboardd Found 1 processes to terminate
default 14:34:00.510711-0700 runningboardd [app<com.audiobookshelf.app(C40A1E62-0183-4498-B76C-AB27BF016ED4)>:9076] Terminating with context: <RBSTerminateContext| code:0x2182BAD2 explanation:Timed-out waiting for process [app<com.audiobookshelf.app(C40A1E62-0183-4498-B76C-AB27BF016ED4)>:9076] to invalidate assertion with identifier 34-9076-530401 and explanation 'Shared Background Assertion 1 for com.audiobookshelf.app'. Direct this report to owners of that process reportType:None maxTerminationResistance:Interactive>
@jpcastberg commented on GitHub (Oct 16, 2023):
A couple interesting things I've found:
1. When I build the app from source in xcode, this issue does not occur - both when the phone is connected and piping output to xcode, and when I disconnect the phone and run the built app independently.
2. Digging around in my iphone console, I found some log lines (relating to the official release, not built from source) that could be relevant:
```
default 14:34:00.502036-0700 runningboardd Suspending assertion 34-9076-530472 (target:[xpcservice<com.apple.WebKit.GPU([app<com.audiobookshelf.app(C40A1E62-0183-4498-B76C-AB27BF016ED4)>:9076])>:9079:9079])
default 14:34:00.502078-0700 runningboardd Suspending assertion 34-9076-530473 (target:[xpcservice<com.apple.WebKit.Networking([app<com.audiobookshelf.app(C40A1E62-0183-4498-B76C-AB27BF016ED4)>:9076])>:9077:9077])
default 14:34:00.502115-0700 runningboardd Suspending assertion 34-9076-530471 (target:[xpcservice<com.apple.WebKit.WebContent([app<com.audiobookshelf.app(C40A1E62-0183-4498-B76C-AB27BF016ED4)>:9076])>:9078:9078](WebProcess9078))
// ...
error 14:34:00.504306-0700 runningboardd <private>
// ...
default 14:34:00.510304-0700 runningboardd Executing termination request for: <RBSProcessPredicate <RBSProcessIdentifierPredicate| 9076>>
default 14:34:00.510641-0700 runningboardd Found 1 processes to terminate
default 14:34:00.510711-0700 runningboardd [app<com.audiobookshelf.app(C40A1E62-0183-4498-B76C-AB27BF016ED4)>:9076] Terminating with context: <RBSTerminateContext| code:0x2182BAD2 explanation:Timed-out waiting for process [app<com.audiobookshelf.app(C40A1E62-0183-4498-B76C-AB27BF016ED4)>:9076] to invalidate assertion with identifier 34-9076-530401 and explanation 'Shared Background Assertion 1 for com.audiobookshelf.app'. Direct this report to owners of that process reportType:None maxTerminationResistance:Interactive>
```
Also having this issue. I primarily use downloaded local copies of the audiobooks which seems to align with the conversation here so far.
@aweb-01 commented on GitHub (Oct 21, 2023):
Also having this issue. I primarily use downloaded local copies of the audiobooks which seems to align with the conversation here so far.
I still haven't dug into this deeply yet but I wasn't able to reproduce this on iOS 16.7.1.
Some users that have reported this issue were able to resolve it with a fresh install. What I would be interested in is:
Were you using Abs server on v2.2.24 or below and are now running Abs server v2.3.0 or higher
Have you reinstalled the app
@advplyr commented on GitHub (Oct 21, 2023):
I still haven't dug into this deeply yet but I wasn't able to reproduce this on iOS 16.7.1.
Some users that have reported this issue were able to resolve it with a fresh install. What I would be interested in is:
1. Were you using Abs server on v2.2.24 or below and are now running Abs server v2.3.0 or higher
2. Have you reinstalled the app
I still haven't dug into this deeply yet but I wasn't able to reproduce this on iOS 16.7.1.
Some users that have reported this issue were able to resolve it with a fresh install. What I would be interested in is:
Were you using Abs server on v2.2.24 or below and are now running Abs server v2.3.0 or higher
Have you reinstalled the app
I just started using both the app and server about 3 weeks ago, so both are relatively fresh installs. Server version is 2.4.4.
I did a fresh reinstall of the app this morning and gave it a quick test, it seems to be working okay so far. I’ll respond again in a few days one way or the other to report back.
@aweb-01 commented on GitHub (Oct 22, 2023):
> I still haven't dug into this deeply yet but I wasn't able to reproduce this on iOS 16.7.1.
>
> Some users that have reported this issue were able to resolve it with a fresh install. What I would be interested in is:
>
> 1. Were you using Abs server on v2.2.24 or below and are now running Abs server v2.3.0 or higher
> 2. Have you reinstalled the app
I just started using both the app and server about 3 weeks ago, so both are relatively fresh installs. Server version is 2.4.4.
I did a fresh reinstall of the app this morning and gave it a quick test, it seems to be working okay so far. I’ll respond again in a few days one way or the other to report back.
Unfortunately I have tried to uninstall and reinstall the application but having the same issue as everyone else.
@helio4k commented on GitHub (Oct 22, 2023):
Unfortunately I have tried to uninstall and reinstall the application but having the same issue as everyone else.
Mine is right back to doing it again, Server 2.4.4, App iOS 0.9.66, iPhone 13 17.0.3. I have deleted and reinstalled the app with no change.
@oswalt0 commented on GitHub (Oct 22, 2023):
Mine is right back to doing it again, Server 2.4.4, App iOS 0.9.66, iPhone 13 17.0.3. I have deleted and reinstalled the app with no change.
Digging more into the console logs produced by the app as it is being terminated, I am seeing this log line (which occurred before the log lines I posted above):
error 19:31:55.012128-0700 Audiobookshelf Background task still not ended after expiration handlers were called: <private>. This app will likely be terminated by the system. Call UIApplication.endBackgroundTask(_:) to avoid this.
endBackgoundTask marks the end of a task started by beginBackgroundTask. beginBackgroundTask requests a task assertion from the system (basically a request for extra time to run code when the app is sent to the background. If the time runs out before endBackgroundTask is called, then iOS kills the app) - so this log line is probably relevant to the log line that seems to log the termination of the app:
default 19:31:59.966542-0700 runningboardd [app<com.audiobookshelf.app((null))>:17934] Terminating with context: <RBSTerminateContext| code:0x2182BAD2 explanation:Timed-out waiting for process [app<com.audiobookshelf.app((null))>:17934] to invalidate assertion with identifier 17243-17934-67457 and explanation 'Shared Background Assertion 0 for com.audiobookshelf.app'. Direct this report to owners of that process reportType:None maxTerminationResistance:Interactive>
So - if the app is tanking because a background task isn't finishing, the culprit is probably there. Will continue to look but am admittedly a little out of my element here.
@jpcastberg commented on GitHub (Oct 23, 2023):
Digging more into the console logs produced by the app as it is being terminated, I am seeing this log line (which occurred before the log lines I posted above):
```
error 19:31:55.012128-0700 Audiobookshelf Background task still not ended after expiration handlers were called: <private>. This app will likely be terminated by the system. Call UIApplication.endBackgroundTask(_:) to avoid this.
```
`endBackgoundTask` marks the end of a task started by `beginBackgroundTask`. `beginBackgroundTask` requests a task assertion from the system (basically a request for extra time to run code when the app is sent to the background. If the time runs out before `endBackgroundTask` is called, then iOS kills the app) - so this log line is probably relevant to the log line that seems to log the termination of the app:
```
default 19:31:59.966542-0700 runningboardd [app<com.audiobookshelf.app((null))>:17934] Terminating with context: <RBSTerminateContext| code:0x2182BAD2 explanation:Timed-out waiting for process [app<com.audiobookshelf.app((null))>:17934] to invalidate assertion with identifier 17243-17934-67457 and explanation 'Shared Background Assertion 0 for com.audiobookshelf.app'. Direct this report to owners of that process reportType:None maxTerminationResistance:Interactive>
```
See Swift documentation: https://developer.apple.com/documentation/uikit/uiapplication/1623051-beginbackgroundtask
As far as I can see, the ABS app starts background tasks in three places, all within PlayerProgress.swift :https://github.com/advplyr/audiobookshelf-app/blob/6b164bdb276b835df9d0dc14bf43c43910009fa9/ios/App/Shared/player/PlayerProgress.swift
So - if the app is tanking because a background task isn't finishing, the culprit is probably there. Will continue to look but am admittedly a little out of my element here.
I still haven't dug into this deeply yet but I wasn't able to reproduce this on iOS 16.7.1.
Some users that have reported this issue were able to resolve it with a fresh install. What I would be interested in is:
Were you using Abs server on v2.2.24 or below and are now running Abs server v2.3.0 or higher
Have you reinstalled the app
I just started using both the app and server about 3 weeks ago, so both are relatively fresh installs. Server version is 2.4.4.
I did a fresh reinstall of the app this morning and gave it a quick test, it seems to be working okay so far. I’ll respond again in a few days one way or the other to report back.
Well the issue returned. It might have been at the same time my phone updated to 17.1.
@aweb-01 commented on GitHub (Oct 31, 2023):
> > I still haven't dug into this deeply yet but I wasn't able to reproduce this on iOS 16.7.1.
> > Some users that have reported this issue were able to resolve it with a fresh install. What I would be interested in is:
> >
> > 1. Were you using Abs server on v2.2.24 or below and are now running Abs server v2.3.0 or higher
> > 2. Have you reinstalled the app
>
> I just started using both the app and server about 3 weeks ago, so both are relatively fresh installs. Server version is 2.4.4.
>
> I did a fresh reinstall of the app this morning and gave it a quick test, it seems to be working okay so far. I’ll respond again in a few days one way or the other to report back.
Well the issue returned. It might have been at the same time my phone updated to 17.1.
seems like anytime iOS gets an update we have to reinstall the app, that doesn't seem like a good solution going forward.
@gh0sti commented on GitHub (Nov 1, 2023):
seems like anytime iOS gets an update we have to reinstall the app, that doesn't seem like a good solution going forward.
seems like anytime iOS gets an update we have to reinstall the app, that doesn't seem like a good solution going forward.
It will not be required long term, the Android app does not need to be reinstalled every update. The recommendation to reinstall is a temporary solution until the iOS app is more stable (iOS lags behind Android for many features and bug fixes since many of the contributors only use Android)
@nichwall commented on GitHub (Nov 1, 2023):
> seems like anytime iOS gets an update we have to reinstall the app, that doesn't seem like a good solution going forward.
It will not be required long term, the Android app does not need to be reinstalled every update. The recommendation to reinstall is a temporary solution until the iOS app is more stable (iOS lags behind Android for many features and bug fixes since many of the contributors only use Android)
Huh, I'll try to do more testings on this. It seems to be broken for me, as well as not auto starting when connected to car Bluetooth in my car when I already listened it half way through and stopped for gas. (AFAIK I don't have this issue in previous betas)
@yur1xpp commented on GitHub (Mar 7, 2024):
Huh, I'll try to do more testings on this. It seems to be broken for me, as well as not auto starting when connected to car Bluetooth in my car when I already listened it half way through and stopped for gas. (AFAIK I don't have this issue in previous betas)
It seems to only happen when I'm not connected to the server. If I'm offline every time I pause by Bluetooth it force closes. If I'm connected to the server it stays open no problem.
@oswalt0 commented on GitHub (Mar 7, 2024):
It seems to only happen when I'm not connected to the server. If I'm offline every time I pause by Bluetooth it force closes. If I'm connected to the server it stays open no problem.
Oh right I forgot to mention that I'm also using it offline. That explains it. Hopefully it is something can be fixed.
@yur1xpp commented on GitHub (Mar 7, 2024):
Oh right I forgot to mention that I'm also using it offline. That explains it. Hopefully it is something can be fixed.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Originally created by @dmmsta on GitHub (Oct 14, 2023).
Steps to reproduce
Expected behaviour
Actual behaviour
Environment data
Audiobookshelf Version:
Stock or customized system:
iOS Issue
iOS Version:
iPhone model:
@dmmsta commented on GitHub (Oct 14, 2023):
Further testing shows that the above issue is not limited to BT device interactions.
With/without BT device connected, if paused for +5sec's ABS app. seems to reset and have to restart playback as if not listened yet...
@nichwall commented on GitHub (Oct 14, 2023):
Probably the same as https://github.com/advplyr/audiobookshelf-app/issues/770 and https://github.com/advplyr/audiobookshelf-app/issues/844
Have you already tried uninstalling and reinstalling the iOS app?
@dmmsta commented on GitHub (Oct 14, 2023):
While I haven't tested those specific situations - it reads exactly the same.
Checked the following situation:
Unlock phone, open app switcher, and ABS is visible, with last book showing (in the app switch preview...likely just the last known app screen rather than live)
Select app, and it restarts
@jpcastberg commented on GitHub (Oct 15, 2023):
Have been experiencing the same behavior on iphone 13, iOS 17.0.3, abs server 2.4.4, app version 0.9.66 - I ran the above steps with two other apps (plexamp, tidal) and they did not close the way that audiobookshelf does, so it seems to be specific to this app.
@oswalt0 commented on GitHub (Oct 15, 2023):
Do you log into the server via local only? I was having the same problem, it seems to be an "offline" issue, until I installed Tailscale and now it only does it on my Android that is not going through Tailscale to the library. If you watch the sync at the top when you first start your book as soon as its done refreshing it seems to press pause and then you have to do press play again. Also if you are not connected to your library via an internet connection it also seems to force close the app when you press pause via a Bluetooth connection. I have been able to consistently reproduce the problem if I go back to my local IP and use offline.
@jpcastberg commented on GitHub (Oct 16, 2023):
A couple interesting things I've found:
@aweb-01 commented on GitHub (Oct 21, 2023):
Also having this issue. I primarily use downloaded local copies of the audiobooks which seems to align with the conversation here so far.
@advplyr commented on GitHub (Oct 21, 2023):
I still haven't dug into this deeply yet but I wasn't able to reproduce this on iOS 16.7.1.
Some users that have reported this issue were able to resolve it with a fresh install. What I would be interested in is:
@aweb-01 commented on GitHub (Oct 22, 2023):
I just started using both the app and server about 3 weeks ago, so both are relatively fresh installs. Server version is 2.4.4.
I did a fresh reinstall of the app this morning and gave it a quick test, it seems to be working okay so far. I’ll respond again in a few days one way or the other to report back.
@helio4k commented on GitHub (Oct 22, 2023):
Unfortunately I have tried to uninstall and reinstall the application but having the same issue as everyone else.
@oswalt0 commented on GitHub (Oct 22, 2023):
Mine is right back to doing it again, Server 2.4.4, App iOS 0.9.66, iPhone 13 17.0.3. I have deleted and reinstalled the app with no change.
@jpcastberg commented on GitHub (Oct 23, 2023):
Digging more into the console logs produced by the app as it is being terminated, I am seeing this log line (which occurred before the log lines I posted above):
endBackgoundTaskmarks the end of a task started bybeginBackgroundTask.beginBackgroundTaskrequests a task assertion from the system (basically a request for extra time to run code when the app is sent to the background. If the time runs out beforeendBackgroundTaskis called, then iOS kills the app) - so this log line is probably relevant to the log line that seems to log the termination of the app:See Swift documentation: https://developer.apple.com/documentation/uikit/uiapplication/1623051-beginbackgroundtask
As far as I can see, the ABS app starts background tasks in three places, all within PlayerProgress.swift :https://github.com/advplyr/audiobookshelf-app/blob/6b164bdb276b835df9d0dc14bf43c43910009fa9/ios/App/Shared/player/PlayerProgress.swift
So - if the app is tanking because a background task isn't finishing, the culprit is probably there. Will continue to look but am admittedly a little out of my element here.
@aweb-01 commented on GitHub (Oct 31, 2023):
Well the issue returned. It might have been at the same time my phone updated to 17.1.
@gh0sti commented on GitHub (Nov 1, 2023):
seems like anytime iOS gets an update we have to reinstall the app, that doesn't seem like a good solution going forward.
@nichwall commented on GitHub (Nov 1, 2023):
It will not be required long term, the Android app does not need to be reinstalled every update. The recommendation to reinstall is a temporary solution until the iOS app is more stable (iOS lags behind Android for many features and bug fixes since many of the contributors only use Android)
@philhagger commented on GitHub (Nov 5, 2023):
Same issue for me. Reinstalling doesn’t solve.
@advplyr commented on GitHub (Nov 18, 2023):
Users in discord confirmed that this issue is fixed in the iOS release today v0.9.67-beta
@yur1xpp commented on GitHub (Mar 6, 2024):
@advplyr It seems like this issue came back in 0.9.73 (31)?
@advplyr commented on GitHub (Mar 6, 2024):
Not that I'm aware of?
@yur1xpp commented on GitHub (Mar 7, 2024):
Huh, I'll try to do more testings on this. It seems to be broken for me, as well as not auto starting when connected to car Bluetooth in my car when I already listened it half way through and stopped for gas. (AFAIK I don't have this issue in previous betas)
@oswalt0 commented on GitHub (Mar 7, 2024):
It seems to only happen when I'm not connected to the server. If I'm offline every time I pause by Bluetooth it force closes. If I'm connected to the server it stays open no problem.
@yur1xpp commented on GitHub (Mar 7, 2024):
Oh right I forgot to mention that I'm also using it offline. That explains it. Hopefully it is something can be fixed.