Skip to content

WhatsApp WebSocket ETIMEDOUT on connection after login #61788

Description

@cHaos91

Describe the bug

After successfully pairing WhatsApp via QR code, the WebSocket connection to WhatsApp servers fails with ETIMEDOUT immediately after the gateway starts. The provider starts but the channel exits within seconds with WebSocket timeout error.

Environment

  • OpenClaw Version: 2026.4.5
  • Node.js: v22.22.1
  • OS: Linux x86_64 (Intel Core i7-3630QM)
  • Channel: WhatsApp Web

Logs

[subsystem: gateway/channels/whatsapp] [default] starting provider (+[REDACTED])
[default] channel exited: {"error":{"data":{"code":"ETIMEDOUT"},"isBoom":true,"output":{"statusCode":408,"error":"Request Time-out"}}
WebSocket error: AggregateError

The connection attempts to start, but fails within ~5 seconds with ETIMEDOUT.

Steps to reproduce

  1. Run openclaw channels login --channel whatsapp
  2. Scan QR code with WhatsApp
  3. Credentials are created successfully
  4. Restart gateway
  5. Observe WebSocket timeout in logs

Expected behavior

After successful QR scan and credential creation, WhatsApp should connect and remain connected.

Additional context

  • Network connectivity to WhatsApp is confirmed (curl to web.whatsapp.com returns 200)
  • Not using Tailscale exit node (direct internet connection via local gateway)
  • Same issue occurred with previous credentials (401 Unauthorized after ~6 seconds)
  • Issue persists across gateway restarts
  • Credentials file is created (~1726 bytes) but WebSocket fails to establish connection
  • Gateway shows "starting provider" but then channel exits with ETIMEDOUT

Related

Frequency

Consistent - happens every time after pairing, regardless of credentials being present.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Normal backlog priority with limited blast radius.clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.clawsweeper:queueable-fixClawSweeper marked this issue as an existing queue_fix_pr work candidate.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.impact:crash-loopCrash, hang, restart loop, or process-level availability failure.impact:message-lossChannel message delivery can be lost, duplicated, or misrouted.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.staleMarked as stale due to inactivity

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions