advplyr / audiobookshelf-app

Mobile application for Audiobookshelf
https://audiobookshelf.org
GNU General Public License v3.0
1.28k stars 172 forks source link

[Android] Chromecast doesnt continue scanning connections #1130

Open patienttruth opened 7 months ago

patienttruth commented 7 months ago

Steps to reproduce

  1. Open podcast or audiobooks
  2. Play file

Expected behaviour

Actual behaviour

Environment data

Audiobookshelf Version: 2.8.0

Android Issue

Android version: 14

Device model: Pixel 6

Stock or customized system: GrapheneOS

Additional Information:

Initially I was on 2.7.2, however I updated to 2.8.0 while preparing this report. Upon initial boot I restarted the Android App, and I saw the cast icon, and was able to select a cast target. It showed as connected, however it would not start playing.

Eventually the app stopped and when I opened it back up the cast icon no longer shows up.

advplyr commented 7 months ago

The cast icon only shows up when it sees a device that can be casted to. Make sure your device can see a chromecast device.

patienttruth commented 7 months ago

The cast icon only shows up when it sees a device that can be casted to. Make sure your device can see a chromecast device.

My other apps (Antennapod, etc) can see and connect / play to the chromecast devices. If it's normally a functional feature I'll dive into my networking as there have been some other bugs that somehow aren't affecting the other apps.

patienttruth commented 7 months ago

I'm not sure if this provides insight, but I found an error in my Home Assistant Cast Log. At fist I thought "why would this be showing in a HA log, but I'm starting to thing that it's aware of the media sources that cast, and therefore is able to log when the Chromecast has a related error.

Failed to cast media https://bookshelf.lab.X.com/api/items/X/file/X?token=X. Please make sure the URL is: Reachable from the cast device and either a publicly resolvable hostname or an IP address

Is it necessary for audio bookshelf to be publicly accessible? If so I apologize as I must have missed that.

advplyr commented 7 months ago

I'm not sure about that, I think it depends on the device. Have you tested it?

advplyr commented 7 months ago

Were you able to resolve this issue?

sydlexius commented 7 months ago

I can reproduce this issue on my S22 Ultra. I can appreciate that if my device let its wifi radio sleep that it might lose contact with nearby devices, but my expectation would be that if I switch between Audiobookshelf accounts that it should make another sweep/scan of my environment for other devices. As it stands, I basically have to force stop the app and relaunch it to do this.

BerendWouters commented 2 weeks ago

As it stands, I basically have to force stop the app and relaunch it to do this.

I have the same issue: my Moto G5 with Android 11 doesn't show the cast icon. On another device in the same network with a different ABS account has no problem casting. Logging out/Switching server (basically logging out, force quit and logging in again with the same account) did the trick.

sydlexius commented 2 weeks ago

Can this issue be reopened? I am still impacted by this bug, and have had several new versions since my previous post.