pranavms13 / whatsapp-node-api

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

POST send message crash after few hours #46

Open nero08 opened 2 years ago

nero08 commented 2 years ago

Hello,

I have this log message after few hours when message try to be send.

POST : /chat/sendmessage/XXXXXXXXX (node:20153) UnhandledPromiseRejectionWarning: Error: Protocol error (Runtime.callFunctionOn): Session closed. Most likely the page has been closed. at CDPSession.send (/var/www/vhosts/xxxxxxx.ovh/whatsappapi/whatsapp-node-api/node_modules/puppeteer/lib/cjs/puppeteer/common/Connection.js:208:35) at ExecutionContext._evaluateInternal (/var/www/vhosts/xxxxxxx.ovh/whatsappapi/whatsapp-node-api/node_modules/puppeteer/lib/cjs/puppeteer/common/ExecutionContext.js:204:50) at ExecutionContext.evaluate (/var/www/vhosts/xxxxxxx.ovh/whatsappapi/whatsapp-node-api/node_modules/puppeteer/lib/cjs/puppeteer/common/ExecutionContext.js:110:27) at DOMWorld.evaluate (/var/www/vhosts/xxxxxxx.ovh/whatsappapi/whatsapp-node-api/node_modules/puppeteer/lib/cjs/puppeteer/common/DOMWorld.js:91:24) at processTicksAndRejections (internal/process/task_queues.js:97:5) (node:20153) 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(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 933)

nanoeray commented 2 years ago

same issue, i think whatsapp web updated their structure.

nanoeray commented 2 years ago

fixed by updating whatsapp-web.js version 1.11.x to 1.15.1