pedroslopez / whatsapp-web.js

A WhatsApp client library for NodeJS that connects through the WhatsApp Web browser app
https://wwebjs.dev
Apache License 2.0
14.95k stars 3.55k forks source link

Puppeteer Error: Promise was Collected #2560

Closed jpdev01 closed 10 months ago

jpdev01 commented 10 months ago

Is there an existing issue for this?

Describe the bug

Very random and rare. Out of over 20 requests, we have 1 of these failures. It usually happens when the client has been connected for a few minutes/hours, as a result, no more messages are sent.

Promise was collected
2023-10-05T19:03:00:     at /home/ubuntu/wpp-bot/node_modules/puppeteer/lib/cjs/puppeteer/common/Connection.js:230:24
2023-10-05T19:03:00:     at new Promise (<anonymous>)
2023-10-05T19:03:00:     at CDPSession.send (/home/ubuntu/wpp-bot/node_modules/puppeteer/lib/cjs/puppeteer/common/Connection.js:226:16)
2023-10-05T19:03:00:     at ExecutionContext._evaluateInternal (/home/ubuntu/wpp-bot/node_modules/puppeteer/lib/cjs/puppeteer/common/ExecutionContext.js:204:50)
2023-10-05T19:03:00:     at ExecutionContext.evaluate (/home/ubuntu/wpp-bot/node_modules/puppeteer/lib/cjs/puppeteer/common/ExecutionContext.js:110:27)
2023-10-05T19:03:00:     at DOMWorld.evaluate (/home/ubuntu/wpp-bot/node_modules/puppeteer/lib/cjs/puppeteer/common/DOMWorld.js:97:24)
2023-10-05T19:03:00:     at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {

image

Expected behavior

I hope it doesn't drop or find a solution to prevent it from happening.

Steps to Reproduce the Bug or Issue

Very random and rare.

Relevant Code

No response

Browser Type

Chromium

WhatsApp Account Type

WhatsApp Business

Does your WhatsApp account have multidevice enabled?

Yes, I am using Multi Device

Environment

Ubuntu 20.04 WhatsApp Web version v1.22.1 Node 18.7.1

Additional context

No response

gjuarezcba commented 10 months ago

Same issue

Elyasir commented 10 months ago

Fix https://github.com/pedroslopez/whatsapp-web.js/issues/2510#issuecomment-1741576466

jpdev01 commented 10 months ago

@Elyasir @Sansekai Do you not have an interest in adding it to the official repository?

Psc. @shirser121

jpdev01 commented 10 months ago

Fix https://github.com/pedroslopez/whatsapp-web.js/pull/2563