WhiskeySockets / Baileys

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

Crash while QR code are scannning #1058

Open priyanshuChovatiya opened 1 month ago

priyanshuChovatiya commented 1 month ago

node:events:497 throw er; // Unhandled 'error' event ^

Error: WebSocket was closed before the connection was established at WebSocket.close (C:\Users\Admin\Desktop\Javascript\nodeJS\node_modules\ws\lib\websocket.js:299:7) at WebSocketClient.close (C:\Users\Admin\Desktop\Javascript\nodeJS\node_modules\baileys\lib\Socket\Client\web-socket-client.js:53:21)
at Object.end (C:\Users\Admin\Desktop\Javascript\nodeJS\node_modules\baileys\lib\Socket\socket.js:263:20) at EventEmitter. (file:///C:/Users/Admin/Desktop/Javascript/nodeJS/src/controller/whatApp.controller.js:96:39) Emitted 'error' event on WebSocketClient instance at: at WebSocket. (C:\Users\Admin\Desktop\Javascript\nodeJS\node_modules\baileys\lib\Socket\Client\web-socket-client.js:46:100)
at WebSocket.emit (node:events:519:28) at emitErrorAndClose (C:\Users\Admin\Desktop\Javascript\nodeJS\node_modules\ws\lib\websocket.js:1041:13) at process.processTicksAndRejections (node:internal/process/task_queues:82:21)|

node:internal/process/promises:289
        triggerUncaughtException(err, true /* fromPromise */);
        ^

[UnhandledPromiseRejection: This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason "1006".] { code: 'ERR_UNHANDLED_REJECTION' }

Bug are node app crash while  the QR code are scanned.  if any one can help me to solve this. 
AnandPatel404 commented 1 month ago

can you give me a piece of code that you write

priyanshuChovatiya commented 1 month ago

can you give me a piece of code that you write

Yes why not. Can you have same problem..?

spacesoft321 commented 1 month ago

Try it , its working 101% , without any error

_WhatsApp API demo account__

https://int.chatway.in/login

Username: SAMDEMO

password: SAMDEMO

Zain-ul-din commented 1 month ago

@spacesoft321 is it free?

spacesoft321 commented 1 month ago

its not free , but he using same code for whatsapp api , he can send per day more than 500 marketing message on whatsapp , i dont know how its possible but his developer is good