Skip to content

[BUG] openclaw-weixin channel exits with ESM loader error on Windows + Node 24 #77878

@dxjmailbox-eng

Description

@dxjmailbox-eng

Environment

  • OS: Windows (LAPTOP-NLCD7QJV, Windows 10 10.0.19045)
  • Node: v24.15.0
  • OpenClaw: 2026.5.4 (upgraded from 2026.5.3-1, issue appeared after upgrade to 2026.5.4)
  • Plugin: @tencent-weixin/openclaw-weixin v2.4.1
  • Extension path: C:\Users\dongx\.openclaw\extensions\openclaw-weixin

Bug Description
The WeChat channel (openclaw-weixin) repeatedly crashes and exits immediately after startup with the following error:

[039b79cba416-im-bot] channel exited: Only URLs with a scheme in: file, data, and node are supported by the default ESM loader. On Windows, absolute paths must be valid file:// URLs. Received protocol 'c:'

The plugin retries 10 times with exponential backoff (5s, 11s, 21s, 40s, 82s, 163s...) before permanently giving up. After the upgrade to OpenClaw 2026.5.4, WeChat channel is completely non-functional.

Channel Configuration

{
  "channels": {
    "openclaw-weixin": {
      "accounts": {
        "039b79cba416-im-bot": {
          "baseUrl": "https://ilinkai.weixin.qq.com"
        }
      }
    }
  }
}

What I Investigated

  1. Code analysis: Traced through all .js files in dist/src/ of the wechat plugin. The only dynamic import() calls are:

    • channel.js:362await import("./monitor/monitor.js") (relative path, should not resolve to C:\)
    • accounts.js:279await import("openclaw/plugin-sdk/config-runtime") (bare specifier, resolved via OpenClaw package exports map)
    • login-qr.js:102await import("qrcode-terminal") (bare specifier, exists in plugin node_modules)
    • silk-transcode.js:51await import("silk-wasm") (bare specifier, but silk-wasm dir does not exist in plugin node_modules — this import falls into the catch block)
  2. Windows symlink issue: Previously, OpenClaw tried to create symlinks in ~/.openclaw/plugin-skills/ for plugin skills and failed with EPERM: operation not permitted, symlink. This was addressed by manually creating junction points (mklink /J) and adding plugin skills directories to skills.load.extraDirs. This is separate from the current WeChat issue.

  3. ESM module resolution: Verified that openclaw/plugin-sdk/config-runtime correctly resolves to dist/plugin-sdk/config-runtime.js through OpenClaw's exports map, and all hashed internal imports within that file resolve correctly.

  4. No direct path-import conversion found: None of the plugin's .js files pass a Windows absolute path (e.g. C:\...) directly to import(). The error is triggered before the WeChat plugin's own code runs — it happens at the channel startup bootstrap stage.

  5. notifyStart fails too: The error TypeError: fetch failed on notifyStart also appears, likely as a consequence of the channel exiting before the network call completes.

Likely Root Cause
The error Received protocol 'c:' suggests that during the Node.js ESM module loading phase (while importing one of the plugin's .js modules), a Windows path string is being passed to the ESM dynamic import() somewhere in the module chain. This could be triggered by:

  • import.meta.resolve() calls in a dependency that returns a Windows path
  • A Node.js built-in or loader hook that receives a Windows path instead of a file:// URL

This appears to be a regression introduced in or after OpenClaw 2026.5.4 when combined with Node 24.15.0 on Windows. The error consistently occurs right after the channel starts, before monitorWeixinProvider is called.

Expected Behavior
The WeChat channel should start normally and begin long-polling for messages.

Temporary Workaround

{
  "plugins": {
    "entries": {
      "openclaw-weixin": {
        "enabled": false
      }
    }
  }
}

Disabling the plugin prevents the crash loop but leaves WeChat non-functional.

Logs
Full log available at: C:\Users\dongx\AppData\Local\Temp\openclaw\openclaw-2026-05-05.log (look for [039b79cba416-im-bot] entries around the time of restart to 2026.5.4)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    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