Discord.JS | Error: socket hang up

#1
(node:1452) UnhandledPromiseRejectionWarning: Error: socket hang up
at TLSSocket.onHangUp (_tls_wrap.js:1148:19)
at Object.onceWrapper (events.js:313:30)
at emitNone (events.js:111:20)
at TLSSocket.emit (events.js:208:7)
at endReadableNT (_stream_readable.js:1064:12)
at _combinedTickCallback (internal/process/next_tick.js:139:11)
at process._tickCallback (internal/process/next_tick.js:181:9)

I get a this error in my project. Can you please fix this?
My project name: rtdbot

1 Like

#2

Hey,

This error could be caused by some things, mostly by a poor connection, and this is a very rare error that would happen on glitch, but it can happen to anyone as websocket aren’t the best with steady connections.

1 Like

#3

@cori Can you renew my Glitch IP? Sometimes I am getting connection problems and my Discord bot has high ping

1 Like

#4

It could be an issue on Discord’s side, otherwise something in your code has forced the TCP Socket to perform a hookup.

If your ping is high, it could be because Glitch projects are hosted in the us-east AWS region.

Edit: Updated the AWS region as I typed the wrong one.

0 Likes

#5

Hey @RaknaX, I did look at our hosts when you posted this and we didn’t have any hosts banned at that time. Simply changing the server your project is running on is unlikely to resolve the issue; as @xXProGamerXx points out all of our servers are hosted in US AWS regions (they’re actually all in one of the us-east regions), so if you’re seeing connection problems it could be related to network issues between you (or your Discord server) and your project’s host.

0 Likes