Bug Report
Environment
- OpenClaw version: 2026.5.4 (stable channel)
- OS: macOS 26.4.1 (arm64, Mac mini M4)
- Node.js: v25.9.0
- Plugin:
@tencent-weixin/openclaw-weixin v2.4.1 (Weixin/WeChat personal account channel)
Description
All fetch() calls inside external channel plugins fail with TypeError: fetch failed when running inside the OpenClaw 2026.5.4 gateway process. The same fetch calls succeed outside the gateway (curl, standalone node, CLI subcommands).
Evidence
1. fetch works outside the gateway:
# curl — works
$ curl -s -X POST "https://ilinkai.weixin.qq.com/ilink/bot/get_bot_qrcode?bot_type=3" \
-H "Content-Type: application/json" -H "iLink-App-Id: bot" \
-d '{"local_token_list":[]}'
{"qrcode":"...","qrcode_img_content":"...","ret":0}
# standalone node — works
$ node -e "fetch(\"https://ilinkai.weixin.qq.com/...\").then(r => console.log(\"OK\", r.status))"
fetch OK 200
2. fetch fails inside the gateway process:
# CLI login command (spawns gateway subcommand)
$ openclaw channels login --channel openclaw-weixin
Failed to start login: TypeError: fetch failed
# Gateway channel worker log (repeats every restart cycle)
[channel] notifyStart failed during startup (ignored): TypeError: fetch failed
[channel] waitForWeixinRuntime() failed: Error: Weixin runtime initialization timeout
3. Plugin registers successfully — the issue is specifically with fetch():
[compat] Host OpenClaw 2026.5.4 >= 2026.3.22, OK.
[runtime] setWeixinRuntime called, runtime set successfully
Timeline / Repro
- Install OpenClaw 2026.5.4
- Install weixin plugin:
npx -y @tencent-weixin/openclaw-weixin-cli install
- Plugin loads and registers fine (version check passes, runtime set)
- Any
fetch() call from plugin code inside gateway process → TypeError: fetch failed
- Channel worker enters crash loop: fetch fails → runtime init timeout → restart → repeat
Hypothesis
OpenClaw 2026.5.4 appears to replace globalThis.fetch with a custom implementation (for request auditing, SSRF protection, or proxy routing based on the 2026.5.x changelog entries). This custom fetch breaks for external channel plugins that make outbound HTTPS requests to third-party APIs (e.g., https://ilinkai.weixin.qq.com).
The TypeError: fetch failed without any underlying cause info (no ECONNREFUSED, no ENOTFOUND, no AggregateError) suggests the custom fetch is rejecting the request before it reaches the network stack.
Workaround
None found. Manually obtaining the QR code via curl and writing credentials to ~/.openclaw/openclaw-weixin/accounts/ allows the channel to appear as ON / OK in openclaw status, but the channel worker still cannot poll for messages because all fetch calls fail.
Requested Fix
- Ensure the gateway's custom fetch implementation (if any) transparently passes through external plugin HTTPS requests
- Or document any new configuration needed for external channel plugins to make outbound network requests
Bug Report
Environment
@tencent-weixin/openclaw-weixinv2.4.1 (Weixin/WeChat personal account channel)Description
All
fetch()calls inside external channel plugins fail withTypeError: fetch failedwhen running inside the OpenClaw 2026.5.4 gateway process. The same fetch calls succeed outside the gateway (curl, standalone node, CLI subcommands).Evidence
1. fetch works outside the gateway:
2. fetch fails inside the gateway process:
3. Plugin registers successfully — the issue is specifically with fetch():
Timeline / Repro
npx -y @tencent-weixin/openclaw-weixin-cli installfetch()call from plugin code inside gateway process →TypeError: fetch failedHypothesis
OpenClaw 2026.5.4 appears to replace
globalThis.fetchwith a custom implementation (for request auditing, SSRF protection, or proxy routing based on the 2026.5.x changelog entries). This custom fetch breaks for external channel plugins that make outbound HTTPS requests to third-party APIs (e.g.,https://ilinkai.weixin.qq.com).The
TypeError: fetch failedwithout any underlying cause info (noECONNREFUSED, noENOTFOUND, noAggregateError) suggests the custom fetch is rejecting the request before it reaches the network stack.Workaround
None found. Manually obtaining the QR code via curl and writing credentials to
~/.openclaw/openclaw-weixin/accounts/allows the channel to appear asON / OKinopenclaw status, but the channel worker still cannot poll for messages because all fetch calls fail.Requested Fix