Skip to content

[Bug] openclaw-weixin channel not registered in gateway runtime - invalid channels.start channel on WSL2 #86314

Description

@laughingma

Environment

  • OpenClaw: 2026.5.22 (also 2026.5.20)
  • Plugin: @tencent-weixin/openclaw-weixin v2.4.4
  • Node.js: v23.11.1
  • OS: Windows 11 + WSL2 (Ubuntu, kernel 6.6.114.1)
  • Gateway: local mode, systemd user service

Symptoms

  1. openclaw channels login --channel openclaw-weixin: QR code shows, scans successfully
  2. Auth saved to ~/.openclaw/openclaw-weixin/accounts/ correctly
  3. CLI sends channels.start via WebSocket after login
  4. Gateway responds: errorCode=INVALID_REQUEST errorMessage=invalid channels.start channel
  5. Gateway startup log: http server listening (7 plugins: browser, canvas, device-pair, file-transfer, memory-core, phone-control, talk-voice) - no weixin channel, no error about being skipped

Root Cause

The gateway runtime channel registry does not contain openclaw-weixin. The channel register() function (which calls api.registerChannel()) is never invoked because the gateway does not load non-stock channel plugins at startup.

The full call chain:
channels.start handler ? normalizeChannelId("openclaw-weixin") ? normalizeAnyChannelId ? findRegisteredChannelPluginEntry ? buildRegisteredChannelPluginLookup().byKey.get("openclaw-weixin") ? returns undefined ? null ? "invalid channels.start channel" error

The CLI can load the plugin on-the-fly via resolveInstallableChannelPlugin() ? loadScopedChannelPlugin() and the QR login flow works perfectly. But the gateway startup never loads non-stock channel plugins, so channels.start fails.

Steps to Reproduce

  1. Install OpenClaw 2026.5.20+ on WSL2 (Windows 11)
  2. openclaw plugins install @tencent-weixin/openclaw-weixin
  3. openclaw config set channels.openclaw-weixin.enabled true
  4. openclaw gateway restart
  5. openclaw channels login --channel openclaw-weixin
  6. Scan QR code with WeChat ? observe error

Workarounds Tried (10+, all failed)

  • Remove plugins.allow for auto-discovery
  • Add openclaw-weixin to plugins.allow
  • openclaw doctor --fix
  • openclaw plugins registry --refresh
  • Copy plugin to ~/.openclaw/extensions/openclaw-weixin/
  • Symlink to stock extensions dir (causes different error)
  • Reinstall with --force
  • Downgrade to 2026.5.20 then re-upgrade
  • Toggle bundledDiscovery between compat and allowlist
  • openclaw channels add guided setup

Expected Behavior

After QR scan, gateway should recognize openclaw-weixin, start it via plugin.gateway.startAccount(), and begin long-polling for WeChat messages.

Additional Notes

  • Plugin openclaw.plugin.json correctly declares channels: ["openclaw-weixin"]
  • Plugin dist/index.js correctly exports register() with api.registerChannel()
  • Account auth data (token, userId) correctly saved after QR scan
  • openclaw channels capabilities shows accounts with Probe: "unavailable"
  • This appears to be a gap in how non-stock channel plugins are loaded at gateway startup vs discovered by CLI

Metadata

Metadata

Labels

P1High-priority user-facing bug, regression, or broken workflow.clawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.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.

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions