Skip to content

TMI.JS Disconnecting. #217

Closed
Closed
@ghost

Description

Hello. I have been experiencing a strange bug with TMI.JS recently.

This issue has occurred across two different scripts, with two different accounts, on two different computers.

TMI.JS has been disconnecting for strange reasons (never in my scripts do I manually disconnect), and because of this it is causing it to constantly disconnect and reconnect which both causes issues in the fact that it keeps triggering certain events like on host and such, but obviously sudden disconnects makes it hard to have predictable bot performance.

About a week ago, I experienced this type of disconnect twice.
After any number of

Twitch Client disconnected!! (a message that is console.errored on the on disconnect event)
[18:49] error: Could not connect to server. Reconnecting in 2 seconds..

Also, later on it also posted
[18:49] error: Ping timeout.

and it eventually crashes.
C:\JSBot\node_modules\ws\lib\WebSocket.js:218
else throw new Error('not opened');
^

Error: not opened
at WebSocket.send (C:\JSBot\node_modules\ws\lib\WebSocket.js:218:16)
at client.handleMessage (C:\JSBot\node_modules\tmi.js\lib\client.js:105:33)
at parts.forEach (C:\JSBot\node_modules\tmi.js\lib\client.js:906:36)
at Array.forEach (native)
at client._onMessage (C:\JSBot\node_modules\tmi.js\lib\client.js:905:11)
at WebSocket.onMessage (C:\JSBot\node_modules\ws\lib\WebSocket.js:418:14)
at emitTwo (events.js:106:13)
at WebSocket.emit (events.js:194:7)
at Receiver.ontext (C:\JSBot\node_modules\ws\lib\WebSocket.js:816:10)
at C:\JSBot\node_modules\ws\lib\Receiver.js:477:18

More recently, I have been experiencing more generic disconnects, the on disconnect reason just states a generic disconnect message.

I need to figure out what is causing this issue and resolve it as quickly as possible.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions