Bug Description
After the WhatsApp plugin successfully loads (see #24931), the QR code login flow fails silently. The gateway generates and displays a QR code, but no outbound WebSocket connection to WhatsApp servers is established. Scanning the QR from your phone times out because there is no live connection on the server side to receive the authentication response.
Steps to Reproduce
- Fresh install of OpenClaw (v2026.2.23, built from source)
- Enable WhatsApp channel and start gateway
- Open dashboard → Click "Link Device"
- QR code is displayed
- Scan QR with phone (WhatsApp → Linked Devices → Link a Device)
- Phone shows "Linking..." then times out after ~30 seconds
- Gateway logs show no scan event, no connection event, no error — just
Cleared WhatsApp Web credentials after ~60s
Evidence
Monitored all outbound TCP connections from the gateway process while triggering the QR login flow:
01:48:47 LOG: device.pair.list (user clicked Link Device)
01:48:55 LOG: QR received (QR code displayed in dashboard)
01:48:55 CONN: (empty) (ZERO outbound connections to WhatsApp)
... 90 seconds of monitoring ...
(still zero outbound connections)
01:50:25 LOG: Cleared WhatsApp Web credentials (QR expired)
Checked with ss -tnp state established '( dport = :443 or dport = :5222 )' — the gateway has zero outbound connections to WhatsApp servers at any point during the QR flow. Only the local dashboard WebSocket (127.0.0.1:18789) is present.
Expected Behavior
When the QR is generated, the Baileys library should maintain a persistent WebSocket connection to web.whatsapp.com:443. This connection receives the device-linking credentials after the phone scans the QR. Without it, the QR is a dead image.
Network Verification
The server CAN reach WhatsApp servers — this is not a network/firewall issue:
$ curl -sI https://web.whatsapp.com | head -1
HTTP/2 200
$ openssl s_client -connect web.whatsapp.com:443
CONNECTED(00000003)
$ ufw status
Status: inactive
$ nft list chain ip filter OUTPUT
chain OUTPUT { type filter hook output priority filter; policy accept; }
Environment
Related
Bug Description
After the WhatsApp plugin successfully loads (see #24931), the QR code login flow fails silently. The gateway generates and displays a QR code, but no outbound WebSocket connection to WhatsApp servers is established. Scanning the QR from your phone times out because there is no live connection on the server side to receive the authentication response.
Steps to Reproduce
Cleared WhatsApp Web credentialsafter ~60sEvidence
Monitored all outbound TCP connections from the gateway process while triggering the QR login flow:
Checked with
ss -tnp state established '( dport = :443 or dport = :5222 )'— the gateway has zero outbound connections to WhatsApp servers at any point during the QR flow. Only the local dashboard WebSocket (127.0.0.1:18789) is present.Expected Behavior
When the QR is generated, the Baileys library should maintain a persistent WebSocket connection to
web.whatsapp.com:443. This connection receives the device-linking credentials after the phone scans the QR. Without it, the QR is a dead image.Network Verification
The server CAN reach WhatsApp servers — this is not a network/firewall issue:
Environment
npm run build)Related
enabledfield in Zod schema (prerequisite fix)