Crash While Using Android Auto #167

Closed
opened 2026-04-24 23:10:49 +02:00 by adam · 19 comments
Owner

Originally created by @nealhead on GitHub (May 31, 2022).

Steps to reproduce

  1. Plug into car USB port
  2. Listen to audiobook as normal, wait for crash
  3. It will either open itself back up and start playing again or the app will need to be re-opened (as described in #167)

Expected behaviour

  • App should not crash

Actual behaviour

  • Audio playback stops and app must be re-opened and streaming button must be pressed. Something to note, sometimes Waze crashes as well but restores gracefully. When I open my phone, it looks like the audiobookshelf app has to re-open itself and establish a new connection to server (version v2.0.17, but have updated to v2.0.18). Please let me know if there are logs or troubleshooting steps I can provide.

Environment data

Audiobookshelf Version: 0.9.46-beta

  • Android App?
  • iOS App?

Android Issue

Android version: 12

Device model: Galaxy S20 FE

Stock or customized system: Stock Samsung - One UI 4.0

Originally created by @nealhead on GitHub (May 31, 2022). ### Steps to reproduce 1. Plug into car USB port 2. Listen to audiobook as normal, wait for crash 3. It will either open itself back up and start playing again or the app will need to be re-opened (as described in #167) ### Expected behaviour - App should not crash ### Actual behaviour - Audio playback stops and app must be re-opened and streaming button must be pressed. Something to note, sometimes Waze crashes as well but restores gracefully. When I open my phone, it looks like the audiobookshelf app has to re-open itself and establish a new connection to server (version v2.0.17, but have updated to v2.0.18). Please let me know if there are logs or troubleshooting steps I can provide. ### Environment data Audiobookshelf Version: 0.9.46-beta - [x] Android App? - [ ] iOS App? #### Android Issue Android version: 12 Device model: Galaxy S20 FE Stock or customized system: Stock Samsung - One UI 4.0
adam added the bug label 2026-04-24 23:10:49 +02:00
adam closed this issue 2026-04-24 23:10:49 +02:00
Author
Owner

@advplyr commented on GitHub (May 31, 2022):

I believe I fixed this in the last commit https://github.com/advplyr/audiobookshelf-app/commit/c4aca22c286348fa47c6d3ceb1f467aeb9eca359 that was the only AA crash I could replicate
Hopefully fixed in the next release.

@advplyr commented on GitHub (May 31, 2022): I believe I fixed this in the last commit https://github.com/advplyr/audiobookshelf-app/commit/c4aca22c286348fa47c6d3ceb1f467aeb9eca359 that was the only AA crash I could replicate Hopefully fixed in the next release.
Author
Owner

@nealhead commented on GitHub (May 31, 2022):

Thank you! I will keep an eye out for the update.

@nealhead commented on GitHub (May 31, 2022): > Thank you! I will keep an eye out for the update.
Author
Owner

@nealhead commented on GitHub (Jun 22, 2022):

This is still happening in v0.9.49 with server v2.0.22

@nealhead commented on GitHub (Jun 22, 2022): This is still happening in [v0.9.49](https://github.com/advplyr/audiobookshelf-app/releases/tag/v0.9.49-beta) with server v2.0.22
Author
Owner

@advplyr commented on GitHub (Jun 22, 2022):

I'm not able to reproduce this bug using the steps you described. Maybe you can get more specific on how I can reproduce it?

@advplyr commented on GitHub (Jun 22, 2022): I'm not able to reproduce this bug using the steps you described. Maybe you can get more specific on how I can reproduce it?
Author
Owner

@nealhead commented on GitHub (Jun 29, 2022):

Unfortunately because it is intermittent, it's hard to tell. I had it happen again today. I just plug my phone in, choose my destination in Waze, then press Start Streaming in the ABS app because of bug #167, then drive. This time, about 10 minutes of listening android auto blacks out and I have to go back to Audiobookshelf and hit Start Streaming again.

Are there any logs I can get when it happens?

@nealhead commented on GitHub (Jun 29, 2022): Unfortunately because it is intermittent, it's hard to tell. I had it happen again today. I just plug my phone in, choose my destination in Waze, then press Start Streaming in the ABS app because of bug #167, then drive. This time, about 10 minutes of listening android auto blacks out and I have to go back to Audiobookshelf and hit Start Streaming again. Are there any logs I can get when it happens?
Author
Owner

@nealhead commented on GitHub (Aug 7, 2022):

This is still happening in 0.9.55 beta. It will crash and waze will also crash at the same time. Fortunately the other bug is fixed so I can restart it from Android Auto.

If there is anyway for me to debug let me know.

@nealhead commented on GitHub (Aug 7, 2022): This is still happening in 0.9.55 beta. It will crash and waze will also crash at the same time. Fortunately the other bug is fixed so I can restart it from Android Auto. If there is anyway for me to debug let me know.
Author
Owner

@advplyr commented on GitHub (Aug 7, 2022):

Waze crashing at the same time seems unusual. That makes me think this is the device. If possible to test this for a bit without running Waze that would help narrow things down.

@advplyr commented on GitHub (Aug 7, 2022): Waze crashing at the same time seems unusual. That makes me think this is the device. If possible to test this for a bit without running Waze that would help narrow things down.
Author
Owner

@nealhead commented on GitHub (Aug 8, 2022):

Waze crashing at the same time seems unusual. That makes me think this is the device. If possible to test this for a bit without running Waze that would help narrow things down.

Funny enough, if I run Youtube Music alongside Waze it works fine. But if I mix Waze and ABS they will both crash most of the time.. The next trip I take, I will use GPS on my work phone and just solely run ABS on Android Auto to see if it still crashes.

@nealhead commented on GitHub (Aug 8, 2022): > Waze crashing at the same time seems unusual. That makes me think this is the device. If possible to test this for a bit without running Waze that would help narrow things down. Funny enough, if I run Youtube Music alongside Waze it works fine. But if I mix Waze and ABS they will both crash most of the time.. The next trip I take, I will use GPS on my work phone and just solely run ABS on Android Auto to see if it still crashes.
Author
Owner

@nealhead commented on GitHub (Aug 9, 2022):

Was able to test a couple different scenarios today. On my way to work, I tried running solely audiobookshelf in the foreground of android auto and it crashed ~5 times on a 30 min drive. On my way back, I ran JUST Waze and had zero crashes.

@nealhead commented on GitHub (Aug 9, 2022): Was able to test a couple different scenarios today. On my way to work, I tried running solely audiobookshelf in the foreground of android auto and it crashed ~5 times on a 30 min drive. On my way back, I ran JUST Waze and had zero crashes.
Author
Owner

@nealhead commented on GitHub (Aug 20, 2022):

I have some good news @advplyr!!! I think I have found something to help - at least in my instance... Samsung has a feature under "Battery and device care" where you can select "Memory" and then "Excluded apps" and add Audiobookshelf. I'm not sure why Samsung's memory management is closing apps that are in the foreground but since excluding ABS I have not had a single crash.

Hope this helps.

@nealhead commented on GitHub (Aug 20, 2022): I have some good news @advplyr!!! I think I have found something to help - at least in my instance... Samsung has a feature under "Battery and device care" where you can select "Memory" and then "Excluded apps" and add Audiobookshelf. I'm not sure why Samsung's memory management is closing apps that are in the foreground but since excluding ABS I have not had a single crash. Hope this helps.
Author
Owner

@advplyr commented on GitHub (Aug 21, 2022):

That's great, thanks for following up. I wasn't aware of that setting

@advplyr commented on GitHub (Aug 21, 2022): That's great, thanks for following up. I wasn't aware of that setting
Author
Owner

@nealhead commented on GitHub (Sep 6, 2022):

Unfortunately, this still seems to be happening. I was able to test on a longish drive yesterday and it was crashing every ~4 minutes. What I noticed, is that even though I had the book downloaded locally it was using direct play unless I started the book from within the app on the phone.

@nealhead commented on GitHub (Sep 6, 2022): Unfortunately, this still seems to be happening. I was able to test on a longish drive yesterday and it was crashing every ~4 minutes. What I noticed, is that even though I had the book downloaded locally it was using direct play unless I started the book from within the app on the phone.
Author
Owner

@samsheffer117 commented on GitHub (Oct 2, 2022):

I am having this issue as well, same model phone too. About every 5 min the app will crash while using Google maps to navigate.

@samsheffer117 commented on GitHub (Oct 2, 2022): I am having this issue as well, same model phone too. About every 5 min the app will crash while using Google maps to navigate.
Author
Owner

@macr0dev commented on GitHub (Jul 17, 2023):

I came digging through the issues here to see if anyone else was having this problem. I guess I'm both happy and not to see I'm not the only one. I know this is marked close, but it looks like OP and another user are still having trouble. Unless they just haven't updated.

Android S22+, stock image, stock UI.

I just made a 6 hour drive and eventually just had to run the apps in "split screen" mode so that the ABS app was always open and not running inside Android Auto.

I have an extra detail I haven't heard mentioned through. It seems like I get an occasional stutter when listening. I didn't always notice it, but it's definitely been there a while. I've verified through a quick rewind that it's not part of the audiobook file because it will never reproduce in the same spot. The reason this seems especially interesting is because it always stutters just before it dies in Android Auto. But it seems like when it's running on it's own as a full app it can "recover" or something.

Just in case it helps, I've added ABS to the excluded section of the memory settings listed above. Maybe it'll help, maybe not.

@macr0dev commented on GitHub (Jul 17, 2023): I came digging through the issues here to see if anyone else was having this problem. I guess I'm both happy and not to see I'm not the only one. I know this is marked close, but it looks like OP and another user are still having trouble. Unless they just haven't updated. Android S22+, stock image, stock UI. I just made a 6 hour drive and eventually just had to run the apps in "split screen" mode so that the ABS app was always open and not running inside Android Auto. I have an extra detail I haven't heard mentioned through. It seems like I get an occasional stutter when listening. I didn't always notice it, but it's definitely been there a while. I've verified through a quick rewind that it's not part of the audiobook file because it will never reproduce in the same spot. The reason this seems especially interesting is because it always stutters just before it dies in Android Auto. But it seems like when it's running on it's own as a full app it can "recover" or something. Just in case it helps, I've added ABS to the excluded section of the memory settings listed above. Maybe it'll help, maybe not.
Author
Owner

@advplyr commented on GitHub (Jul 17, 2023):

@macr0dev Hey I don't think this crash you are having is specific to Android auto. I think this has to do with the device stopping Abs while it is in the background. I'm not exactly sure why this happens but the error I'm thinking of is related to changes in Android 12 https://stackoverflow.com/questions/69604951/getting-android-app-foregroundservicestartnotallowedexception-in-android-12-sdk
And is also specific to some devices. My Android 13 pixel 6 doesn't crash in the background.

@advplyr commented on GitHub (Jul 17, 2023): @macr0dev Hey I don't think this crash you are having is specific to Android auto. I think this has to do with the device stopping Abs while it is in the background. I'm not exactly sure why this happens but the error I'm thinking of is related to changes in Android 12 https://stackoverflow.com/questions/69604951/getting-android-app-foregroundservicestartnotallowedexception-in-android-12-sdk And is also specific to some devices. My Android 13 pixel 6 doesn't crash in the background.
Author
Owner

@macr0dev commented on GitHub (Jul 18, 2023):

@advplyr That's an interesting read, although I won't pretend to have understood all of it. It talked about things that were updating a widget - is ditching my widget a potential work around? Or is the problem much deeper than that?

Also, I'm on Android 13 as well. One UI 5.1.

@macr0dev commented on GitHub (Jul 18, 2023): @advplyr That's an interesting read, although I won't pretend to have understood all of it. It talked about things that were updating a widget - is ditching my widget a potential work around? Or is the problem much deeper than that? Also, I'm on Android 13 as well. One UI 5.1.
Author
Owner

@advplyr commented on GitHub (Jul 18, 2023):

@macr0dev It's worth a try for testing. I don't understand it all either yet

@advplyr commented on GitHub (Jul 18, 2023): @macr0dev It's worth a try for testing. I don't understand it all either yet
Author
Owner

@macr0dev commented on GitHub (Aug 12, 2023):

@advplyr - after a few recent multi hour trips, I've discovered a work around that has been pretty successful.

I can push the app into "popup mode" and shrink it until it's literally just the icon. Then it can float up in the corner of my map while I'm driving. The control bar still shows up at the bottom of the map in driving mode, but I guess the little popup being there keeps it in the foreground enough to stay alive. Just figured I'd share....

@macr0dev commented on GitHub (Aug 12, 2023): @advplyr - after a few recent multi hour trips, I've discovered a work around that has been pretty successful. I can push the app into "popup mode" and shrink it until it's literally just the icon. Then it can float up in the corner of my map while I'm driving. The control bar still shows up at the bottom of the map in driving mode, but I guess the little popup being there keeps it in the foreground enough to stay alive. Just figured I'd share....
Author
Owner

@shaftspanner commented on GitHub (Aug 19, 2023):

I'm having the same issue on a Moto G 5G Plus running Android 11
Abs app is v0.9.65 with the server v2.2.23 when trying stream podcasts whilst using Google Mapsdriving mode.

If there's any other infoation I can provide, anything I an test, happy to do so as the app is awesome and this is driving me crazy!

@shaftspanner commented on GitHub (Aug 19, 2023): I'm having the same issue on a Moto G 5G Plus running Android 11 Abs app is v0.9.65 with the server v2.2.23 when trying stream podcasts whilst using Google Mapsdriving mode. If there's any other infoation I can provide, anything I an test, happy to do so as the app is awesome and this is driving me crazy!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/audiobookshelf-app#167