WebSocket no connection with Twitch IRC

I’m trying to connect to the Twitch IRC server, using the WebSocket Dat.
I use the information in the Twitch Dev docs, but the WebSocket is not executing the onConnect function.

I tried this on the stable releases 2022.26590 & 2022.25370 on a Windows 10 desktop PC and a Windows 11 laptop with the same result.
I also tried the SSL and Non-SSL address / port with the same result.

I can connect to a local websocket server without any problem.

Am I missing something or is this a bug?

Cheers, Niklas.

Always struggled with this. If you’re literally just after chat messages, I can recommend this tox, used it extensively on Twitch for a while: Twitch Chat | Derivative

There’s no WebSocket Protocol upgrade in your HTTP header returned in the monitor callback, which is strange. I just tested and was able to connect to the server, so it could be something with your system config - is your firewall configured to allow for outbound TCP connections from TouchDesigner?

Thanks for the link, but unfortunately I need to receive the subscribtion events.

Thanks for the suggestion, I added the Touchdesigner.exe and Python.exe to the windows firewall rules and allowed all outgoing and incoming connections, but I got the same result.
Then I disabled the firewall, but I get the same result.

Edit:
I reactivated the firewall, installed Python3 and the package “websocket-client” and changed the example so it connects to the Twitch IRC Server.
This works without a problem.

Ah ok gotcha! I know this still isn’t a direct solution, but I’ve also had good success with streamerbot to listen for subs and have TDs websocket talk to that. Just incase you end up needing a workaround :slight_smile:

Hmm, Streamerbot could be the a solution, I’d like to stay within TD tough. But it could be a solution if nothing else works, thanks :slight_smile:

I added some error output when the connection fails, which should hopefully give some insight into why it’s failing for you. Here’s a build with the change:

https://www.dropbox.com/s/fpv5cxnq6w2vcpj/TouchDesigner.2022.27890.exe?dl=0

The error is output directly to the console so you’ll need to set the environment variable TOUCH_TEXT_CONSOLE=1 to view it.

Thank you :slight_smile: I get an timeout messege almost instantly, I also disabled the windows defender firewall, but I get the same result…

Thanks, that’s helpful. I’ll take a look into it.