WhiskeySockets / Baileys

Lightweight full-featured typescript/javascript WhatsApp Web API
https://baileys.whiskeysockets.io/
MIT License
3.64k stars 1.23k forks source link

[BUG] Connection Closed #981

Open DannOfficial opened 4 weeks ago

DannOfficial commented 4 weeks ago

[STATUS] >> Starting... -- Version 2,2413,1, isLatest: true -- [ERROR] >> Error [ERR_USE_AFTER_CLOSE]: readline was closed at [kQuestion] (node:internal/readline/interface:397:13) at Interface.question (node:readline:158:20) at /data/data/com.termux/files/home/dan/index.js:39:58 at new Promise () at question (/data/data/com.termux/files/home/dan/index.js:39:30) at danzy (/data/data/com.termux/files/home/dan/index.js:325:31) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) { code: 'ERR_USE_AFTER_CLOSE' } /data/data/com.termux/files/home/dan/node_modules/@whiskeysockets/baileys/lib/Socket/socket.js:59 throw new boom_1.Boom('Connection Closed', { statusCode: Types_1.DisconnectReason.connectionClosed }); ^

Error: Connection Closed at sendRawMessage (/data/data/com.termux/files/home/dan/node_modules/@whiskeysockets/baileys/lib/Socket/socket.js:59:19) at sendNode (/data/data/com.termux/files/home/dan/node_modules/@whiskeysockets/baileys/lib/Socket/socket.js:78:16) at Object.requestPairingCode (/data/data/com.termux/files/home/dan/node_modules/@whiskeysockets/baileys/lib/Socket/socket.js:375:15) at async Timeout._onTimeout (/data/data/com.termux/files/home/dan/index.js:331:22) { data: null, isBoom: true, isServer: false, output: { statusCode: 428, payload: { statusCode: 428, error: 'Precondition Required', message: 'Connection Closed' }, headers: {} } }

Node.js v22.5.1

SACHIBOT commented 3 weeks ago

I'm facing this issue today as well

DineshValor commented 2 weeks ago

How to fix it?

Same issue here too