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" on Windows #213

Closed F43nd1r closed 2 years ago

F43nd1r commented 2 years ago

Hi, it's me again, this time on windows 👋

OS version: Windows 10 Browser version: FF 99.0.1 Extension version: 0.2.0 Bridge version: 0.2.0

Description No receiver devices are found. Chrome on the same machine can cast. A linux computer in the same network can cast.

Steps to reproduce

  1. Click the cast button

Expected behaviour Chromecast shows up in receiver list

Logs Web console

fx_cast (Info): cast.initialize [cast_sender.js:1:1446](https://www.gstatic.com/cv/js/sender/v1/cast_sender.js)
fx_cast (Info): cast.logMessage [0.058s] [yt.mdx.remote] LocalScreenService: Initializing with []
cast_sender.js:1:1428
fx_cast (Info): cast.logMessage [0.058s] [yt.mdx.remote] ScreenService: Updated manual screens: []
cast_sender.js:1:1428
fx_cast (Info): cast.logMessage [0.058s] [yt.mdx.remote] ScreenService: Initializing automatic screens: []
cast_sender.js:1:1428
fx_cast (Info): cast.logMessage [0.058s] [yt.mdx.remote] OnlineScreenService: Initialized with {}
cast_sender.js:1:1428
fx_cast (Info): cast.logMessage [0.059s] [yt.mdx.remote] cloudview: cloudview.createSingleton_: true
cast_sender.js:1:1428
fx_cast (Info): cast.logMessage [0.059s] [yt.mdx.remote] remote: Initializing: {"device":"Desktop","app":"youtube-desktop","loadCastApiSetupScript":true,"enableDialLoungeToken":false,"enableCastLoungeToken":false}
cast_sender.js:1:1428
fx_cast (Info): cast.logMessage [0.059s] [yt.mdx.remote] remote:  -- with channel params: {"device":"REMOTE_CONTROL","id":"4c011a85-64f3-448f-8480-3c85a616c364","name":"Desktop","app":"youtube-desktop","mdxVersion":3}
cast_sender.js:1:1428
fx_cast (Info): cast.logMessage [0.060s] [yt.mdx.remote] cloudview: clearCurrentReceiver
cast_sender.js:1:1428
fx_cast (Info): cast.logMessage [0.060s] [yt.mdx.remote] remote: Skipping connecting because no session screen found.
cast_sender.js:1:1428
fx_cast (Info): cast.logMessage [0.819s] [yt.mdx.remote] cloudview: setCastInstalled_ true
cast_sender.js:1:1428
fx_cast (Info): STUB :: cast.setCustomReceivers cast_sender.js:1:1446
fx_cast (Info): cast.logMessage [0.823s] [yt.mdx.remote] cloudview: setApiReady_ true
[cast_sender.js:1:1428](https://www.gstatic.com/cv/js/sender/v1/cast_sender.js)
fx_cast (Info): cast.logMessage [0.824s] [yt.mdx.remote] Controller: Receiver availability updated: unavailable
cast_sender.js:1:1428

Nothing in browser console.

The test script distributed in other issues:

Local addresses [
  'fe80::908e:5061:edd3:a6b1',
  'fe80::39f1:9708:9253:9cda',
  'fe80::88cd:9cf6:805a:ce47'
]
Virus5947 commented 2 years ago

Seems like the new version of the bridge and extension broke audio only chromecast devices. Reverting to the previous version can find devices (for example Nest Mini), but is unable to connect to it, because it is displayed as an video device which it isn't. Btw, the extension name got broken too 🧐

F43nd1r commented 2 years ago

My Chromecast is not an audio only device though

Virus5947 commented 2 years ago

I would suggest that you try the previous version to see if it's showing up and successful connect to it. Then we could say, that the latest version broke the devices lookup entirely?

hensm commented 2 years ago

Should be able to check what Bonjour is able to find like this:

dns-sd -B _googlecast._tcp
dns-sd -L <instance-name> _googlecast._tcp

Edit: The second test script I posted in the other thread would be better for windows, since it logs DNSServiceGetAddrInfo.

@Virus5947 As for audio devices, I check the device capabilities now:

https://github.com/hensm/fx_cast/blob/88190bf12fa11c7abf43516135165011f456027f/ext/src/background/receiverDevices.ts#L87-L95

Virus5947 commented 2 years ago

When running these two commands, I'll get this response.

This is the result when using zeroconfservicebrowser:

Host = db2cce71-75f1-c527-10f0-1b8886d12679.local Address = 192.168.2.156 Port = 8009 TXT = (12)

id = db2cce7175f1c52710f01b8886d12679 cd = 2BEE4E7D0D8A09235D3BB7FBD4ED4FE3 rm = ve = 05 md = Google Nest Mini ic = /setup/icon.png fn = Nest-Mini.2 ca = 199172 st = 0 bs = FA8FCA65DEC3 nf = 1 rs =

Extension still just says "No Devices found".

hensm commented 2 years ago

@Virus5947

Yeah, that's expected. After I added code to read the capabilities flags, I filtered audio-only devices out from the receiver list, since I've never really looked into how they're supposed to be handled.

Seems pretty straightforward though, just have to check against the requested capabilities in the session request.

I'll do some testing with my Nest Mini at some point.

F43nd1r commented 2 years ago

Bonjour is not able to discover my chromecast 🤔 Second test script doesn't show anything besides local adresses either, but I guess that is expected if bonjour finds nothing.

Not sure which API chrome uses, but there it works.

F43nd1r commented 2 years ago

Oh, I found the issue. Just because you think you're directly connected to a network doesn't mean you actually are. Libvirts macvtap blocks mdns traffic by default for some reason. So all good here now, thanks for the great project!