advplyr / audiobookshelf

Self-hosted audiobook and podcast server
https://audiobookshelf.org
GNU General Public License v3.0
6.23k stars 435 forks source link

[Bug]: Chromecast doesn't work #3218

Open Silther opened 1 month ago

Silther commented 1 month ago

What happened?

Chromecast currently doesn't work for me. There are 2 different scenarios:

  1. In the Browser (Microsoft Edge, Chromium with Chromecast enabled in the settings): The browser just crashes.
  2. In the Mobile App (Android 14, App Version 0.9.74) while streaming/playing some audiobooks (mostly larger books): It connects to the speaker but playback doesn't start (the progress bar doesn't change and the speaker plays no sound).

(When the Chromecast streaming works, there is an icon in the top right corner of the google home app that doesn't open the Audiobookshelf app, which it should)

What did you expect to happen?

Chromecast streaming should work on all devices browser/apps while streaming audiobooks or having them downloaded (I know that for Chromecasting it still has to be connected to the server even if you downloaded the book)

Steps to reproduce the issue

  1. Try Chromecasting a larger audiobook in the android app (>1GB)

Audiobookshelf version

2.11

How are you running audiobookshelf?

Docker

What OS is your Audiobookshelf server hosted from?

Linux

If the issue is being seen in the UI, what browsers are you seeing the problem on?

Edge

Logs

No response

Additional Notes

No response

nichwall commented 1 month ago

Can you provide any browser logs from the browser crashing when trying to cast?

Silther commented 1 month ago

Can you provide any browser logs from the browser crashing when trying to cast?

1c021d18-3cb4-4df1-963c-3b8d338cca0d.dmp

{
  "Local ID": "1c021d18-3cb4-4df1-963c-3b8d338cca0d",
  "Upload ID": "1c021d18-3cb4-4df1-963c-3b8d338cca0d",
  "Bucket ID": "d730e656b00ac86008a84a2072b7002a",
  "Cab ID": "",
  "Capture Time": "Wednesday, 31 July 2024 at 18:05:28",
  "Upload Time": "Wednesday, 31 July 2024 at 18:05:28",
  "State": "Reported",
  "P1": "msedge.exe",
  "P2": "127.0.2651.74",
  "P3": "msedge.dll",
  "P4": "127.0.2651.74",
  "P5": "47047393",
  "P6": "browser",
  "P7": "0xc000001d",
  "P8": "0"
}

Not sure if that helps, but didn't find any over logs

Silther commented 1 month ago

Both 1. and 2. seem to be related to audiobookshelf-app/#654 as casting to an google tv worked from the app and the browser without crashes even with books which weren't castable to an audio only speaker with chromecast built-in.

Silther commented 1 month ago

For debugging I could send one of the audiobooks, which do not work, to an dev, but I will not upload it publicly.

patduckless commented 1 month ago

I don't know if it is related But I have had the same issues with Chrome cast due to google forcing chromecast to use their DNS servers. So unless you have the DNS record for your instance configured in public DNS and hairpin routing configured on your router chrome casting doesn't work properly.