WhiskeySockets / Baileys

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

[BUG] Error after QR code scan #1014

Closed DineshValor closed 2 weeks ago

DineshValor commented 2 weeks ago

Screenshot_20240824-212349


{"level":30,"time":"2024-08-24T15:58:23.575Z","pid":16583,"hostname":"localhost","class":"baileys","me":{"id":"919354883473:8@s.whatsapp.net"},"platform":"android","msg":"pairing configured successfully, expect to restart the connection..."}
{ isNewLogin: true, qr: undefined }
{"level":50,"time":"2024-08-24T15:58:24.186Z","pid":16583,"hostname":"localhost","class":"baileys","node":{"tag":"stream:error","attrs":{"code":"515"}},"msg":"stream errored out"}
{"level":30,"time":"2024-08-24T15:58:24.187Z","pid":16583,"hostname":"localhost","class":"baileys","trace":"Error: Stream Errored (restart required)\n    at WebSocketClient.<anonymous> (/data/data/com.termux/files/home/valor/node_modules/@whiskeysockets/baileys/lib/Socket/socket.js:524:13)\n    at WebSocketClient.emit (node:events:520:28)\n    at /data/data/com.termux/files/home/valor/node_modules/@whiskeysockets/baileys/lib/Socket/socket.js:241:35\n    at Object.decodeFrame (/data/data/com.termux/files/home/valor/node_modules/@whiskeysockets/baileys/lib/Utils/noise-handler.js:149:17)\n    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)","msg":"connection errored"}
{
  connection: 'close',
  lastDisconnect: {
    error: Error: Stream Errored (restart required)
        at WebSocketClient.<anonymous> (/data/data/com.termux/files/home/valor/node_modules/@whiskeysockets/baileys/lib/Socket/socket.js:524:13)
        at WebSocketClient.emit (node:events:520:28)
        at /data/data/com.termux/files/home/valor/node_modules/@whiskeysockets/baileys/lib/Socket/socket.js:241:35
        at Object.decodeFrame (/data/data/com.termux/files/home/valor/node_modules/@whiskeysockets/baileys/lib/Utils/noise-handler.js:149:17)
        at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
      data: [Object],
      isBoom: true,
      isServer: true,
      output: [Object]
    },
    date: 2024-08-24T15:58:24.189Z
  }
}
DineshValor commented 2 weeks ago

Anyone have idea how to solve this?

mohamed-2010 commented 2 weeks ago

Try to add version to your whatsapp config option

version: [2, 3000, 1015901307],

It will work

DineshValor commented 2 weeks ago

Try to add version to your whatsapp config option

version: [2, 3000, 1015901307],

It will work

Let me try buddy...

I'm working on this WhatsApp Bot.

2 year back closed project, thinking to restart it but cames lot of error, almost fixed every error except this one.

DineshValor commented 2 weeks ago

Try to add version to your whatsapp config option

version: [2, 3000, 1015901307],

It will work

Need to made changes here? https://github.com/DineshValor/valor/blob/2bd43d2cf2c75d1023ab4d94af911a13b9a8ce53/lib/connection.js#L43

I searched full script, didn't found, where to add version in itM

adrielgro commented 2 weeks ago

Hi, same error. version not work for me...

this.socket = makeWASocket({
      auth: state,
      printQRInTerminal: true,
      browser: Browsers.macOS('Desktop'),
      version: [2, 3000, 1015901307],
    });
DineshValor commented 2 weeks ago

Hi, same error. version not work for me...

this.socket = makeWASocket({
      auth: state,
      printQRInTerminal: true,
      browser: Browsers.macOS('Desktop'),
      version: [2, 3000, 1015901307],
    });

Thanx, will try this soon.

DineshValor commented 2 weeks ago

@SheIITear bro problem didn't solved, why closed ? Sorry about new one, thats one just created by mistake coz opened multiple tabs and searching for solution everywhere and in confuse same issue posted here, i was posted that somewhere else.

SheIITear commented 2 weeks ago

@SheIITear bro problem didn't solved, why closed ? Sorry about new one, thats one just created by mistake coz opened multiple tabs and searching for solution everywhere and in confuse same issue posted here, i was posted that somewhere else.

Because 2 year back closed project, thinking to restart it but cames lot of error. This is not a baileys bug as you get errors by running a very outdated version. If the bug exists on newest version of baileys from github, hmu and I will reopen this issue.