Error - Opening handshake timed out

My bot was running okay locally until recently it sometimes raises the timed out error when I tried re-running the code. The error goes like this:
.../node_modules/ws/lib/websocket.js:856
abortHandshake(websocket, req, 'Opening handshake has timed out');
^

Error: Opening handshake has timed out
.../node_modules/ws/lib/websocket.js:856
abortHandshake(websocket, req, 'Opening handshake has timed out');
^

Error: Opening handshake has timed out
Sometimes all I need to do is just restart (re-running the command) several times until it works normal again. Why does this happen and how I can fix it?
2 Replies
d.js toolkit
d.js toolkit10mo ago
- What's your exact discord.js npm list discord.js and node node -v version? - Not a discord.js issue? Check out #other-js-ts. - Consider reading #how-to-get-help to improve your question! - Explain what exactly your issue is. - Post the full error stack trace, not just the top part! - Show your code! - Issue solved? Press the button!
rubii
rubiiOP10mo ago
I don't know why but I keep on getting this error very frequently, and I don't even touch any files related to network stuffs. Is there something I could possibly do on this...? Then does that mean there is some problem with my local host?
Want results from more Discord servers?
Add your server