openclaw - ✅(Solved) Fix [Bug]: [Windows] ERR_UNSUPPORTED_ESM_URL_SCHEME when selecting sections in Control UI [1 pull requests, 2 comments, 3 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#61792Fetched 2026-04-08 02:54:27
View on GitHub
Comments
2
Participants
3
Timeline
7
Reactions
0
Timeline (top)
commented ×2labeled ×2closed ×1cross-referenced ×1

Environment

  • OpenClaw version: 2026.4.5 (3e72c03)
  • OS: Windows 10/11
  • Node.js: v22.22.2

Description When using the OpenClaw Control UI to configure channels, selecting "Select sections to configure" triggers an error.

Error Message

When using the OpenClaw Control UI to configure channels, selecting "Select sections to configure" triggers an error. 4. Error appears 4. Error appears 4. Error appears

Root Cause

Actual Behavior ESM loader fails because it's receiving a Windows absolute path (e.g., C:\Users\...) instead of a proper file:// URL.

Fix Action

Fixed

PR fix notes

PR #61832: fix(windows): wrap plugin loader paths with pathToFileURL to fix ERR_UNSUPPORTED_ESM_URL_SCHEME

Description (problem / solution / changelog)

Problem

On Windows, the Node.js ESM loader rejects raw absolute paths like C:\Users\... with:

Error [ERR_UNSUPPORTED_ESM_URL_SCHEME]: 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 loader in src/plugins/loader.ts passed raw Windows paths directly to getJiti()(path) in three call sites, causing openclaw onboard, interactive setup, and the Control UI to crash on Windows immediately after a provider/model is selected.

This was independently reported in at least three separate issues today alone:

  • Closes #61795
  • Closes #61810
  • Closes #61792

Root Cause

The getJiti(safeSource)(safeSource) and getJiti(runtimeModulePath)(runtimeModulePath) calls receive a bare Windows absolute path (e.g. C:\Users\...\extensions\openclaw-web-search) which the ESM loader misinterprets as an unknown URL scheme c:.

Fix

Adds a toSafeImportPath() helper that converts Windows absolute paths to file:// URLs using Node's built-in pathToFileURL() from node:url. The conversion is only applied on win32 — POSIX paths are returned unchanged, so Linux/macOS behaviour is completely unaffected.

// Before
mod = getJiti(safeSource)(safeSource);

// After  
const safeImportSource = toSafeImportPath(safeSource); // file:///C:/... on Windows
mod = getJiti(safeImportSource)(safeImportSource);

All three affected call sites in loadOpenClawPlugins (plugin module load), loadOpenClawPluginCliRegistry (CLI metadata load), and resolveCreatePluginRuntime (runtime module load) are patched.

Testing

  • POSIX: no change in path handling (process.platform !== 'win32' branch is a no-op)
  • Windows: C:\... paths are converted to file:///C:/... before being passed to jiti/ESM loader

Workaround until merged: use WSL2 on Windows (raw Linux paths avoid the issue).

Changed files

  • src/plugins/loader.ts (modified, +28/-3)
RAW_BUFFERClick to expand / collapse

Bug type

Regression (worked before, now fails)

Beta release blocker

No

Summary

Environment

  • OpenClaw version: 2026.4.5 (3e72c03)
  • OS: Windows 10/11
  • Node.js: v22.22.2

Description When using the OpenClaw Control UI to configure channels, selecting "Select sections to configure" triggers an error.

Steps to reproduce

Steps to Reproduce

  1. Open OpenClaw Control UI
  2. Navigate to channel configuration
  3. Click "Select sections to configure"
  4. Error appears

Expected Behavior The configuration sections should load without errors.

Actual Behavior ESM loader fails because it's receiving a Windows absolute path (e.g., C:\Users\...) instead of a proper file:// URL.

Root Cause Node.js ESM loader on Windows requires file:// protocol for absolute paths, but the code is passing bare Windows paths like C:\..., which gets misinterpreted as a c: protocol.

Additional Context

  • Gateway is running normally (bind=loopback, port=18789)
  • openclaw channels list works fine from CLI
  • Issue appears to be specific to Control UI's dynamic module loading

Expected behavior

Steps to Reproduce

  1. Open OpenClaw Control UI
  2. Navigate to channel configuration
  3. Click "Select sections to configure"
  4. Error appears

Expected Behavior The configuration sections should load without errors.

Actual Behavior ESM loader fails because it's receiving a Windows absolute path (e.g., C:\Users\...) instead of a proper file:// URL.

Root Cause Node.js ESM loader on Windows requires file:// protocol for absolute paths, but the code is passing bare Windows paths like C:\..., which gets misinterpreted as a c: protocol.

Additional Context

  • Gateway is running normally (bind=loopback, port=18789)
  • openclaw channels list works fine from CLI
  • Issue appears to be specific to Control UI's dynamic module loading

Actual behavior

Steps to Reproduce

  1. Open OpenClaw Control UI
  2. Navigate to channel configuration
  3. Click "Select sections to configure"
  4. Error appears

Expected Behavior The configuration sections should load without errors.

Actual Behavior ESM loader fails because it's receiving a Windows absolute path (e.g., C:\Users\...) instead of a proper file:// URL.

Root Cause Node.js ESM loader on Windows requires file:// protocol for absolute paths, but the code is passing bare Windows paths like C:\..., which gets misinterpreted as a c: protocol.

Additional Context

  • Gateway is running normally (bind=loopback, port=18789)
  • openclaw channels list works fine from CLI
  • Issue appears to be specific to Control UI's dynamic module loading

OpenClaw version

OpenClaw version: 2026.4.5 (3e72c03)

Operating system

Windows 10/11

Install method

NPM

Model

Kimi K2.5

Provider / routing chain

OpenClaw -> Cloudflare-Al-Gateway -> windows

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 issue can likely be fixed by modifying the code to pass absolute paths with the file:// protocol to the Node.js ESM loader.

Guidance

  • Verify that the issue is indeed caused by the ESM loader misinterpreting bare Windows paths as a c: protocol by checking the error messages and logs.
  • Modify the code to use the file:// protocol when passing absolute paths to the ESM loader, for example by using the URL class to convert the paths.
  • Test the modified code to ensure that the configuration sections load without errors.
  • Consider adding a check to ensure that the code works correctly on different operating systems, not just Windows.

Example

const filePath = 'C:\\\\Users\\\\...';
const fileUrl = new URL(`file://${filePath}`);
// Pass fileUrl to the ESM loader instead of filePath

Notes

The issue appears to be specific to the Control UI's dynamic module loading on Windows, so the fix may not be necessary for other parts of the application or on other operating systems.

Recommendation

Apply workaround: Modify the code to pass absolute paths with the file:// protocol to the Node.js ESM loader, as this is a specific fix for the identified root cause and does not require upgrading to a new version of OpenClaw.

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

Steps to Reproduce

  1. Open OpenClaw Control UI
  2. Navigate to channel configuration
  3. Click "Select sections to configure"
  4. Error appears

Expected Behavior The configuration sections should load without errors.

Actual Behavior ESM loader fails because it's receiving a Windows absolute path (e.g., C:\Users\...) instead of a proper file:// URL.

Root Cause Node.js ESM loader on Windows requires file:// protocol for absolute paths, but the code is passing bare Windows paths like C:\..., which gets misinterpreted as a c: protocol.

Additional Context

  • Gateway is running normally (bind=loopback, port=18789)
  • openclaw channels list works fine from CLI
  • Issue appears to be specific to Control UI's dynamic module 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