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

bug: Twitch connection fails with "connection failed EOF" #62

Open
2 tasks done
Bastrabun opened this issue Apr 7, 2023 · 1 comment
Open
2 tasks done

bug: Twitch connection fails with "connection failed EOF" #62

Bastrabun opened this issue Apr 7, 2023 · 1 comment
Assignees
Labels

Comments

@Bastrabun
Copy link

Bastrabun commented Apr 7, 2023

🌧 Describe the problem

Following 42wim/matterbridge#2037 commit 8240917 causes matterbridge not connect to twitch.tv on irc protocol properly.

Using matterbridge-1.26.0-linux-64bit and this config

[irc.tv]
Password="mytokenwasreplacedofc"
Nick="Somenick"
Server="irc.chat.twitch.tv:6697"
UseTLS=true
RemoteNickFormat="<{NICK}> "
Charset="utf-8"

I get this error:

time="2023-04-04T11:26:18Z" level=error msg="disconnect: error: EOF" prefix=irc
time="2023-04-04T11:26:18Z" level=fatal msg="Starting gateway failed: Bridge irc.tv failed to start: connection failed EOF" prefix=main

Downgrading to matterbridge-1.25.2-linux-64bit does not produce the same error. This only difference between those two versions is the commit mentioned above. The matterbridge folks advised me how to compile without this commit: 42wim/matterbridge#2037 (comment) and it worked as expected.

The same matterbridge connects to irc.libera.chat without problems, so it seems something twitch specific.

Here you can see a successful join to irc.libera.chat and then starts the join to twitch. Matterbridge with --debug option:

time="2023-04-06T21:56:28Z" level=debug msg=""CLIENT_CONNECTED irc.libera.chat:6667"" func=handleOther file="bridge/irc/handlers.go:170" prefix=irc
time="2023-04-06T21:56:32Z" level=info msg="Connection succeeded" func=Connect file="bridge/irc/irc.go:107" prefix=irc
time="2023-04-06T21:56:32Z" level=info msg="irc.yl: joining #your-land-web (ID: #your-land-webirc.yl)" func=joinChannels file="bridge/bridge.go:77" prefix=irc
time="2023-04-06T21:56:32Z" level=debug msg=""@time=2023-04-06T21:56:26.913Z :YL MODE YL +iw"" func=handleOther file="bridge/irc/handlers.go:170" prefix=irc
time="2023-04-06T21:56:32Z" level=info msg="irc.yl: joining #your-land-chat (ID: #your-land-chatirc.yl)" func=joinChannels file="bridge/bridge.go:77" prefix=irc
time="2023-04-06T21:56:32Z" level=info msg="irc.yl: joining #your-flight-chat (ID: #your-flight-chatirc.yl)" func=joinChannels file="bridge/bridge.go:77" prefix=irc
time="2023-04-06T21:56:32Z" level=info msg="irc.yl: joining #your-land-dev (ID: #your-land-devirc.yl)" func=joinChannels file="bridge/bridge.go:77" prefix=irc
time="2023-04-06T21:56:32Z" level=info msg="Starting bridge: irc.tv " func=Start file="gateway/router.go:75" prefix=router
time="2023-04-06T21:56:32Z" level=info msg="Connecting irc.chat.twitch.tv:6697" func=Connect file="bridge/irc/irc.go:81" prefix=irc
time="2023-04-06T21:56:32Z" level=debug msg="setting pingdelay to 1m0s" func=getClient file="bridge/irc/irc.go:306" prefix=irc
time="2023-04-06T21:56:32Z" level=debug msg="handle girc.Event{Source:(*girc.Source)(0xc000c2e450), Tags:girc.Tags{"time":"2023-04-06T21:56:32.231Z"}, Timestamp:time.Date(2023, time.April, 6, 21, 56, 32, 231000000, time.Local), Command:"JOIN", Params:[]string{"#your-land-web", "*", "YL"}, Sensitive:false, Echo:false}" func=handleJoinPart file="bridge/irc/handlers.go:117" prefix=irc
time="2023-04-06T21:56:32Z" level=debug msg="333: Topic set by Alias [~Alias@user/alias] [2022-04-04 21:48:03 +0000 UTC]" func=handleTopicWhoTime file="bridge/irc/handlers.go:264" prefix=irc
time="2023-04-06T21:56:32Z" level=debug msg="handle girc.Event{Source:(*girc.Source)(0xc000a171a0), Tags:girc.Tags{"time":"2023-04-06T21:56:32.232Z"}, Timestamp:time.Date(2023, time.April, 6, 21, 56, 32, 232000000, time.Local), Command:"JOIN", Params:[]string{"#your-land-chat", "*", "YL"}, Sensitive:false, Echo:false}" func=handleJoinPart file="bridge/irc/handlers.go:117" prefix=irc
time="2023-04-06T21:56:32Z" level=debug msg="handle girc.Event{Source:(*girc.Source)(0xc000b40690), Tags:girc.Tags{"time":"2023-04-06T21:56:32.233Z"}, Timestamp:time.Date(2023, time.April, 6, 21, 56, 32, 233000000, time.Local), Command:"JOIN", Params:[]string{"#your-flight-chat", "*", "YL"}, Sensitive:false, Echo:false}" func=handleJoinPart file="bridge/irc/handlers.go:117" prefix=irc
time="2023-04-06T21:56:32Z" level=debug msg="handle girc.Event{Source:(*girc.Source)(0xc000b40f60), Tags:girc.Tags{"time":"2023-04-06T21:56:32.233Z"}, Timestamp:time.Date(2023, time.April, 6, 21, 56, 32, 233000000, time.Local), Command:"JOIN", Params:[]string{"#your-land-dev", "*", "YL"}, Sensitive:false, Echo:false}" func=handleJoinPart file="bridge/irc/handlers.go:117" prefix=irc
time="2023-04-06T21:56:32Z" level=debug msg=""CLIENT_INIT irc.chat.twitch.tv:6697"" func=handleOther file="bridge/irc/handlers.go:170" prefix=irc
time="2023-04-06T21:56:32Z" level=debug msg=""CLIENT_DISCONNECTED irc.chat.twitch.tv:6697"" func=handleOther file="bridge/irc/handlers.go:170" prefix=irc
time="2023-04-06T21:56:32Z" level=error msg="disconnect: error: EOF" func=doConnect file="bridge/irc/irc.go:194" prefix=irc
time="2023-04-06T21:56:32Z" level=fatal msg="Starting gateway failed: Bridge irc.tv failed to start: connection failed EOF" func=main file="matterbridge.go:66" prefix=main

This is the same log as in 42wim/matterbridge#2037 (comment)

⛅ Expected behavior

Connection to twitch.tv successful

🔄 Minimal reproduction

Run matterbridge 1.26.0 with the config mentioned above

💠 Version: girc

8240917

🖥 Version: Operating system

linux/debian

⚙ Additional context

Workaround available: Downgrade to matterbridge-1.25.2-linux-64bit: version: 1.25.2 42wim/matterbridge@20f841c or removal of commit 8240917

Not urgent

Selfcontrolled, we can do all kinds of tests with it

Touches #54

Blocks 42wim/matterbridge#2037

For my reference 4114

🤝 Requirements

@yunginnanet
Copy link

interesting. I'd say this bug is pretty specific to Twitch's IRC implementation. the solution may be to implement an EarlyPing configuration directive.

@lrstanley lrstanley self-assigned this Apr 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants