waha icon indicating copy to clipboard operation
waha copied to clipboard

[WEBJS] - Auto Logout after few Second

Open MiwiDots opened this issue 1 year ago • 5 comments

Describe the bug

After a few secound we are getting auto logout.

{
  "statusCode": 500,
  "timestamp": "2025-09-25T07:23:32.637Z",
  "exception": {
    "message": "Protocol error (Page.captureScreenshot): Session closed. Most likely the page has been closed.",
    "name": "TargetCloseError",
    "stack": "TargetCloseError: Protocol error (Page.captureScreenshot): Session closed. Most likely the page has been closed.\n    at CdpCDPSession.send (/app/node_modules/puppeteer-core/lib/cjs/puppeteer/cdp/CdpSession.js:71:35)\n    at CdpPage._screenshot (/app/node_modules/puppeteer-core/lib/cjs/puppeteer/cdp/Page.js:773:62)\n    at CdpPage.screenshot (/app/node_modules/puppeteer-core/lib/cjs/puppeteer/api/Page.js:1075:41)\n    at async CdpPage.<anonymous> (/app/node_modules/puppeteer-core/lib/cjs/puppeteer/util/decorators.js:172:24)\n    at async WPage.screenshot (/app/dist/core/engines/webjs/WPage.js:22:20)\n    at async WhatsappSessionWebJSPlus.getScreenshot (/app/dist/core/engines/webjs/session.webjs.core.js:357:28)\n    at async ScreenshotController.screenshot (/app/dist/api/screenshot.controller.js:29:16)"
  },
  "request": {
    "path": "/api/screenshot?session=zdZ",
    "method": "GET",
    "query": {
      "session": "zdZ"
    }
  },
  "version": {
    "version": "2025.9.5",
    "engine": "WEBJS",
    "tier": "PLUS",
    "browser": "/usr/bin/chromium"
  }
}

Docker version 28.3.2, build 578ccf607d

Version

Get the WAHA version by calling GET /api/version

  "version": {
    "version": "2025.9.5",
    "engine": "WEBJS",
    "tier": "PLUS",
    "browser": "/usr/bin/chromium"
  }

Steps

To Reproduce Steps to reproduce the behavior: just start docker with

docker run -d \
    --restart unless-stopped \
    --platform linux/amd64 \
    --name waha_XXXXXXX\
    -p 4000:4000 \
    -v waha_sessions_XXXX:/tmp/waha-sessions-XXXXX\
    -e WHATSAPP_API_PORT=4000 \
    -e WAHA_API_KEY=[api_key] \
    -e WAHA_DASHBOARD_API_KEY=[api_key] \
    -e WAHA_DASHBOARD_ENABLED=true \
    -e WAHA_DASHBOARD_USERNAME=admin \
    -e WAHA_DASHBOARD_PASSWORD=xxxxxx \
    -e WHATSAPP_RESTART_ALL_SESSIONS=True \
    -e WAHA_WORKER_RESTART_SESSIONS=True \
    -e WAHA_LOCAL_STORE_BASE_DIR=/tmp/waha-sessions-XXXXXX devlikeapro/waha-plus

Not sure what else i miss here :) any help much appricated.

patron:PLUS

MiwiDots avatar Sep 25 '25 07:09 MiwiDots

likely related https://github.com/devlikeapro/waha/issues/1386

meanwhile try another engine

WHATSAPP_DEFAULT_ENGINE=GOWS

https://waha.devlike.pro/docs/how-to/engines/#gows

patron:PRO

devlikepro avatar Sep 25 '25 07:09 devlikepro

Do you have 2CPU and 4GB available on the server? https://waha.devlike.pro/docs/overview/faq/#system-requirements

patron:PRO

devlikepro avatar Sep 25 '25 07:09 devlikepro

yes is a 48 core system with 128GB ram

patron:PLUS

MiwiDots avatar Sep 25 '25 07:09 MiwiDots

quick update, GOWS seems to work fine.

patron:PLUS

MiwiDots avatar Oct 03 '25 02:10 MiwiDots

2025.9.8 - WEBJS - up engine - #1276 , #1407

patron:PRO

devlikepro avatar Oct 04 '25 10:10 devlikepro