xat / castnow

commandline chromecast player
MIT License
3.81k stars 243 forks source link

"Error: Launch failed. Reason: CAST_INIT_TIMEOUT" #233

Open sanderjo opened 5 years ago

sanderjo commented 5 years ago

Short

I have a Philips Android TV. From my Chrome (on Ubuntu 18.10), I can cast to that TV.

However, castnow results in 'Error: Launch failed. Reason: CAST_INIT_TIMEOUT`

Tips?

Long

On Ubuntu 18.10, I start

castnow 'Setup Quecha 2-second tent --- 2013-08.mp4'

My Android TV responds by switching from TV to a black screen. So my Android TV

In the meantime, my Ubuntu says

State     : Launching...

for a minute or so.

Finally, my Ubuntu says

Error: Launch failed. Reason: CAST_INIT_TIMEOUT

without showing anything on the TV. At that moment, my TV switches back to broadcast-TV.

Tips?

hemanth commented 5 years ago

Can you try:

sudo /sbin/iptables -A INPUT -p udp --dport 5353 -j ACCEPT
sudo /sbin/iptables -A INPUT -p tcp --match multiport --dports 4100:41050 -j ACCEPT
sanderjo commented 5 years ago

Certainly, although I have no firewall active:

$ sudo /sbin/iptables --list
Chain INPUT (policy ACCEPT)
target     prot opt source               destination         

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination         

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination   

Your commands:

$ sudo /sbin/iptables -A INPUT -p udp --dport 5353 -j ACCEPT
$ sudo /sbin/iptables -A INPUT -p tcp --match multiport --dports 4100:41050 -j ACCEPT

result

$ sudo /sbin/iptables --list
Chain INPUT (policy ACCEPT)
target     prot opt source               destination         
ACCEPT     udp  --  anywhere             anywhere             udp dpt:mdns
ACCEPT     tcp  --  anywhere             anywhere             multiport dports 4100:41050

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination         

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination 

Try again

 castnow 'Setup Quecha 2-second tent --- 2013-08.mp4'

  State     : Launching....                                                                                                                   

and after a minute

Error: Launch failed. Reason: CAST_INIT_TIMEOUT

So no change.