waha icon indicating copy to clipboard operation
waha copied to clipboard

[WEBJS] -

Open hugolimav8 opened this issue 9 months ago • 2 comments

Describe the bug

After updating WAHA to version 2026.2.2 (PLUS, WEBJS engine) and restarting the container, the session logs out immediately after starting.

The session is created successfully, webhook is configured correctly, but within seconds WAHA reports:

  • Session has been logged out! (LOGOUT)
  • Browser has been disconnected
  • Error: Attempted to use detached Frame

This happens consistently after restart.

The container is healthy, webhook returns 200, but the session does not stay connected.


Version

GET /api/version response:

{ "version": "2026.2.2", "engine": "WEBJS", "tier": "PLUS" }


Steps

To Reproduce

  1. Update WAHA image to 2026.2.2
  2. Restart container using docker-compose
  3. WAHA attempts to reuse existing session
  4. Session logs out immediately
  5. Detached Frame error appears in logs

Expected behavior

The session should reconnect and remain active after restart, without being logged out immediately.


Requests - Responses

POST /api/sessions → 201 POST /api/sessions/{sessionId}/start → 201 Webhook POST → 200 GET /api/sessions/{sessionId} → 200

After that:

WARN: Session has been logged out! (LOGOUT) ERROR: Attempted to use detached Frame


Docker Logs

Relevant logs:

Session has been logged out! {"args":"LOGOUT"} The browser has been disconnected Error: Attempted to use detached Frame at CdpFrame at puppeteer-core

shm_size: 2gb Running inside Docker Webhook configured to http://receiver:8081/webhook (returns 200)


Log webhook.log: "id": "evt_01kjedvp03np4kdh8594bp6ddh", "timestamp": 1772158310403, "event": "session.status", "session": "knxadlw7eiz3", "me": null, "payload": { "name": "knxadlw7eiz3", "status": "SCAN_QR_CODE", "statuses": [ { "status": "STARTING", "timestamp": 1772158300034 }, { "status": "SCAN_QR_CODE", "timestamp": 1772158310403 } ] }, "engine": "WEBJS", "environment": { "version": "2026.2.2", "engine": "WEBJS", "tier": "PLUS", "browser": "/usr/bin/chromium", "platform": "linux/x64", "worker": { "id": null } } }

[2026-02-26 23:11:50.416056] 🚫 Ignorado (mensagem automática/sistema) { "session": "knxadlw7eiz3" }

[2026-02-26 23:15:15.919366] 📥 Recebido no webhook { "id": "evt_01kjee1yp7rt0fqd9x9nxwqz8b", "timestamp": 1772158515911, "event": "session.status", "session": "knxadlw7eiz3", "me": null, "payload": { "name": "knxadlw7eiz3", "status": "SCAN_QR_CODE", "statuses": [ { "status": "STARTING", "timestamp": 1772158300034 }, { "status": "SCAN_QR_CODE", "timestamp": 1772158310403 }, { "status": "SCAN_QR_CODE", "timestamp": 1772158515911 } ] }, "engine": "WEBJS", "environment": { "version": "2026.2.2", "engine": "WEBJS", "tier": "PLUS", "browser": "/usr/bin/chromium", "platform": "linux/x64", "worker": { "id": null } } }

[2026-02-26 23:15:15.919762] 🚫 Ignorado (mensagem automática/sistema) { "session": "knxadlw7eiz3" }

[2026-02-26 23:15:16.429902] 📥 Recebido no webhook { "id": "evt_01kjee1z5a225s9089f7v9hrdm", "timestamp": 1772158516395, "event": "session.status", "session": "knxadlw7eiz3", "me": null, "payload": { "name": "knxadlw7eiz3", "status": "FAILED", "statuses": [ { "status": "SCAN_QR_CODE", "timestamp": 1772158310403 }, { "status": "SCAN_QR_CODE", "timestamp": 1772158515911 }, { "status": "FAILED", "timestamp": 1772158516394 } ] }, "engine": "WEBJS", "environment": { "version": "2026.2.2", "engine": "WEBJS", "tier": "PLUS", "browser": "/usr/bin/chromium", "platform": "linux/x64", "worker": { "id": null } } }

[2026-02-26 23:15:16.430146] 🚫 Ignorado (mensagem automática/sistema) { "session": "knxadlw7eiz3" }

[2026-02-26 23:15:16.432008] 📥 Recebido no webhook { "id": "evt_01kjee1z5f0bdg90d2d81jktxv", "timestamp": 1772158516399, "event": "session.status", "session": "knxadlw7eiz3", "me": null, "payload": { "name": "knxadlw7eiz3", "status": "FAILED", "statuses": [ { "status": "SCAN_QR_CODE", "timestamp": 1772158515911 }, { "status": "FAILED", "timestamp": 1772158516394 }, { "status": "FAILED", "timestamp": 1772158516399 } ] }, "engine": "WEBJS", "environment": { "version": "2026.2.2", "engine": "WEBJS", "tier": "PLUS", "browser": "/usr/bin/chromium", "platform": "linux/x64", "worker": { "id": null } } }

[2026-02-26 23:15:16.432212] 🚫 Ignorado (mensagem automática/sistema) { "session": "knxadlw7eiz3" }

[2026-02-26 23:15:21.439497] 📥 Recebido no webhook { "id": "evt_01kjee242q7f7zd55h9z495css", "timestamp": 1772158521431, "event": "session.status", "session": "knxadlw7eiz3", "me": null, "payload": { "name": "knxadlw7eiz3", "status": "STOPPED", "statuses": [ { "status": "FAILED", "timestamp": 1772158516394 }, { "status": "FAILED", "timestamp": 1772158516399 }, { "status": "STOPPED", "timestamp": 1772158521431 } ] }, "engine": "WEBJS", "environment": { "version": "2026.2.2", "engine": "WEBJS", "tier": "PLUS", "browser": "/usr/bin/chromium", "platform": "linux/x64", "worker": { "id": null } } }

[2026-02-26 23:15:21.439835] 🚫 Ignorado (mensagem automática/sistema) { "session": "knxadlw7eiz3" }


Screenshots

QR code appears normally before logout. Session shows connected briefly, then disconnects.


Additional context

  • Volume ./waha-data is mounted
  • Session was previously working before image update
  • No other WhatsApp Web sessions open
  • Webhook working correctly
  • Issue happens immediately after restart

Detaild Infra Enviormment:

root@srvlnx01:/home/hgusradm/php-apache-rmq-api-v1/var/www/html_26052025/html# docker exec -it container-whatsapp-http-api node -v v24.11.1 root@srvlnx01:/home/hgusradm/php-apache-rmq-api-v1/var/www/html_26052025/html# docker exec -it container-whatsapp-http-api chromium --version Chromium 145.0.7632.75 built on Debian GNU/Linux 12 (bookworm) root@srvlnx01:/home/hgusradm/php-apache-rmq-api-v1/var/www/html_26052025/html# docker --version Docker version 28.1.1, build 4eba377 root@srvlnx01:/home/hgusradm/php-apache-rmq-api-v1/var/www/html_26052025/html# docker-compose --version Docker Compose version v2.30.3 root@srvlnx01:/home/hgusradm/php-apache-rmq-api-v1/var/www/html_26052025/html# docker inspect container-whatsapp-http-api | grep Image "Image": "sha256:c93c4ea53fe278485f1077879e281dd6951116ddf9f2838562460b6dcf929273", "Image": "hugosilvalima/app-automateease:waha-plus-latest", root@srvlnx01:/home/hgusradm/php-apache-rmq-api-v1/var/www/html_26052025/html# docker inspect container-whatsapp-http-api | grep ShmSize "ShmSize": 2147483648, root@srvlnx01:/home/hgusradm/php-apache-rmq-api-v1/var/www/html_26052025/html#

patron:PLUS

hugolimav8 avatar Feb 27 '26 02:02 hugolimav8

Hello,

Thank you for your time.

We have identified the root cause of the issue.

The problem was not related to WAHA version 2026.2.2 or the WEBJS engine itself. It was caused by an incorrect volume mount configuration on our side.

We were mounting:

./waha-data:/app/data

However, WEBJS sessions are stored in:

/app/.sessions

Because of that, session data was not being properly persisted. After container restart, Chromium attempted to reuse a partially stored profile, which resulted in:

Session has been logged out! (LOGOUT) Error: Attempted to use detached Frame

Once we corrected the volume mapping to:

./waha-sessions:/app/.sessions

Sessions persisted correctly and the issue was fully resolved. Both connected numbers are now working normally after restart.

Thank you again for your support.

Best regards,

patron:PLUS

hugolimav8 avatar Mar 01 '26 02:03 hugolimav8

Hello,

Thank you for your time.

We have identified the root cause of the issue.

The problem was not related to WAHA version 2026.2.2 or the WEBJS engine itself. It was caused by an incorrect volume mount configuration on our side.

We were mounting:

./waha-data:/app/data

However, WEBJS sessions are stored in:

/app/.sessions

Because of that, session data was not being properly persisted. After container restart, Chromium attempted to reuse a partially stored profile, which resulted in:

Session has been logged out! (LOGOUT) Error: Attempted to use detached Frame

Once we corrected the volume mapping to:

./waha-sessions:/app/.sessions

Sessions persisted correctly and the issue was fully resolved. Both connected numbers are now working normally after restart.

Thank you again for your support.

Best regards,

patron:PLUS

hugolimav8 avatar Mar 01 '26 02:03 hugolimav8