canove / whaticket-community

A very simple Ticket System based on WhatsApp messages, that allow multi-users in same WhatsApp account.
MIT License
1.61k stars 808 forks source link

Error when trying to disconnect from whatsapp #569

Open allgood opened 1 year ago

allgood commented 1 year ago

When click the "DISCONNECT" on Connections page, it doesn't disconnect from whatsapp and on the logs the following error appears:

 (node:24) UnhandledPromiseRejectionWarning: Error: Protocol error (Runtime.callFunctionOn): Session closed. Most likely the page has been closed.
     at CDPSession.send (/usr/src/app/node_modules/puppeteer/lib/cjs/puppeteer/common/Connection.js:218:35)
     at ExecutionContext._evaluateInternal (/usr/src/app/node_modules/puppeteer/lib/cjs/puppeteer/common/ExecutionContext.js:204:50)
     at ExecutionContext.evaluate (/usr/src/app/node_modules/puppeteer/lib/cjs/puppeteer/common/ExecutionContext.js:110:27)
     at DOMWorld.evaluate (/usr/src/app/node_modules/puppeteer/lib/cjs/puppeteer/common/DOMWorld.js:97:24)
 (node:24) 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: 4)

The only way I found to remove a connection was revoking it from the whatsapp mobile app and then stopping and restarting the backend.

N0N4M3BNS commented 1 year ago

@allgood Hav any idea for the bug?

JoseMariani commented 11 months ago

Esto puede ser causado por que la propiedad del timeout del socket debe ser establecida a un numero mayor.. y así se puede evitar. También he agregado unos botones y otros cambios al frontend para que se pueda reiniciar desde allí, cualquier ### información contácteme.

N0N4M3BNS commented 8 months ago

This can be caused by the fact that the socket timeout property must be set to a higher number. And so it can be avoided. I've also added a few buttons and other changes to the frontend so that it can be restarted from there, any ### information contact me.

@JoseMariani How to contact you, can you explain here.

stale[bot] commented 6 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.