wppconnect-server icon indicating copy to clipboard operation
wppconnect-server copied to clipboard

Random browserClose after unspecified amount of time

Open netomarchiori opened this issue 1 year ago • 2 comments

Description

Randomly

Environment

  • Wppconnect-server version(s): 2.4.0
  • Browser: Chromium 1:85.0.4183.83-0ubuntu0.20.04.3
  • OS: Ubuntu 20
  • Node version: 18.17.1
  • WhatsApp version: 2.2404.x
  • MultiDevice (BETA): yes/no (unsure on how/where to check)

Steps to Reproduce

  1. Clean git pull
  2. Set the configs, added "'--disable-features=LeakyPeeker'" to the browserArgs array
  3. build with npm run build
  4. Schedule to run with pm2

After a random amount of time (sometimes 30min, sometime a couple of hours), all I get is "Page Closed" followed by browserClose. And wppconnect-server stops working

Log Output

36mverbose[39m:  [main:page] Page Closed
[32minfo[39m: 2024-01-29T09:00:07.027Z browserClose


[31merror[39m: 2024-01-29T11:15:16.581Z Requesting main frame too early! - Error: Requesting main frame too early!
    at assert (/home/marchiori/wppconnect-server/node_modules/puppeteer-core/src/util/assert.ts:19:11)
    at FrameManager.mainFrame (/home/marchiori/wppconnect-server/node_modules/puppeteer-core/src/cdp/FrameManager.ts:261:11)
    at CdpPage.mainFrame (/home/marchiori/wppconnect-server/node_modules/puppeteer-core/src/cdp/Page.ts:481:31)
    at CdpPage.evaluate (/home/marchiori/wppconnect-server/node_modules/puppeteer-core/src/api/Page.ts:2106:23)
    at /home/marchiori/wppconnect-server/node_modules/@wppconnect-team/wppconnect/dist/api/helpers/evaluate-and-return.js:99:56
    at step (/home/marchiori/wppconnect-server/node_modules/@wppconnect-team/wppconnect/dist/api/helpers/evaluate-and-return.js:49:23)
    at Object.next (/home/marchiori/wppconnect-server/node_modules/@wppconnect-team/wppconnect/dist/api/helpers/evaluate-and-return.js:30:53)
    at /home/marchiori/wppconnect-server/node_modules/@wppconnect-team/wppconnect/dist/api/helpers/evaluate-and-return.js:24:71
    at new Promise (<anonymous>)
    at __awaiter (/home/marchiori/wppconnect-server/node_modules/@wppconnect-team/wppconnect/dist/api/helpers/evaluate-and-return.js:20:12)
    at evaluateAndReturn (/home/marchiori/wppconnect-server/node_modules/@wppconnect-team/wppconnect/dist/api/helpers/evaluate-and-return.js:71:12)
    at Whatsapp.<anonymous> (/home/marchiori/wppconnect-server/node_modules/@wppconnect-team/wppconnect/dist/api/layers/host.layer.js:594:82)
    at step (/home/marchiori/wppconnect-server/node_modules/@wppconnect-team/wppconnect/dist/api/layers/host.layer.js:60:23)
    at Object.next (/home/marchiori/wppconnect-server/node_modules/@wppconnect-team/wppconnect/dist/api/layers/host.layer.js:41:53)
    at /home/marchiori/wppconnect-server/node_modules/@wppconnect-team/wppconnect/dist/api/layers/host.layer.js:35:71
    at new Promise (<anonymous>)
    at __awaiter (/home/marchiori/wppconnect-server/node_modules/@wppconnect-team/wppconnect/dist/api/layers/host.layer.js:31:12)
    at Whatsapp.isConnected (/home/marchiori/wppconnect-server/node_modules/@wppconnect-team/wppconnect/dist/api/layers/host.layer.js:591:16)
    at statusConnection (/home/marchiori/wppconnect-server/src/middleware/statusConnection.ts:29:24)
    at Layer.handle [as handle_request] (/home/marchiori/wppconnect-server/node_modules/express/lib/router/layer.js:95:5)
    at next (/home/marchiori/wppconnect-server/node_modules/express/lib/router/route.js:144:13)
    at /home/marchiori/wppconnect-server/src/middleware/auth.ts:75:11

netomarchiori avatar Jan 29 '24 12:01 netomarchiori

how can I help with triage?

netomarchiori avatar Feb 01 '24 17:02 netomarchiori

I have the same error, could you fix it?

leonardols10 avatar Apr 01 '24 12:04 leonardols10

Please, update the project, i try fixed this increasing the timeout.

icleitoncosta avatar Jun 10 '24 02:06 icleitoncosta