OpenWA icon indicating copy to clipboard operation
OpenWA copied to clipboard

[Bug]: Session stuck at "Authenticating" after scanning QR (v0.2.7)

Open JasonSecurity opened this issue 5 months ago β€’ 2 comments

Pre-flight

  • [x] I searched existing issues and this isn't a duplicate
  • [x] I'm on the latest released version (or noted my version below)

OpenWA version

0.2.7

Deployment

Docker Compose

Database

SQLite (default)

WhatsApp engine

whatsapp-web.js

What happened?

After scanning the QR code, the session gets stuck indefinitely in the "Authenticating" state in the Dashboard. The QR code is generated and displayed correctly, and it can be scanned successfully with the WhatsApp iOS mobile app. However, the session never transitions to the authenticated/ready state.

Image

Steps to reproduce

  1. Fresh install / update to latest version (v0.2.7)
  2. Start a new session via Dashboard
  3. Scan the QR code with WhatsApp mobile
  4. Dashboard shows "Authenticating" indefinitely
  5. No further progress / Backend logs stop after "QR code generated"

Expected behavior

After scanning the QR, the session should transition to authenticated β†’ ready state.

Relevant logs

openwa-api  | {"timestamp":"2026-06-16T21:21:35.757Z","level":"info","context":"PluginLoaderService","message":"[whatsapp-web.js] WhatsApp-web.js engine plugin loaded","pluginId":"whatsapp-web.js"}
openwa-api  | {"timestamp":"2026-06-16T21:21:35.757Z","level":"info","context":"PluginLoaderService","message":"[whatsapp-web.js] WhatsApp-web.js engine plugin enabled","pluginId":"whatsapp-web.js"}
openwa-api  | {"timestamp":"2026-06-16T21:21:35.757Z","level":"info","context":"PluginLoaderService","message":"Plugin enabled: WhatsApp Web.js Engine","pluginId":"whatsapp-web.js","action":"plugin_enabled"}
openwa-api  | {"timestamp":"2026-06-16T21:21:35.757Z","level":"info","context":"EngineFactory","message":"Engine plugin enabled: whatsapp-web.js","action":"engine_enabled","engineType":"whatsapp-web.js"}
openwa-api  | [Nest] 7  - 06/16/2026, 9:21:35 PM    WARN [DockerService] Docker not available. Container orchestration disabled.
openwa-api  | [Nest] 7  - 06/16/2026, 9:21:35 PM    WARN [DockerService] connect ENOENT /var/run/docker.sock
openwa-api        | [Nest] 7  - 06/16/2026, 9:21:35 PM     LOG [DockerService] [Bootstrap Orchestration] Docker not available, skipping
openwa-api        | [Nest] 7  - 06/16/2026, 9:21:35 PM     LOG [NestApplication] Nest application successfully started +6ms
openwa-api        | πŸš€ OpenWA is running on: http://localhost:2785
openwa-api        | πŸ“š Swagger docs: http://localhost:2785/api/docs
openwa-api        | [Nest] 7  - 06/16/2026, 9:21:49 PM     LOG [EventsGateway] Client connected: 7MpMQl7-GgIyL60LAAAB (key: Default Admin Key)
openwa-api        | [Nest] 7  - 06/16/2026, 9:21:49 PM   DEBUG [EventsGateway] Client 7MpMQl7-GgIyL60LAAAB subscribed to: session:*:session.status, session:*:session.qr
openwa-api        | {"timestamp":"2026-06-16T21:21:51.469Z","level":"info","context":"SessionService","message":"Session deleted: prueba3","sessionId":"442c0369-4caa-4401-9e83-77f39f11b0df","action":"delete"}
openwa-api        | {"timestamp":"2026-06-16T21:21:56.116Z","level":"info","context":"SessionService","message":"Session created: 64984","sessionId":"69241668-29e6-4081-a6e8-2cb1f4a344a0","action":"create"}
openwa-api        | {"timestamp":"2026-06-16T21:21:57.327Z","level":"info","context":"SessionService","message":"Initializing engine for session: 64984","sessionId":"69241668-29e6-4081-a6e8-2cb1f4a344a0","action":"engine_init","proxyEnabled":false}
openwa-api        | {"timestamp":"2026-06-16T21:21:59.505Z","level":"info","context":"SessionService","message":"QR code generated","sessionId":"69241668-29e6-4081-a6e8-2cb1f4a344a0","action":"qr_generated"}
openwa-dashboard  | /docker-entrypoint.sh: /docker-entrypoint.d/ is not empty, will attempt to perform configuration
openwa-dashboard  | /docker-entrypoint.sh: Looking for shell scripts in /docker-entrypoint.d/
openwa-dashboard  | /docker-entrypoint.sh: Launching /docker-entrypoint.d/10-listen-on-ipv6-by-default.sh
openwa-dashboard  | 10-listen-on-ipv6-by-default.sh: info: Getting the checksum of /etc/nginx/conf.d/default.conf
openwa-dashboard  | 10-listen-on-ipv6-by-default.sh: info: /etc/nginx/conf.d/default.conf differs from the packaged version
openwa-dashboard  | /docker-entrypoint.sh: Sourcing /docker-entrypoint.d/15-local-resolvers.envsh
openwa-dashboard  | /docker-entrypoint.sh: Launching /docker-entrypoint.d/20-envsubst-on-templates.sh
openwa-dashboard  | /docker-entrypoint.sh: Launching /docker-entrypoint.d/30-tune-worker-processes.sh
openwa-dashboard  | /docker-entrypoint.sh: Configuration complete; ready for start up
openwa-dashboard  | 2026/06/16 21:21:40 [notice] 1#1: using the "epoll" event method
openwa-dashboard  | 2026/06/16 21:21:40 [notice] 1#1: nginx/1.31.1
openwa-dashboard  | 2026/06/16 21:21:40 [notice] 1#1: built by gcc 15.2.0 (Alpine 15.2.0)
openwa-dashboard  | 2026/06/16 21:21:40 [notice] 1#1: OS: Linux 7.0.6-2-pve
openwa-dashboard  | 2026/06/16 21:21:40 [notice] 1#1: getrlimit(RLIMIT_NOFILE): 1024:524288
openwa-dashboard  | 2026/06/16 21:21:40 [notice] 1#1: start worker processes
openwa-dashboard  | 2026/06/16 21:21:40 [notice] 1#1: start worker process 29
openwa-dashboard  | 2026/06/16 21:21:40 [notice] 1#1: start worker process 30
openwa-dashboard  | 2026/06/16 21:21:40 [notice] 1#1: start worker process 31
openwa-dashboard  | 2026/06/16 21:21:40 [notice] 1#1: start worker process 32
openwa-dashboard  | 2026/06/16 21:21:40 [notice] 1#1: start worker process 33
openwa-dashboard  | 2026/06/16 21:21:40 [notice] 1#1: start worker process 34
openwa-dashboard  | 2026/06/16 21:21:40 [notice] 1#1: start worker process 35
openwa-dashboard  | 2026/06/16 21:21:40 [notice] 1#1: start worker process 36

Environment / additional context

OpenWA Version: v0.2.7 (latest as of 2026-06-16) Installation Method: Docker Compose (docker-compose.dev.yml) Host OS: Debian Trixie Node.js Version: 22.x (inside container) Docker Image: Built from latest source (node:22-slim)

QR is shown and scanned successfully, but the internal state never progresses.

JasonSecurity avatar Jun 16 '26 21:06 JasonSecurity

Thanks for the detailed report and logs, @JasonSecurity. This is the post-link WhatsApp Web sync hang β€” whatsapp-web.js 1.34.x can stall right after the QR scan when it auto-selects a WA-Web version that the current web client doesn't like. Your logs match it exactly: QR generated and scanned, then no further engine progress. Same class as #251 (the "authenticating" half of it; the crashpad half was a separate issue already fixed in 0.2.6).

Immediate workaround

Pin a known-good WhatsApp Web version. In your .env:

WWEBJS_WEB_VERSION=2.3000.1023204257

…then recreate the stack (docker compose up -d --force-recreate). Details: docs/12-troubleshooting-faq.md. Unset (or latest) restores auto-select.

Root cause for Compose users (fixing now)

You're on docker-compose.dev.yml, and I found why the workaround wasn't obvious: the Compose files list env vars explicitly and have no env_file, so WWEBJS_WEB_VERSION set in .env was never passed to the container β€” the documented fix was effectively a no-op under Docker Compose. PR #274 adds the passthrough to both compose files (empty default = no change when unset).

Once #274 lands, setting WWEBJS_WEB_VERSION in .env will take effect directly. Could you confirm whether the pin above resolves it on your side? If a different version works better for you, that's useful data too. πŸ™

rmyndharis avatar Jun 17 '26 01:06 rmyndharis

I can confirm #274 fixes the issue. thanks @rmyndharis

carrfane avatar Jun 17 '26 01:06 carrfane