-
-
Notifications
You must be signed in to change notification settings - Fork 161
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
Unexpected failure with error 'Websocket connection was closed: None' #438
Comments
I'm experiencing the same issue. Exactly the same, same error lines and everything. |
Having the exact same problem, same errors and lines.
|
I was able to investigate this further by inspecting the debug logs I enabled with:
My guess is the issue happens when twitch sends us a RECONNECT, which triggers the TwitchIO logic for handling the situation which, in turn, attempts to use an expired token to authenticate. (If you manage to successfully authenticate with the same token you got this error with, please speak up because my guess is likely wrong) And it will attempt to reconnect many more times, hence the The behavior I observed is that twitch will keep you authenticated even if your token has expired, as long as you stay connected to the server. As TwitchIO 2.x doesn't have the ability to handle refresh tokens (the matter is being worked on in 3.x), the issue here is bad exception handling: TwitchIO should not attempt to reconnect with the same failed credentials; it should raise a descriptive exception instead. This suggests TwitchIO never had the ability to handle twitch's reconnect irc command correctly: it would always break once the command is received and the token is expired. Maybe this issue is only apparent now because twitch is sending the reconnect commands more often? Related discussion: #400 The log analysis was done on TwitchIO 2.9.0. |
I also confirm that I have updated to TwitchIO 2.9.0 and still receiving the same error |
@returnDanilo @Eclip5eLP |
To address what @returnDanilo said, in 3.x we won't even be using IRC so we will not have to handle manual task timeouts on IRC joins. 3.x will also have a complete token handler, oauth server built in for various web adapters, and much more. This will (almost definitely) not be an issue going forward. Twitch is severely limiting IRC connections soon, in an attempt to phase it out. |
Sure. It's up on GCP on the us-east1-b zone.
…On Tue, Mar 19, 2024 at 6:32 AM Liam Kelly ***@***.***> wrote:
@returnDanilo <https://github.com/returnDanilo> @Eclip5eLP
<https://github.com/Eclip5eLP>
May I ask where you are hosting your bot server?
—
Reply to this email directly, view it on GitHub
<#438 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AMCBEFNEY2I2VDSHI762EWDYZAA2FAVCNFSM6AAAAABBNENOJWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMBWGUYDCOBWHA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Until a stable release of 3.x is out this is my attempt to handle the token refreshing. I call
|
Sometimes, with no apparent reason, my server stops working with the following errors:
The websocket error line repeats many more times, but not the exception errors.
I've encountered this issue a few times. Usually it doesn't take 24 hours after the server is restarted until I see the error messages again.
I'm using twichio 2.8.2 installed from pypi.
The text was updated successfully, but these errors were encountered: