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

Uncaught exception killing NodeRed entirely #15

Open
Aterfax opened this issue Jul 24, 2020 · 2 comments
Open

Uncaught exception killing NodeRed entirely #15

Aterfax opened this issue Jul 24, 2020 · 2 comments

Comments

@Aterfax
Copy link

Aterfax commented Jul 24, 2020

Seeing an uncaught exception which kills node-red outright:

message: 'Client network socket disconnected before secure TLS connection was established',

The exception probably just needs catching.

Relevant log output:

    24 Jul 16:11:11 - Error [ERR_UNHANDLED_ERROR]: Unhandled error. (ErrorEvent {
    target: WebSocket {
    _events: [Object: null prototype] {
    message: [Function],
    open: [Function],
    error: [Function],
    close: [Function]
    },
    _eventsCount: 4,
    _maxListeners: undefined,
    readyState: 2,
    protocol: '',
    _binaryType: 'nodebuffer',
    _closeFrameReceived: false,
    _closeFrameSent: false,
    _closeMessage: '',
    _closeTimer: null,
    _closeCode: 1006,
    _extensions: {},
    _receiver: null,
    _sender: null,
    _socket: null,
    _isServer: false,
    _redirects: 0,
    url: 'wss://gateway.discord.gg/?v=6&encoding=json',
    _req: null,
    [Symbol(kCapture)]: false
    },
    type: 'error',
    message: 'Client network socket disconnected before secure TLS connection was established',
    error: Error: Client network socket disconnected before secure TLS connection was established
    at connResetException (internal/errors.js:609:14)
    at TLSSocket.onConnectEnd (_tls_wrap.js:1547:19)
    at Object.onceWrapper (events.js:421:28)
    at TLSSocket.emit (events.js:327:22)
    at endReadableNT (_stream_readable.js:1221:12)
    at processTicksAndRejections (internal/process/task_queues.js:84:21) {
    code: 'ECONNRESET',
    path: undefined,
    host: 'gateway.discord.gg',
    port: 443,
    localAddress: undefined
    }
    })
    at Client.emit (events.js:304:17)
    at WebSocketConnection.onError (/data/node_modules/discord.js/src/client/websocket/WebSocketConnection.js:377:17)
    at WebSocket.onError (/data/node_modules/discord.js/node_modules/ws/lib/event-target.js:128:16)
    at WebSocket.emit (events.js:315:20)
    at ClientRequest.<anonymous> (/data/node_modules/discord.js/node_modules/ws/lib/websocket.js:568:15)
    at ClientRequest.emit (events.js:315:20)
    at TLSSocket.socketErrorListener (_http_client.js:426:9)
    at TLSSocket.emit (events.js:315:20)
    at emitErrorNT (internal/streams/destroy.js:92:8)
    at emitErrorAndCloseNT (internal/streams/destroy.js:60:3)
    at processTicksAndRejections (internal/process/task_queues.js:84:21)
    npm ERR! code ELIFECYCLE
    npm ERR! errno 1
    npm ERR! [email protected] start: `node $NODE_OPTIONS node_modules/node-red/red.js $FLOWS "--userDir" "/data"`
    npm ERR! Exit status 1

@madmax3365
Copy link
Owner

Hey @Aterfax , I know it's quite late for the response ))
Can you please provide some more details about this issue, if it's still relevant of course?

@Aterfax
Copy link
Author

Aterfax commented Feb 27, 2021

I haven't been using this for quite some time so I don't really have anything further to add I'm afraid. Replicating the error should be trivial - simply cut the connection to discord's servers and I think it will die taking the node-red instance with it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants