gabe565 / CastSponsorSkip

⏭️ Skip YouTube ads and sponsorships on all local Google Cast devices
Apache License 2.0
282 stars 6 forks source link

Fails when trying to attach to a nonexistent IPv6 interface #54

Open utrack opened 6 months ago

utrack commented 6 months ago

Heya! That's a neat service, thank you :)

I've hit a problem running it on my laptop (both 'natively' and via Docker). It spams that line to the logs:

2023/12/11 21:44:33 ERROR Failed to discover devices. error="unable to create new zeroconf resolver: listen udp6 [ff02::]:5353: socket: address family not supported by protocol"

I'm running Arch Linux rolling, and I don't have any v6 interfaces. Here's the ip a:

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
2: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether 04:7b:cb:b3:4a:e0 brd ff:ff:ff:ff:ff:ff
    inet 192.168.50.123/24 brd 192.168.50.255 scope global dynamic noprefixroute wlan0
       valid_lft 84715sec preferred_lft 84715sec
4: docker0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default
    link/ether 02:42:00:a2:22:a0 brd ff:ff:ff:ff:ff:ff
    inet 172.4.0.1/24 brd 172.4.0.255 scope global docker0
       valid_lft forever preferred_lft forever

Cheers! Let me know if you need me as a guinea pig to test things :)

gabe565 commented 5 months ago

@utrack Sorry for the late response, I was busy with the holidays and missed this issue! Were you ever able to work around this?

If not, this is an interesting one. Admittedly, I don't use IPv6 either and I haven't seen this issue. Let me test with an Arch device to see if I have the same error.

I'd maybe suggest installing go-chromecast, which is the the library this repo uses to communicate with devices. Once installed, maybe just something like go-chromecast ls?

utrack commented 4 months ago

Yep, I guess it's an issue on their side :) thanks! I'll report that to upstream.

> go-chromecast ls
error: unable to discover chromecast devices: unable to create new zeroconf resolver: listen udp6 [ff02::]:5353: socket: address family not supported by protocol
FlyveHest commented 4 months ago

+1 for this, happening on my system as well, I also haven't got ipv6 enabled.

Edit: If I specify IP via --devices, it connects.

gabe565 commented 4 months ago

@FlyveHest Does it help if you bind a specific interface with the --network-interface flag or the CSS_NETWORK_INTERFACE env?

gabe565 commented 4 months ago

@utrack I saw that go-chromecast is working again for you...is CastSponsorSkip also working?

FlyveHest commented 3 months ago

@FlyveHest Does it help if you bind a specific interface with the --network-interface flag or the CSS_NETWORK_INTERFACE env?

Thats what I tried first, did not make a difference, but when I bound it to an interface (I have 4) and specified my devices IP (ChromeCast is on a static lease for firewalling purposes), it skipped discovery and just connected.

Its not optimal for most people, I guess, but it works until the problem is fixed upstream, at least :)

utrack commented 3 months ago

@gabe565 Yes, it does - I didn't do any rebuilds, so it seems like this issue happens with some specific OS setup.