hensm / fx_cast

Chromecast Web Sender SDK implementation for Firefox
https://hensm.github.io/fx_cast/
MIT License
1.87k stars 63 forks source link

No receiver devices found #159

Closed lodgerz closed 2 years ago

lodgerz commented 3 years ago

OS version: ArchLinux 5.9.10-arch1-1 Browser version:83.0 Extension version:0.1.2 Bridge version:**

Description It says "No receiver devices found" f

i have also tried to install fx_cast from AUR but i haven't solved.

On chromium, chromecast works.

hensm commented 3 years ago

Try fx_cast-binAUR, since there might be an issue with the main one. I don't maintain the AUR packages, so any package-specific issues should be directed to the relevant maintainers.

ghost commented 3 years ago

Final edit from me: I think I fully figured out my issue. I'm guessing it was Pi-Hole blocking .local domains from being queried correctly (as in, I was able to successfully cast a YT video).

Not original issue reporter, but I'm seeing this same issue. Since I didn't want to open a separate issue, I'll use the issue template here instead.

OS version: Arch Linux Browser version: 84.0.1 Extension version: 0.1.2 Bridge version: 0.1.0 (using the suggested fx_cast-bin package)

Description Same as original issue reporter. No devices are found when attempting to cast (see screenshot).

image

Steps to reproduce

  1. Go to a YouTube video (it's supported, right?) and try to cast.

Expected behaviour My NVIDIA Shield TV (which has chromecast built-in support) shows up as a device to cast to.

Logs I took 2 lines that seemed to be important from the debug console.

fx_cast (Error): Bridge connection failed and backup not enabled. fx_cast_bridge disconnected: <empty string>

If that's the case, then why does the extension settings page say the bridge is connected (see screenshot)?

image

Edit:

libuv issue on Ice Lake CPUs?

I've got an i5-5200U processor.

hensm commented 3 years ago

@SheepKid12 Possibly #134 which is a libuv issue on Ice Lake CPUs? Still waiting on a newer prebuilt package to update the Node version.

e: looking at it again, I think that's Windows-specific, so probably not that. The error just means the bridge exited some point after retrieving the status but before discovery was started. Any stderr logs from the browser console? Hopefully I'll be able to get my Chromecast back from my other place soon so I can test again, COVID restrictions are a bit annoying for travel right now.

lodgerz commented 3 years ago

Try fx_cast-binAUR, since there might be an issue with the main one. I don't maintain the AUR packages, so any package-specific issues should be directed to the relevant maintainers.

i have installed fx_cast-bin from AUR but it still doesn't work:

fxcast

my CPU is Intel J1900 /with integrated GPU Bay Trail-D: $ lspci|grep -i vga 00:02.0 VGA compatible controller: Intel Corporation Atom Processor Z36xxx/Z37xxx Series Graphics & Display (rev 0e)

hensm commented 3 years ago

@lodgerz It's getting a little further, at least. This means it can find the bridge, but it isn't responding to extension messages and it's just timing out. Should be more details in logs.

lodgerz commented 3 years ago

@lodgerz It's getting a little further, at least. This means it can find the bridge, but it isn't responding to extension messages and it's just timing out. Should be more details in logs.

firefox debugger logs is empty :-|

hensm commented 3 years ago

All of them?

ghost commented 3 years ago

Any stderr logs from the browser console?

stderr output from native app fx_cast_bridge: *** WARNING *** The program 'fx_cast_bridge' uses the Apple Bonjour compatibility layer of Avahi.
stderr output from native app fx_cast_bridge: *** WARNING *** Please fix your application to use the native API of Avahi!
stderr output from native app fx_cast_bridge: *** WARNING *** For more information see <http://0pointer.de/blog/projects/avahi-compat.html>
stderr output from native app fx_cast_bridge: *** WARNING *** The program 'fx_cast_bridge' called 'DNSServiceRegister()' which is not supported (or only supported partially) in the Apple Bonjour compatibility layer of Avahi.
stderr output from native app fx_cast_bridge: *** WARNING *** Please fix your application to use the native API of Avahi!
stderr output from native app fx_cast_bridge: *** WARNING *** For more information see <http://0pointer.de/blog/projects/avahi-compat.html>
stderr output from native app fx_cast_bridge: events.js:292
stderr output from native app fx_cast_bridge:       throw er; // Unhandled 'error' event
stderr output from native app fx_cast_bridge:       ^
stderr output from native app fx_cast_bridge: 
stderr output from native app fx_cast_bridge: Error: getaddrinfo -3008
stderr output from native app fx_cast_bridge:     at errnoException (/snapshot/fx_cast/app/node_modules/mdns/lib/resolver_sequence_tasks.js:199:11)
stderr output from native app fx_cast_bridge:     at getaddrinfo_complete (/snapshot/fx_cast/app/node_modules/mdns/lib/resolver_sequence_tasks.js:112:10)
stderr output from native app fx_cast_bridge:     at GetAddrInfoReqWrap.oncomplete (/snapshot/fx_cast/app/node_modules/mdns/lib/resolver_sequence_tasks.js:120:9)
stderr output from native app fx_cast_bridge: Emitted 'error' event on Browser instance at:
stderr output from native app fx_cast_bridge:     at on_resolver_done (/snapshot/fx_cast/app/node_modules/mdns/lib/browser.js:28:14)
stderr output from native app fx_cast_bridge:     at next (/snapshot/fx_cast/app/node_modules/mdns/lib/browser.js:100:7)
stderr output from native app fx_cast_bridge:     at /snapshot/fx_cast/app/node_modules/mdns/lib/resolver_sequence_tasks.js:160:11
stderr output from native app fx_cast_bridge:     at getaddrinfo_complete (/snapshot/fx_cast/app/node_modules/mdns/lib/resolver_sequence_tasks.js:112:7)
stderr output from native app fx_cast_bridge:     at GetAddrInfoReqWrap.oncomplete (/snapshot/fx_cast/app/node_modules/mdns/lib/resolver_sequence_tasks.js:120:9) {
stderr output from native app fx_cast_bridge:   code: -3008,
stderr output from native app fx_cast_bridge:   errno: -3008,
stderr output from native app fx_cast_bridge:   syscall: 'getaddrinfo'
stderr output from native app fx_cast_bridge: }
Error: fx_cast (Error): Bridge connection failed and backup not enabled.

This same long error repeats every few seconds.

hensm commented 3 years ago

@SheepKid12 Do you have Avahi installed and enabled? Seems like it's not a dependency of the AUR package. Message comes from Avahi, so it must be installed, but I'd just double check it's configured properly.

avahi-browse -rv _googlecast._tcp
ghost commented 3 years ago

@hensm

avahi-browse -rv _googlecast._tcp

Server version: avahi 0.8; Host name: [REDACTED].local
E Ifce Prot Name                                          Type                 Domain
: Cache exhausted
+ wlp6s0 IPv4 SHIELD-Android-TV-991031a79a3224e673c7f7c00fb95245 _googlecast._tcp     local
= wlp6s0 IPv4 SHIELD-Android-TV-991031a79a3224e673c7f7c00fb95245 _googlecast._tcp     local
   hostname = [991031a7-9a32-24e6-73c7-f7c00fb95245.local]
   address = [192.168.1.128]
   port = [8009]
   txt = ["rs=YouTube" "nf=2" "bs=FA8F992E3E05" "st=1" "ca=462853" "fn=[REDACTED] NVIDIA Shield TV" "ic=/setup/icon.png" "md=SHIELD Android TV" "ve=05" "rm=" "cd=2125759323CAE1459CC44D4479BF2875" "id=991031a79a3224e673c7f7c00fb95245"]
: All for now

From what I can tell, that is telling me that avahi is working and properly detecting my device.

lodgerz commented 3 years ago

All of them?

yes, in debugger logs there aren't any message with "cast" word

hensm commented 3 years ago

@SheepKid12 Can you try with nss-mdns installed?

lodgerz commented 3 years ago

All of them?

oh! i have found some logs on browser console (pressing Ctrl+Shift+J):

stderr output from native app fx_cast_bridge: *** WARNING *** The program 'fx_cast_bridge' uses the Apple Bonjour compatibility layer of Avahi.
stderr output from native app fx_cast_bridge: *** WARNING *** Please fix your application to use the native API of Avahi!
stderr output from native app fx_cast_bridge: *** WARNING *** For more information see <http://0pointer.de/blog/projects/avahi-compat.html>
stderr output from native app fx_cast_bridge: *** WARNING *** The program 'fx_cast_bridge' called 'DNSServiceRegister()' which is not supported (or only supported partially) in the Apple Bonjour compatibility layer of Avahi.
stderr output from native app fx_cast_bridge: *** WARNING *** Please fix your application to use the native API of Avahi!
stderr output from native app fx_cast_bridge: *** WARNING *** For more information see <http://0pointer.de/blog/projects/avahi-compat.html>
stderr output from native app fx_cast_bridge: (node:2097) UnhandledPromiseRejectionWarning: Error: dns service error: unknown
stderr output from native app fx_cast_bridge:     at new Browser (/snapshot/fx_cast/app/node_modules/mdns/lib/browser.js:86:10)
stderr output from native app fx_cast_bridge:     at Object.create [as createBrowser] (/snapshot/fx_cast/app/node_modules/mdns/lib/browser.js:114:10)
stderr output from native app fx_cast_bridge:     at Object.<anonymous> (/snapshot/fx_cast/app/build/src/bridge/components/discovery.js)
stderr output from native app fx_cast_bridge:     at Module._compile (pkg/prelude/bootstrap.js:1320:22)
stderr output from native app fx_cast_bridge:     at Object.Module._extensions..js (internal/modules/cjs/loader.js:1156:10)
stderr output from native app fx_cast_bridge:     at Module.load (internal/modules/cjs/loader.js:984:32)
stderr output from native app fx_cast_bridge:     at Function.Module._load (internal/modules/cjs/loader.js:877:14)
stderr output from native app fx_cast_bridge:     at Module.require (internal/modules/cjs/loader.js:1024:19)
stderr output from native app fx_cast_bridge:     at Module.require (pkg/prelude/bootstrap.js:1225:31)
stderr output from native app fx_cast_bridge:     at require (internal/modules/cjs/helpers.js:72:18)
stderr output from native app fx_cast_bridge: (node:2097) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
stderr output from native app fx_cast_bridge: (node:2097) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

EDIT: i have installed and enabled avahi. Now fx_cast says "BRIDGE FOUND", but it still doesn't work ("No receiver devices found")

$ avahi-browse -rv _googlecast._tcp
Server version: avahi 0.8; Host name: linux.local
E Ifce Prot Name                                          Type                 Domain
+   eth0 IPv4 Chromecast-1ab30d5ac169e55c73916558c7fc04dd   _googlecast._tcp     local
=   eth0 IPv4 Chromecast-1ab30d5ac169e55c73916558c7fc04dd   _googlecast._tcp     local
   hostname = [1ab30d5a-c169-e55c-7391-6558c7fc04dd.local]
   address = [192.168.0.4]
   port = [8009]
   txt = ["rs=" "nf=1" "bs=FA8FCA7302B9" "st=0" "ca=200709" "fn=Sony-TV" "ic=/setup/icon.png" "md=Chromecast" "ve=05" "rm=" "cd=5F6DE855749DABB73BD3408A55C41075" "id=1ab30d5ac169e55c73916558c7fc04dd"]
: Cache exhausted
: All for now
lodgerz commented 3 years ago

i have installed nss-mdns. Now fx_cast finds my chromecast but i can't press CAST button: 01

stderr output from native app fx_cast_bridge: *** WARNING *** The program 'fx_cast_bridge' uses the Apple Bonjour compatibility layer of Avahi.
stderr output from native app fx_cast_bridge: *** WARNING *** Please fix your application to use the native API of Avahi!
stderr output from native app fx_cast_bridge: *** WARNING *** For more information see <http://0pointer.de/blog/projects/avahi-compat.html>
stderr output from native app fx_cast_bridge: *** WARNING *** The program 'fx_cast_bridge' called 'DNSServiceRegister()' which is not supported (or only supported partially) in the Apple Bonjour compatibility layer of Avahi.
stderr output from native app fx_cast_bridge: *** WARNING *** Please fix your application to use the native API of Avahi!
stderr output from native app fx_cast_bridge: *** WARNING *** For more information see <http://0pointer.de/blog/projects/avahi-compat.html>

EDIT: Screen/TAB casting work, but Youtube cast still doesn't work.

ghost commented 3 years ago

@hensm I'm not as lucky as the other person (I've already got that package installed).

virse commented 3 years ago

Same her. With Manjaro (Arch) and nss-mdns installed and still the same error that no receiver device is found.

Greets

lodgerz commented 3 years ago

Same her. With Manjaro (Arch) and nss-mdns installed and still the same error that no receiver device is found.

Greets

have you started avahi daemon? $ sudo systemctl start avahi-daemon.service

hensm commented 3 years ago

@lodgerz Have you whitelisted YouTube from the toolbar button context menu?

virse commented 3 years ago

Same her. With Manjaro (Arch) and nss-mdns installed and still the same error that no receiver device is found. Greets

have you started avahi daemon? $ sudo systemctl start avahi-daemon.service

Yes avahi is up and running.

still the same "No receiver device found" error.

lodgerz commented 3 years ago

@lodgerz Have you whitelisted YouTube from the toolbar button context menu?

yes, i have set http://www.youtube.com/* Schermata del 2021-01-11 20-09-28

lodgerz commented 3 years ago

Same her. With Manjaro (Arch) and nss-mdns installed and still the same error that no receiver device is found. Greets

have you started avahi daemon? $ sudo systemctl start avahi-daemon.service

Yes avahi is up and running.

still the same "No receiver device found" error.

try to post the output of $ avahi-browse -rv _googlecast._tcp

hensm commented 3 years ago

@lodgerz Try https instead of http in the match pattern.

lodgerz commented 3 years ago

@lodgerz Try https instead of http in the match pattern.

ok now works. Thank You.

p.s. Spotify cast doesn't work, it says "Casting..." but nothing happens

hensm commented 3 years ago

@lodgerz Good to see, I'll look at Spotify again soon.

@SheepKid12 @virse Just received a new Chromecast, so I'll do some testing and see if I can replicate this issue.

virse commented 3 years ago

try to post the output of $ avahi-browse -rv _googlecast._tcp

Hmm. That's strange:

avahi-browse -rv _googlecast._tcp shows me:

Server version: avahi 0.8; Host name: manjaro.local
E Ifce Prot Name                                          Type                 Domain
: Cache exhausted
: All for now

Thanks for your help.

Parent5446 commented 3 years ago

FWIW, I am running into the same problem here. The extension doesn't work on any site and just says no receiver devices found. I've checked to ensure avahi-daemon.service is running, nss-mdns is installed, and avahi-browse lists out my casting device.

lodgerz commented 3 years ago

FWIW, I am running into the same problem here. The extension doesn't work on any site and just says no receiver devices found. I've checked to ensure avahi-daemon.service is running, nss-mdns is installed, and avahi-browse lists out my casting device.

try to post the output of $ avahi-browse -rv _googlecast._tcp

Hmm. That's strange:

avahi-browse -rv _googlecast._tcp shows me:

Server version: avahi 0.8; Host name: manjaro.local
E Ifce Prot Name                                          Type                 Domain
: Cache exhausted
: All for now

try to install "libmicrodns" and "protobuf " packages and edit "/etc/nsswitch.conf" adding "mdns_minimal [NOTFOUND=return]" before resolve:

$ cat /etc/nsswitch.conf
# Name Service Switch configuration file.
# See nsswitch.conf(5) for details.

passwd: files systemd
group: files systemd
shadow: files

publickey: files

hosts: files mymachines myhostname mdns_minimal [NOTFOUND=return] resolve [!UNAVAIL=return] dns
networks: files

protocols: files
services: files
ethers: files
rpc: files

netgroup: files
virse commented 3 years ago

try to install "libmicrodns" and "protobuf " packages and edit "/etc/nsswitch.conf" adding "mdns_minimal [NOTFOUND=return]" before resolve:

Thx for your reply.

"libmicrodns" and "protobuf " are already installed and "mdns_minimal [NOTFOUND=return]" is also already in the nsswitch.conf.

Any more hints on that?

Greets and Thx.

Parent5446 commented 3 years ago

try to install "libmicrodns" and "protobuf " packages and edit "/etc/nsswitch.conf" adding "mdns_minimal [NOTFOUND=return]" before resolve:

This actually fixed it for me. Thank you! It may be worth mentioning these requirements in the README.

hensm commented 3 years ago

Looks like this is an issue with the Arch packages not having the right runtime dependencies (and a different default system NSS config), so beyond a documentation change, there's not much else to do on this side.

@Parent5446 Does libmicromdns actually make a difference separate to the config change? That's a separate mDNS implementation and it should use Avahi either way.

@virse Might have better luck on a general support forum if it's a config issue.

lodgerz commented 3 years ago

@Parent5446 Does libmicromdns actually make a difference separate to the config change? That's a separate mDNS implementation and it should use Avahi either way.

i tried too. fxcast also works without libmicromdns. But it doesn't work without editing nsswitch.conf.

anyway, i had found that tip on VLC ArchWiki page: https://wiki.archlinux.org/index.php/VLC_media_player#Chromecast_support

yavko commented 2 years ago

It can recognize the video on anysite or recognize the 6 google cast enable devices i have, i have avahi running ive looked at everything nothing works

mtoniott commented 2 years ago

Same problem here. Bridge is deemed to work according to the module preference menu. I'm on archlinux, installed package fx_cast-bin. Avahi sees my chromecast.

libmicrodns installed , protobuf package installed, nss-mdns installed and conf file properly changed. I ran out of idea on how to make this work.

hensm commented 2 years ago

Closing with #199.