openclaw - 💡(How to fix) Fix WeChat (openclaw-weixin) channel login fails with "TypeError: fetch failed" inside gateway process [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#78551Fetched 2026-05-07 03:35:26
View on GitHub
Comments
1
Participants
2
Timeline
2
Reactions
2
Author
Timeline (top)
closed ×1commented ×1

The WeChat channel login fails with "TypeError: fetch failed" when called from the OpenClaw CLI or gateway process. The same fetch call works perfectly when tested directly via curl or Node.js standalone script.

Error Message

Failed to start login: TypeError: fetch failed Channel login failed: Error: Failed to start login: TypeError: fetch failed

Root Cause

Possible Root Cause

The fetch implementation inside the OpenClaw gateway process may differ from the standard Node.js fetch, or there may be an environment-specific issue affecting HTTP requests within the gateway process.

Code Example

Failed to start login: TypeError: fetch failed
Channel login failed: Error: Failed to start login: TypeError: fetch failed

---

notifyStart failed during startup (ignored): TypeError: fetch failed
waitForWeixinRuntime() failed: Error: Weixin runtime initialization timeout
channel exited: Weixin runtime initialization timeout
RAW_BUFFERClick to expand / collapse

Environment

  • OpenClaw version: 2026.5.5 (b1abf9d)
  • Node.js: v22.22.2
  • OS: Ubuntu 24.04.4 LTS
  • WeChat plugin: @tencent-weixin/[email protected]

Description

The WeChat channel login fails with "TypeError: fetch failed" when called from the OpenClaw CLI or gateway process. The same fetch call works perfectly when tested directly via curl or Node.js standalone script.

Steps to Reproduce

  1. Run openclaw channels login --channel openclaw-weixin
  2. Error: "Failed to start login: TypeError: fetch failed"

Expected Behavior

Login should succeed and display QR code for WeChat authorization.

Actual Behavior

Failed to start login: TypeError: fetch failed
Channel login failed: Error: Failed to start login: TypeError: fetch failed

Evidence

The issue is specific to the OpenClaw gateway process:

Test MethodResult
curl -X POST https://ilinkai.weixin.qq.com/ilink/bot/get_bot_qrcode?bot_type=3✅ Success
Node.js fetch (standalone)✅ Success
OpenClaw CLI login command❌ "fetch failed"

Gateway logs:

notifyStart failed during startup (ignored): TypeError: fetch failed
waitForWeixinRuntime() failed: Error: Weixin runtime initialization timeout
channel exited: Weixin runtime initialization timeout

Additional Context

  • DNS resolution works fine (tested with dig)
  • No proxy configuration
  • No firewall restrictions
  • The same fetch call succeeds when run from the same Node.js version outside the gateway process
  • Manually obtaining the QR code token via curl and writing it to the config file does not resolve the issue, as the gateway's notifyStart call still fails during startup

Possible Root Cause

The fetch implementation inside the OpenClaw gateway process may differ from the standard Node.js fetch, or there may be an environment-specific issue affecting HTTP requests within the gateway process.

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…

Still need to ship something?

×6

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

Back to top recommendations

TRENDING