openclaw - ✅(Solved) Fix [Bug]:WhatsApp 插件在中国网络无法连接 (WebSocket 408 超时) [1 pull requests, 1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#61408Fetched 2026-04-08 02:58:59
View on GitHub
Comments
1
Participants
2
Timeline
5
Reactions
0
Timeline (top)
labeled ×2closed ×1commented ×1cross-referenced ×1

Error Message

  1. 最终报错:status=408 Request Time-out WebSocket Error (read ECONNRESET)
  2. Finally errors with: status=408 Request Time-out WebSocket Error (read ECONNRESET) 一直显示 "Waiting for WhatsApp connection...",然后超时失败,错误信息:status=408 Request Time-out WebSocket Error (read ECONNRESET) 即使设置了 HTTP_PROXY/HTTPS_PROXY/ALL_PROXY 环境变量,插件仍然无法连接Shows "Waiting for WhatsApp connection..." then times out with error: status=408 Request Time-out WebSocket Error (read ECONNRESET)

Fix Action

Fixed

PR fix notes

PR #61541: fix: add proxy support for WhatsApp WebSocket connections

Description (problem / solution / changelog)

Summary

Add proxy support for WhatsApp WebSocket connections to fix connection issues in China or other networks requiring a proxy. Users can now configure an HTTP/HTTPS proxy URL in their WhatsApp account configuration.

Changes

  • Add proxy option to WhatsAppAccountSchema (config schema)
  • Add proxy field to ResolvedWhatsAppAccount type
  • Update createWaSocket to accept proxy parameter and use https-proxy-agent
  • Pass proxy through to all WebSocket connection calls (login, login-qr, monitor)

Testing

  • Built successfully with TypeScript
  • Pre-commit hooks passed (FAST_COMMIT enabled)

Fixes openclaw/openclaw#61408

Changed files

  • extensions/whatsapp/src/accounts.ts (modified, +3/-0)
  • extensions/whatsapp/src/auto-reply/monitor.ts (modified, +1/-0)
  • extensions/whatsapp/src/inbound/monitor.ts (modified, +2/-0)
  • extensions/whatsapp/src/login-qr.ts (modified, +2/-0)
  • extensions/whatsapp/src/login.ts (modified, +2/-0)
  • extensions/whatsapp/src/session.ts (modified, +14/-1)
  • src/config/types.whatsapp.ts (modified, +2/-0)
  • src/config/zod-schema.providers-whatsapp.ts (modified, +2/-0)
RAW_BUFFERClick to expand / collapse

Bug type

Regression (worked before, now fails)

Beta release blocker

No

Summary

问题描述

OpenClaw WhatsApp 插件在中国网络环境下无法连接,提示 WebSocket 超时 (status=408 ECONNRESET)。

环境信息

  • OpenClaw 版本:2026.4.1
  • 操作系统:macOS
  • 网络环境:中国大陆,有 VPN(全局模式)

复现步骤

  1. 配置 WhatsApp 插件
  2. 运行 openclaw channels login --channel whatsapp
  3. 一直显示 "Waiting for WhatsApp connection..." 然后超时

尝试过的方法

  • 设置 HTTP_PROXY/HTTPS_PROXY/ALL_PROXY 环境变量 ❌
  • curl 通过代理可以访问 web.whatsapp.com ✅
  • OpenClaw WhatsApp 插件似乎没有使用系统代理

期望

希望插件支持代理设置,或者能在配置里指定代理

Steps to reproduce

  1. 在 OpenClaw 控制面板添加 WhatsApp 通道
  2. 运行 openclaw channels login --channel whatsapp
  3. 等待 QR 码或连接结果
  4. 观察终端输出:一直显示 "Waiting for WhatsApp connection..."
  5. 最终报错:status=408 Request Time-out WebSocket Error (read ECONNRESET) 6.1. Add WhatsApp channel in OpenClaw control panel
  6. Run openclaw channels login --channel whatsapp
  7. Wait for QR code or connection result
  8. Terminal shows: "Waiting for WhatsApp connection..."
  9. Finally errors with: status=408 Request Time-out WebSocket Error (read ECONNRESET)

Expected behavior

支持代理设置,让 WhatsApp 插件能通过用户配置的代理连接 WhatsApp 服务器Add proxy support to WhatsApp channel so it can connect through user's proxy (e.g., HTTP/SOCKS5 proxy) instead of direct connection

Actual behavior

一直显示 "Waiting for WhatsApp connection...",然后超时失败,错误信息:status=408 Request Time-out WebSocket Error (read ECONNRESET)

即使设置了 HTTP_PROXY/HTTPS_PROXY/ALL_PROXY 环境变量,插件仍然无法连接Shows "Waiting for WhatsApp connection..." then times out with error: status=408 Request Time-out WebSocket Error (read ECONNRESET)

The plugin fails to connect even when HTTP_PROXY/HTTPS_PROXY/ALL_PROXY environment variables are set

OpenClaw version

2026.04.02

Operating system

macOS (Mac mini, arm64)

Install method

npm install -g openclaw

Model

MiniMax-M2.7 (default), Groq (rate limited)

Provider / routing chain

minimax

Additional provider/model setup details

No response

Logs, screenshots, and evidence

Impact and severity

No response

Additional information

No response

extent analysis

TL;DR

The OpenClaw WhatsApp plugin likely needs to be configured to use a proxy to connect to WhatsApp servers in the Chinese network environment.

Guidance

  • Verify that the system's proxy settings are correctly configured and that the HTTP_PROXY, HTTPS_PROXY, and ALL_PROXY environment variables are set.
  • Check if the OpenClaw WhatsApp plugin has an option to specify a proxy in its configuration, and if so, configure it to use the system's proxy settings.
  • If the plugin does not support proxy settings, consider using a third-party proxy tool to route the plugin's traffic through the system's proxy.
  • Test the connection using a tool like curl to ensure that the proxy settings are working correctly.

Example

No specific code example is provided, but the user can try setting the proxy environment variables before running the OpenClaw command, e.g., HTTP_PROXY=http://proxy.example.com:8080 openclaw channels login --channel whatsapp.

Notes

The issue seems to be related to the plugin not using the system's proxy settings, which is causing the connection to timeout. The user has already tried setting the HTTP_PROXY, HTTPS_PROXY, and ALL_PROXY environment variables, but the plugin still fails to connect.

Recommendation

Apply workaround: The user can try using a third-party proxy tool to route the plugin's traffic through the system's proxy, or wait for an update to the OpenClaw WhatsApp plugin that supports proxy settings.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

支持代理设置,让 WhatsApp 插件能通过用户配置的代理连接 WhatsApp 服务器Add proxy support to WhatsApp channel so it can connect through user's proxy (e.g., HTTP/SOCKS5 proxy) instead of direct connection

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING