client.login stopped working out of nowhere, can't start the bot

Nothing changed in code, the container was just sitting there. Out of nowhere, the bot stopped responding to events so I hopped on to check what's going on Stopped and tried to restart the bot and it gave this error code:
node:internal/process/promises:391
triggerUncaughtException(err, true /* fromPromise */);
^

Error: read ECONNRESET
at TLSWrap.onStreamRead (node:internal/stream_base_commons:218:20) {
errno: -104,
code: 'ECONNRESET',
syscall: 'read'
}

Node.js v20.17.0
node:internal/process/promises:391
triggerUncaughtException(err, true /* fromPromise */);
^

Error: read ECONNRESET
at TLSWrap.onStreamRead (node:internal/stream_base_commons:218:20) {
errno: -104,
code: 'ECONNRESET',
syscall: 'read'
}

Node.js v20.17.0
nothing changed in the code. so I tried debugging it, it crashes at client.login() and before calling client.on('ready',()=>{}) tried pnpm up and updated to the last discord.js version (14.16.3), same error.
4 Replies
d.js toolkit
d.js toolkit3mo 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! - Marked as resolved by OP
okunamayanad
okunamayanadOP3mo ago
pnpm list discord.js:
dependencies:
discord.js 14.16.3
dependencies:
discord.js 14.16.3
node -v:
v20.17.0
v20.17.0
container has internet access, dns is working fine
d.js docs
d.js docs3mo ago
Errors such as ECONNRESET, ConnectTimeoutError, SocketError: other side closed indicate a network issue * Free or shared hosting providers often come with significant limitations * Another indication of these issues are 'Unknown Interaction' errors.
okunamayanad
okunamayanadOP3mo ago
it was about Turkey banning Discord. my cloud computing provider decided to apply those rules on their network over night so the bot lost access to Discord servers

Did you find this page helpful?