Chromecast Fails To Cast From Android Phone #510

Closed
opened 2026-04-24 23:26:36 +02:00 by adam · 16 comments
Owner

Originally created by @wesf99 on GitHub (Mar 28, 2023).

Steps to reproduce

  1. Select and Play audiobook on android phone (direct play via streaming)
  2. Press the Chromecast Icon and Select the Device to Cast To (the icon turns green and the device beeps to show connection made)
  3. The Play Button on the phone Screen "spins", the "cast to" device shows the audiobookshelf screen but nothing plays.

Expected behaviour

  • The book should play on the Chromecast device.

Actual behaviour

  • Some books do play and some don't and a few books crash the android app. All files are mp3. I haven't been able to determine any specific or consistent difference between the files (metadata and coding etc) that play, the files that don't play and the ones that crash the app.

For the books that do play, I hear the book on the "cast to" device with details of the current track, book cover and play back controls (Google Nest Display).

For the Books that don't play, I simply get a screen on the "cast to" device that says "ready for an audiobook cast", the word "audiobookshelf" and the audiobookshelf icon

For the books that crash the app, I get the same display as books that don't play, but the phone shows a system message "Something went wrong with audiobookshelf" audiobookshelf closed because the app has a bug

Environment data

Audiobookshelf Version: Server: docker v2.2.17 (Synology DS1821+, DSM 7.1.1-142962 Update 4)

  • [ x] Android App?
  • iOS App?

Android Issue

Android version: 0.9.63-beta

Device model: Samsung S23 +

Stock or customized system: stock

iOS Issue

iOS Version:

iPhone model:
Books That Dont Play
Books That Don't Play
Books That Dont Play

Originally created by @wesf99 on GitHub (Mar 28, 2023). ### Steps to reproduce 1. Select and Play audiobook on android phone (direct play via streaming) 2. Press the Chromecast Icon and Select the Device to Cast To (the icon turns green and the device beeps to show connection made) 3. The Play Button on the phone Screen "spins", the "cast to" device shows the audiobookshelf screen but nothing plays. ### Expected behaviour - The book should play on the Chromecast device. ### Actual behaviour - Some books do play and some don't and a few books crash the android app. All files are mp3. I haven't been able to determine any specific or consistent difference between the files (metadata and coding etc) that play, the files that don't play and the ones that crash the app. For the books that do play, I hear the book on the "cast to" device with details of the current track, book cover and play back controls (Google Nest Display). For the Books that don't play, I simply get a screen on the "cast to" device that says "ready for an audiobook cast", the word "audiobookshelf" and the audiobookshelf icon For the books that crash the app, I get the same display as books that don't play, but the phone shows a system message "Something went wrong with audiobookshelf" audiobookshelf closed because the app has a bug ### Environment data Audiobookshelf Version: Server: docker v2.2.17 (Synology DS1821+, DSM 7.1.1-142962 Update 4) - [ x] Android App? - [ ] iOS App? #### Android Issue Android version: 0.9.63-beta Device model: Samsung S23 + Stock or customized system: stock #### iOS Issue iOS Version: iPhone model: ![Books That Dont Play](https://user-images.githubusercontent.com/55278725/228140136-3e63c232-db32-4082-b181-cb3a07b8706f.jpg) ![Books That Don't Play](https://user-images.githubusercontent.com/55278725/228140140-0c0572a1-b192-4626-a9a5-f15c9c59dc01.jpg) ![Books That Dont Play](https://user-images.githubusercontent.com/55278725/228140197-a915b9a6-8b88-451c-9476-a4e8c849dcdd.jpg)
adam added the bug label 2026-04-24 23:26:36 +02:00
adam closed this issue 2026-04-24 23:26:36 +02:00
Author
Owner

@advplyr commented on GitHub (Mar 28, 2023):

What version of Android are you using?

I know you mentioned streaming but are any of these books downloaded on the device?

Can you try to first cast then play the audiobook for the first time? For this you would need to close any cast you have open, then close the audio player, then cast from the appbar, then go to the book and press play.

@advplyr commented on GitHub (Mar 28, 2023): What version of Android are you using? I know you mentioned streaming but are any of these books downloaded on the device? Can you try to first cast then play the audiobook for the first time? For this you would need to close any cast you have open, then close the audio player, then cast from the appbar, then go to the book and press play.
Author
Owner

@wesf99 commented on GitHub (Mar 29, 2023):

I’m running android version 13, patch security leve1: 1 March 2023

No files are downloaded, as I had seen people had problems casting from local files.

I opened the app and tried to cast before selecting the book to play. The first time I tried this, the app just shutdown with no messages. The next time I tried this, the same issue. Works for some books but not for others.

Thanks for looking at the problem. Audibookshelf is shaping up to be a great app

From: advplyr @.>
Sent: Wednesday, March 29, 2023 5:28 AM
To: advplyr/audiobookshelf-app @.
>
Cc: wesf99 @.>; Author @.>
Subject: Re: [advplyr/audiobookshelf-app] Chromecast Fails To Cast From Android Phone (Issue #651)

What version of Android are you using?

I know you mentioned streaming but are any of these books downloaded on the device?

Can you try to first cast then play the audiobook for the first time? For this you would need to close any cast you have open, then close the audio player, then cast from the appbar, then go to the book and press play.


Reply to this email directly, view it on GitHub https://github.com/advplyr/audiobookshelf-app/issues/651#issuecomment-1487617515 , or unsubscribe https://github.com/notifications/unsubscribe-auth/ANFXZBNTNDYUAK2WATUPGUTW6NJW5ANCNFSM6AAAAAAWKB7WPA .
You are receiving this because you authored the thread. https://github.com/notifications/beacon/ANFXZBP5E3H3JBTPADMKKJ3W6NJW5A5CNFSM6AAAAAAWKB7WPCWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTSYVM66W.gif Message ID: @.*** @.***> >

@wesf99 commented on GitHub (Mar 29, 2023): I’m running android version 13, patch security leve1: 1 March 2023 No files are downloaded, as I had seen people had problems casting from local files. I opened the app and tried to cast before selecting the book to play. The first time I tried this, the app just shutdown with no messages. The next time I tried this, the same issue. Works for some books but not for others. Thanks for looking at the problem. Audibookshelf is shaping up to be a great app From: advplyr ***@***.***> Sent: Wednesday, March 29, 2023 5:28 AM To: advplyr/audiobookshelf-app ***@***.***> Cc: wesf99 ***@***.***>; Author ***@***.***> Subject: Re: [advplyr/audiobookshelf-app] Chromecast Fails To Cast From Android Phone (Issue #651) What version of Android are you using? I know you mentioned streaming but are any of these books downloaded on the device? Can you try to first cast then play the audiobook for the first time? For this you would need to close any cast you have open, then close the audio player, then cast from the appbar, then go to the book and press play. — Reply to this email directly, view it on GitHub <https://github.com/advplyr/audiobookshelf-app/issues/651#issuecomment-1487617515> , or unsubscribe <https://github.com/notifications/unsubscribe-auth/ANFXZBNTNDYUAK2WATUPGUTW6NJW5ANCNFSM6AAAAAAWKB7WPA> . You are receiving this because you authored the thread. <https://github.com/notifications/beacon/ANFXZBP5E3H3JBTPADMKKJ3W6NJW5A5CNFSM6AAAAAAWKB7WPCWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTSYVM66W.gif> Message ID: ***@***.*** ***@***.***> >
Author
Owner

@wesf99 commented on GitHub (Mar 29, 2023):

PS.

I am able to cast and play local files from Booksonic while offline or online.

From: advplyr @.>
Sent: Wednesday, March 29, 2023 5:28 AM
To: advplyr/audiobookshelf-app @.
>
Cc: wesf99 @.>; Author @.>
Subject: Re: [advplyr/audiobookshelf-app] Chromecast Fails To Cast From Android Phone (Issue #651)

What version of Android are you using?

I know you mentioned streaming but are any of these books downloaded on the device?

Can you try to first cast then play the audiobook for the first time? For this you would need to close any cast you have open, then close the audio player, then cast from the appbar, then go to the book and press play.


Reply to this email directly, view it on GitHub https://github.com/advplyr/audiobookshelf-app/issues/651#issuecomment-1487617515 , or unsubscribe https://github.com/notifications/unsubscribe-auth/ANFXZBNTNDYUAK2WATUPGUTW6NJW5ANCNFSM6AAAAAAWKB7WPA .
You are receiving this because you authored the thread. https://github.com/notifications/beacon/ANFXZBP5E3H3JBTPADMKKJ3W6NJW5A5CNFSM6AAAAAAWKB7WPCWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTSYVM66W.gif Message ID: @.*** @.***> >

@wesf99 commented on GitHub (Mar 29, 2023): PS. I am able to cast and play local files from Booksonic while offline or online. From: advplyr ***@***.***> Sent: Wednesday, March 29, 2023 5:28 AM To: advplyr/audiobookshelf-app ***@***.***> Cc: wesf99 ***@***.***>; Author ***@***.***> Subject: Re: [advplyr/audiobookshelf-app] Chromecast Fails To Cast From Android Phone (Issue #651) What version of Android are you using? I know you mentioned streaming but are any of these books downloaded on the device? Can you try to first cast then play the audiobook for the first time? For this you would need to close any cast you have open, then close the audio player, then cast from the appbar, then go to the book and press play. — Reply to this email directly, view it on GitHub <https://github.com/advplyr/audiobookshelf-app/issues/651#issuecomment-1487617515> , or unsubscribe <https://github.com/notifications/unsubscribe-auth/ANFXZBNTNDYUAK2WATUPGUTW6NJW5ANCNFSM6AAAAAAWKB7WPA> . You are receiving this because you authored the thread. <https://github.com/notifications/beacon/ANFXZBP5E3H3JBTPADMKKJ3W6NJW5A5CNFSM6AAAAAAWKB7WPCWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTSYVM66W.gif> Message ID: ***@***.*** ***@***.***> >
Author
Owner

@wesf99 commented on GitHub (Apr 10, 2023):

I have tried to examine the mp3 files that don't cast. I am unable to determine anything that is broken or common between them. I have tested them using MP3 Diags with no unusual messages. I have tried repairing/re coding them using VLC Media player and AVS Audio Converter without success. The only thing that has worked is recoding the mp3 files (usually split into 3 minute files to aid moving forward and backwards easily) into one large mp3 file with chapter's using AudiobookConverter 6.1.2.

@wesf99 commented on GitHub (Apr 10, 2023): I have tried to examine the mp3 files that don't cast. I am unable to determine anything that is broken or common between them. I have tested them using MP3 Diags with no unusual messages. I have tried repairing/re coding them using VLC Media player and AVS Audio Converter without success. The only thing that has worked is recoding the mp3 files (usually split into 3 minute files to aid moving forward and backwards easily) into one large mp3 file with chapter's using AudiobookConverter 6.1.2.
Author
Owner

@lhassell commented on GitHub (Apr 20, 2023):

Can confirm same issue. Casting from pixel 5 on latest version of Android OS fails. It connects, but will not play files. In my case, I am connected to audiobookshelf instance via reverse proxy, but server is on same local net and accessed via a DNS alias (i.e. server is locally hosted at IP 192.x.x.x, and router is programmed to reroute DNS requests to outside set er back to that IP)

@lhassell commented on GitHub (Apr 20, 2023): Can confirm same issue. Casting from pixel 5 on latest version of Android OS fails. It connects, but will not play files. In my case, I am connected to audiobookshelf instance via reverse proxy, but server is on same local net and accessed via a DNS alias (i.e. server is locally hosted at IP 192.x.x.x, and router is programmed to reroute DNS requests to outside set er back to that IP)
Author
Owner

@advplyr commented on GitHub (Apr 20, 2023):

One potential issue is if the files you are trying to cast cannot be direct played. I don't believe chromecast support HLS streaming at all so make sure when you play a file regularly it isn't being transcoded. You can tell by opening the audio player up full screen and there will be either "Local", "Direct" or "Transcode" displayed at the top.

Additionally, last I check chromecast is more strict on which audio codecs it supports then regular android device

@advplyr commented on GitHub (Apr 20, 2023): One potential issue is if the files you are trying to cast cannot be direct played. I don't believe chromecast support HLS streaming at all so make sure when you play a file regularly it isn't being transcoded. You can tell by opening the audio player up full screen and there will be either "Local", "Direct" or "Transcode" displayed at the top. Additionally, last I check chromecast is more strict on which audio codecs it supports then regular android device
Author
Owner

@lhassell commented on GitHub (Apr 21, 2023):

As a test, I tried connecting directly to the server (via the internal IP, instead of by the reverse proxy alias) and it worked. I think, in my case at least, it may be related to the reverse proxy / internal LAN interface.

@lhassell commented on GitHub (Apr 21, 2023): As a test, I tried connecting directly to the server (via the internal IP, instead of by the reverse proxy alias) and it worked. I think, in my case at least, it may be related to the reverse proxy / internal LAN interface.
Author
Owner

@lhassell commented on GitHub (Apr 21, 2023):

Did a little digging and was able to set up some hairpin nat rules that fixed the problem. Used https://help.ui.com/hc/en-us/articles/204952134-EdgeRouter-Hairpin-NAT as a guide.

@lhassell commented on GitHub (Apr 21, 2023): Did a little digging and was able to set up some hairpin nat rules that fixed the problem. Used https://help.ui.com/hc/en-us/articles/204952134-EdgeRouter-Hairpin-NAT as a guide.
Author
Owner

@lhassell commented on GitHub (Aug 11, 2023):

Ok... new issue with the app in the last couple of versions. Weirdly, cast only seems to work to devices that have a screen (GoogleTV, etc...). When I try to cast to a speaker-only device, it connects, but the app just hangs with a waiting animation in the place of the play button. Please let me know if there are any details or logs I can provide to assist.

@lhassell commented on GitHub (Aug 11, 2023): Ok... new issue with the app in the last couple of versions. Weirdly, cast only seems to work to devices that have a screen (GoogleTV, etc...). When I try to cast to a speaker-only device, it connects, but the app just hangs with a waiting animation in the place of the play button. Please let me know if there are any details or logs I can provide to assist.
Author
Owner

@lhassell commented on GitHub (Nov 30, 2023):

Wondering if anyone has looked at this issue.

@lhassell commented on GitHub (Nov 30, 2023): Wondering if anyone has looked at this issue.
Author
Owner

@sluggathor commented on GitHub (Apr 1, 2024):

As mentioned, this seems to be connected to setups using a reverse proxy to access the server.
Setting up static routes for Google DNS servers (8.8.8.8, 8.8.4.4) to your local dns server (probably local gateway ip) fixes the spinning play button and makes casting work.

Edit: fixes it for me at least.

@sluggathor commented on GitHub (Apr 1, 2024): As mentioned, this seems to be connected to setups using a reverse proxy to access the server. Setting up static routes for Google DNS servers (8.8.8.8, 8.8.4.4) to your local dns server (probably local gateway ip) fixes the spinning play button and makes casting work. Edit: fixes it for me at least.
Author
Owner

@lhassell commented on GitHub (May 3, 2024):

No such luck. As I had stated, it will still cast to devices that have a screen (android TV, nest home hub, etc...) but fails and just sits there spinning when casting to audio-only devices.

@lhassell commented on GitHub (May 3, 2024): No such luck. As I had stated, it will still cast to devices that have a screen (android TV, nest home hub, etc...) but fails and just sits there spinning when casting to audio-only devices.
Author
Owner

@wesf99 commented on GitHub (May 3, 2024):

Just to confirm my setup is now working on my Samsung S24 Ultra. I either connect to my synology server via local IP or reverse proxy. I can cast to audio only devices and screen based devices. I do need to be patient to allow the spinning to stop and then press play on the phone again.

@wesf99 commented on GitHub (May 3, 2024): Just to confirm my setup is now working on my Samsung S24 Ultra. I either connect to my synology server via local IP or reverse proxy. I can cast to audio only devices and screen based devices. I do need to be patient to allow the spinning to stop and then press play on the phone again.
Author
Owner

@wesf99 commented on GitHub (May 3, 2024):

Just adding some more information. Casting fails to the older chromecast audio devices. They are the ones that connect to a speaker via a 3.5mm DIN plug. Other audio only chromecast devices seem to work for me.

@wesf99 commented on GitHub (May 3, 2024): Just adding some more information. Casting fails to the older chromecast audio devices. They are the ones that connect to a speaker via a 3.5mm DIN plug. Other audio only chromecast devices seem to work for me.
Author
Owner

@lhassell commented on GitHub (Sep 7, 2024):

Have been playing with this. Hoping someone can point me at the solution. I think I'm close. ABS running via docker on a synology NAS, using the synology reverse proxy attached to a namecheap DNS. In order to resolve the domain name iside the LAN, I have a static DNS route on my router pointing the domain name at the internal IP address. If I log into the server using the IP address instead of the domain name, it works.

Am I using the wrong tool with the static route?

@lhassell commented on GitHub (Sep 7, 2024): Have been playing with this. Hoping someone can point me at the solution. I think I'm close. ABS running via docker on a synology NAS, using the synology reverse proxy attached to a namecheap DNS. In order to resolve the domain name iside the LAN, I have a static DNS route on my router pointing the domain name at the internal IP address. If I log into the server using the IP address instead of the domain name, it works. Am I using the wrong tool with the static route?
Author
Owner

@lhassell commented on GitHub (Sep 11, 2024):

Just to update anyone coming later, I found the issue in my particular situation. I was double-NATed. Once I set up my ISP's router to bridge the network connection directly to my router, the issue was resolved.

@lhassell commented on GitHub (Sep 11, 2024): Just to update anyone coming later, I found the issue in my particular situation. I was double-NATed. Once I set up my ISP's router to bridge the network connection directly to my router, the issue was resolved.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/audiobookshelf-app#510