stashapp / stash

An organizer for your porn, written in Go. Documentation: https://docs.stashapp.cc
https://stashapp.cc/
GNU Affero General Public License v3.0
9.28k stars 791 forks source link

[Bug Report] Can't cast any video to Chromecast #4136

Open hecklawert opened 1 year ago

hecklawert commented 1 year ago

Describe the bug Every time I try to cast any video to Chromecast, the player hangs and doesn't play the video. Chromecast doesn't show any error; it only displays a cast icon. I've tried this with both HTTP and HTTPS, and I get the same error.

To Reproduce Steps to reproduce the behavior:

  1. Go to any video
  2. Click on ChromeCast Button
  3. Player hangs and doesn't play the video

Expected behavior Video should play at TV with Chromecast

Stash Version: (from Settings -> About): v0.22.1

Desktop:

Smartphone:

Eviepayne commented 1 year ago

I also encounter this. Not sure why it happens. I have https, stash works normally. the chromecast worked once and then never again.

Edit: resolved my issue. chromecast is blocked when security login is made. Edit again. was not my issue

hecklawert commented 12 months ago

Trying v0.23. Bug is still present.

Eviepayne commented 12 months ago

@hecklawert I resolved my issue. Do you have your stash on reverse proxy? I found that the issue was DNS. chromecast hardcodes 8.8.8.8 as it's DNS provider. I added a outbound NAT on my firewall to redirect 8.8.8.8 to my local dns and it resolved my issue (note that my local dns had my stash domain)

tl;dr it could be you need to either do what I did or make your domain public DNS.

hecklawert commented 12 months ago

@Eviepayne Thanks, I've finally able to fix it. As you said I was using a reverse proxy. To keep things simple I made some network changes and now I cast using the IP instead the domain

Qlupic commented 9 months ago

I have the same problem and I tried to change DNS to Google both in the router and windows. Didn't help. I am using Windows 10. YouTube casting works as normal.

Eviepayne commented 9 months ago

I have the same problem and I tried to change DNS to Google both in the router and windows. Didn't help. I am using Windows 10. YouTube casting works as normal.

The issue isnt what dns you use. Its that google doesnt know your hostname assuming you have a domain on it.

you have 2 options.

(Not recommended)

  1. publish the dns on the internet and make stash public facing.

(Recommended)

  1. In your router create a NAT rule that redirects requests from google to your own dns resolver.

For ex. in my opnsense firewall I redirect all DNS queries to my Opnsense (localhost) The DNS there is a recursor so I get internet published dns as well.

in your case you may want to only redirect 8.8.8.8 unless your dns server is a recursor as well.

To be as clear as I can. your chromecast needs to resolve the dns, http request to the right place and have permissions to view your stash.

if any of those fail you wont work.