Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not working on Windows Docker #23

Open
My-Name-Is-Adam opened this issue Aug 15, 2021 · 9 comments
Open

Not working on Windows Docker #23

My-Name-Is-Adam opened this issue Aug 15, 2021 · 9 comments
Labels
enhancement New feature or request on hold

Comments

@My-Name-Is-Adam
Copy link

Hi, new to Docker, so maybe just me not setting this up properly.

So I've installed Docker on my Windows 10 device.

In cmd, I ran the following two commands separately:

docker pull erdnaxeli/castblock:latest
docker run --rm --network host erdnaxeli/castblock

When casting from the YouTube app to my phone, the sponsors still show.
Same when casting from the Android app.

Command prompt is showing the following:
C:\Users\adam_>docker run --rm --network host erdnaxeli/castblock
2021-08-15T05:50:46.211781Z INFO - castblock.chromecast: Found go-chromecast at /usr/bin/go-chromecast.
2021-08-15T05:50:46.211838Z INFO - castblock.chromecast: Starting the go-chromecast server.
2021-08-15T05:50:46.716203Z INFO - castblock.chromecast: The go-chromecast server is up

Any ideas on how to get this to work, please? SponsorBlock works fine in the browser but doesn't skip the sponsored segments on Chromecast, which I thought this should be doing.

Thank you.

@My-Name-Is-Adam
Copy link
Author

To add I have allowed the port just in case, and also ran it via an elevated command prompt window but it didn't solve it.

I ran it with the --debug flag and I'm not seeing any errors.

C:\Windows\system32>docker run --rm --network host erdnaxeli/castblock --debug
2021-08-15T06:15:36.333124Z INFO - castblock.chromecast: Found go-chromecast at /usr/bin/go-chromecast.
2021-08-15T06:15:36.333206Z INFO - castblock.chromecast: Starting the go-chromecast server.
2021-08-15T06:15:36.333520Z DEBUG - http.client: Performing request -- method: "GET", host: "127.0.0.1", port: 8011, resource: "/"
2021-08-15T06:15:36.834901Z DEBUG - http.client: Performing request -- method: "GET", host: "127.0.0.1", port: 8011, resource: "/"
2021-08-15T06:15:36.835537Z INFO - castblock.chromecast: The go-chromecast server is up
2021-08-15T06:15:37.336185Z DEBUG - castblock.blocker: Checking for new devices
2021-08-15T06:15:37.336189Z DEBUG - http.client: Performing request -- method: "GET", host: "127.0.0.1", port: 8011, resource: "/devices"
2021-08-15T06:16:10.342797Z DEBUG - castblock.blocker: Checking for new devices
2021-08-15T06:16:10.342799Z DEBUG - http.client: Performing request -- method: "GET", host: "127.0.0.1", port: 8011, resource: "/devices"
2021-08-15T06:16:43.347528Z DEBUG - castblock.blocker: Checking for new devices
2021-08-15T06:16:43.347531Z DEBUG - http.client: Performing request -- method: "GET", host: "127.0.0.1", port: 8011, resource: "/devices"
2021-08-15T06:17:16.347551Z DEBUG - castblock.blocker: Checking for new devices
2021-08-15T06:17:16.347554Z DEBUG - http.client: Performing request -- method: "GET", host: "127.0.0.1", port: 8011, resource: "/devices"
2021-08-15T06:17:49.353006Z DEBUG - castblock.blocker: Checking for new devices
2021-08-15T06:17:49.353009Z DEBUG - http.client: Performing request -- method: "GET", host: "127.0.0.1", port: 8011, resource: "/devices"

@erdnaxeli
Copy link
Owner

Hi, sorry for the wait.

I don't know how docker works on windows, but I bet the "host" network is not available. As the windows kernel does not support docker, it must run in a vm, and I guess the network always goes through a NAT. Sadly this makes go-chromecast (the tools castblock use to talk to the chromecast) unable to work as it needs to be able to broadcast packets on the same network as the chromecast :/

@erdnaxeli
Copy link
Owner

Yeah :/. From the official documentation : https://docs.docker.com/network/host/

The host networking driver only works on Linux hosts, and is not supported on Docker Desktop for Mac, Docker Desktop for Windows, or Docker EE for Windows Server.

You would need to run go-chromecast and castblock on windows directly. Sadly Crystal (the language used to write this project) does not currently support windows : crystal-lang/crystal#5430.

I will keep this issue opened, if anybody also wants a windows support please put a thumb up on the first message.

@erdnaxeli erdnaxeli added enhancement New feature or request on hold labels Aug 20, 2021
@My-Name-Is-Adam
Copy link
Author

Yeah :/. From the official documentation : https://docs.docker.com/network/host/

The host networking driver only works on Linux hosts, and is not supported on Docker Desktop for Mac, Docker Desktop for Windows, or Docker EE for Windows Server.

You would need to run go-chromecast and castblock on windows directly. Sadly Crystal (the language used to write this project) does not currently support windows : crystal-lang/crystal#5430.

I will keep this issue opened, if anybody also wants a windows support please put a thumb up on the first message.

Hey, thank you for letting me know.

That's such a shame. I've had a look at not really sure how to use go-chromecast and castblock on Windows without the tool. I can't really find any decent documentation. If you're able to offer any advice I would really appreciate it. Thank you very much. :)

@dustinbolton
Copy link

Not to sidetrack but this project doesn't work on Windows or Mac either? It would be nice to have this mentioned in docs that it doesn't work on standard operating systems as I've spent a few hours trying to get it to work. :(

@stephen304
Copy link
Contributor

stephen304 commented Jan 6, 2022

@dustinbolton It looks like crystal works on mac, so I don't see why it wouldn't. The other component is go-chromecast which, written in go, should compile on mac just fine.

As for windows, would running the castblock / go-chromecast binaries in WSL work? It seems like the major limitation here is just if you're set on using Docker on windows/mac.

@erdnaxeli
Copy link
Owner

You need to have access to the same LAN as the chromecast in order to be able to listen for the broadcast packets emitted by it. The network inside WSL is not bridged with the one of the host, instead it seems to uses a NAT, so I don't think it will work either.

@erdnaxeli
Copy link
Owner

erdnaxeli commented Jan 10, 2022

The windows support by Crystal has increased, we could try to compile castblock for windows (and run it natively without Docker).

@medallyon
Copy link

Bumping to show my interest and seeing if there have been any updates on this 🌿

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request on hold
Projects
None yet
Development

No branches or pull requests

5 participants