pranavms13 / whatsapp-node-api

A Simple NodeJS API Wrapper for WhatsApp
Other
471 stars 184 forks source link

Qr Link GEt Disconnected after node-whatsapp-api crash #50

Open achalag1 opened 2 years ago

achalag1 commented 2 years ago

npm ERR! whatsapp-node-api@0.0.3 start: node api.js npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the whatsapp-node-api@0.0.3 start script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in: npm ERR! /root/.npm/_logs/2021-12-30T06_41_42_201Z-debug.log

events.js:174 2|whatsapp | throw er; // Unhandled 'error' event 2|whatsapp | ^ 2|whatsapp | Error: socket hang up 2|whatsapp | at createHangUpError (_http_client.js:332:15) 2|whatsapp | at Socket.socketOnEnd (_http_client.js:435:23) 2|whatsapp | at Socket.emit (events.js:203:15) 2|whatsapp | at endReadableNT (_stream_readable.js:1145:12) 2|whatsapp | at process._tickCallback (internal/process/next_tick.js:63:19) 2|whatsapp | Emitted 'error' event at: 2|whatsapp | at Socket.socketOnEnd (_http_client.js:435:9) 2|whatsapp | at Socket.emit (events.js:203:15) 2|whatsapp | at endReadableNT (_stream_readable.js:1145:12) 2|whatsapp | at process._tickCallback (internal/process/next_tick.js:63:19)

achalag1 commented 2 years ago

lastqr/61b0428a7d73d80bba8c248clast.qr generated (node:322319) UnhandledPromiseRejectionWarning: Error: Evaluation failed: TypeError: Cannot read properties of undefined (reading 'sendSeen') at puppeteer_evaluation_script:6:31 at ExecutionContext._evaluateInternal (/var/www/html/WhatsappCode/node_modules/whatsapp-web.js/node_modules/puppeteer/lib/cjs/puppeteer/common/ExecutionContext.js:221:19) at process._tickCallback (internal/process/next_tick.js:68:7) (node:322319) UnhandledPromiseRejectionWarning: Unhandled promise rejection. 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(). (rejection id: 2)

achalag1 commented 2 years ago

1|whatsapp | /var/www/html/WhatsappCode/node_modules/puppeteer/lib/cjs/puppeteer/common/DOMWorld.js:513 1|whatsapp | const timeoutError = new Errors_js_1.TimeoutError(waiting for ${options.title} failed: timeout ${options.timeout}ms exceeded); 1|whatsapp | ^ 1|whatsapp | TimeoutError: waiting for selector canvas failed: timeout 45000ms exceeded 1|whatsapp | at new WaitTask (/var/www/html/WhatsappCode/node_modules/puppeteer/lib/cjs/puppeteer/common/DOMWorld.js:513:34) 1|whatsapp | at DOMWorld.waitForSelectorInPage (/var/www/html/WhatsappCode/node_modules/puppeteer/lib/cjs/puppeteer/common/DOMWorld.js:424:26) 1|whatsapp | at Object.internalHandler.waitFor (/var/www/html/WhatsappCode/node_modules/puppeteer/lib/cjs/puppeteer/common/QueryHandler.js:31:77) 1|whatsapp | at DOMWorld.waitForSelector (/var/www/html/WhatsappCode/node_modules/puppeteer/lib/cjs/puppeteer/common/DOMWorld.js:317:29) 1|whatsapp | at Frame.waitForSelector (/var/www/html/WhatsappCode/node_modules/puppeteer/lib/cjs/puppeteer/common/FrameManager.js:841:51) 1|whatsapp | at Page.waitForSelector (/var/www/html/WhatsappCode/node_modules/puppeteer/lib/cjs/puppeteer/common/Page.js:2313:33) 1|whatsapp | at Timeout.getQrCode (/var/www/html/WhatsappCode/node_modules/whatsapp-web.js/src/Client.js:147:28) 1|whatsapp | at processTicksAndRejections (node:internal/process/task_queues:96:5)

achalag1 commented 2 years ago

Please Help Me With below issue. whatsapp-node-api@0.0.3 Restarts and QR Code Link Gets Disconnected

AUTH! GET : /auth/checkclientstatus/61b0428a7d73d80bba8c248c POST : /chatting/sendmessage /sendmessage =>61b0428a7d73d80bba8c248c /var/www/html/WhatsappCode/node_modules/puppeteer/lib/cjs/puppeteer/common/ExecutionContext.js:221 throw new Error('Evaluation failed: ' + helper_js_1.helper.getExceptionMessage(exceptionDetails)); ^

Error: Evaluation failed: TypeError: Cannot read properties of undefined (reading 'sendSeen') at puppeteer_evaluation_script:6:31 at ExecutionContext._evaluateInternal (/var/www/html/WhatsappCode/node_modules/puppeteer/lib/cjs/puppeteer/common/ExecutionContext.js:221:19) at runMicrotasks () at processTicksAndRejections (node:internal/process/task_queues:96:5) at async ExecutionContext.evaluate (/var/www/html/WhatsappCode/node_modules/puppeteer/lib/cjs/puppeteer/common/ExecutionContext.js:110:16) at async Client.sendMessage (/var/www/html/WhatsappCode/node_modules/whatsapp-web.js/src/Client.js:560:28)

whatsapp-node-api@0.0.3 start node api.js Server Running Live on Port : 5000 GET : /client/addClient/60 GET : /client/addClient/60 GET : /client/addClient/60 GET : /client/addClient/60 GET : /client/addClient/6100014 GET : /client/addClient/6103 GET : /client/addClient/6113 GET : /client/addClient/6114 GET : /client/addClient/6114 GET : /client/addClient/6119 GET : /client/addClient/6120 GET : /client/addClient/6125 GET : /client/addClient/6181350 GET : /client/addClient/619743 GET : /client/addClient/619 GET : /client/addClient/61 GET : /client/addClient/61 GET : /client/addClient/61 GET : /client/addClient/61 GET : /client/addClient/61 GET : /client/addClient/61 GET : /client/addClient/61 GET : /client/addClient/61 GET : /client/addClient/61 (node:2769402) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 exit listeners added to [process]. Use emitter.setMaxListeners() to increase limit (Use node --trace-warnings ... to show where the warning was created) (node:2769402) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 SIGINT listeners added to [process]. Use emitter.setMaxListeners() to increase limit (node:2769402) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 SIGTERM listeners added to [process]. Use emitter.setMaxListeners() to increase limit (node:2769402) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 SIGHUP listeners added to [process]. Use emitter.setMaxListeners() to increase limit GET : /client/addclient/61b0428a7d73d80bba8c248c