openclaw - ✅(Solved) Fix [Bug]: Interactive onboard fails on Windows with ERR_UNSUPPORTED_ESM_URL_SCHEME after model selection [1 pull requests, 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#61810Fetched 2026-04-08 02:54:15
View on GitHub
Comments
1
Participants
2
Timeline
5
Reactions
0
Timeline (top)
closed ×1commented ×1cross-referenced ×1labeled ×1

On Windows, running OpenClaw onboarding in interactive mode crashes 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:'

Environment:

OS: Windows OpenClaw: 2026.4.5 (3e72c03) Node: v24.14.0 Install location: AppData/Roaming/npm/node_modules/openclaw Config path: openclaw.json

What I already verified:

This is not fixed by changing normal Windows file paths inside openclaw.json

Non-interactive onboarding works on the same machine: openclaw onboard --non-interactive --accept-risk --mode local --flow quickstart --auth-choice skip --skip-channels --skip-skills --skip-search --skip-health --skip-ui So this appears specific to the interactive path (model/provider/plugin flow), not general config write/read

Relevant logs:

The same error is recorded in openclaw-2026-04-06.log Repeated entries show: Error [ERR_UNSUPPORTED_ESM_URL_SCHEME] ... Received protocol 'c:' Possible root cause: A dynamic import in the interactive onboarding/provider model flow appears to pass a raw Windows absolute path instead of converting to a file:// URL (for example via pathToFileURL).

Impact: Windows users can be blocked from interactive onboarding and must use non-interactive workaround.

openclaw-2026-04-06.log

openclaw-2026-04-04.log

Error Message

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 same error is recorded in openclaw-2026-04-06.log Error [ERR_UNSUPPORTED_ESM_URL_SCHEME] ... Received protocol 'c:' Error says Windows absolute paths must be file:// URLs and reports protocol c:

Root Cause

The same error is recorded in openclaw-2026-04-06.log Repeated entries show: Error [ERR_UNSUPPORTED_ESM_URL_SCHEME] ... Received protocol 'c:' Possible root cause: A dynamic import in the interactive onboarding/provider model flow appears to pass a raw Windows absolute path instead of converting to a file:// URL (for example via pathToFileURL).

Fix Action

Fix / Workaround

This is not fixed by changing normal Windows file paths inside openclaw.json

Impact: Windows users can be blocked from interactive onboarding and must use non-interactive workaround.

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

Yes

Summary

On Windows, running OpenClaw onboarding in interactive mode crashes 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:'

Environment:

OS: Windows OpenClaw: 2026.4.5 (3e72c03) Node: v24.14.0 Install location: AppData/Roaming/npm/node_modules/openclaw Config path: openclaw.json

What I already verified:

This is not fixed by changing normal Windows file paths inside openclaw.json

Non-interactive onboarding works on the same machine: openclaw onboard --non-interactive --accept-risk --mode local --flow quickstart --auth-choice skip --skip-channels --skip-skills --skip-search --skip-health --skip-ui So this appears specific to the interactive path (model/provider/plugin flow), not general config write/read

Relevant logs:

The same error is recorded in openclaw-2026-04-06.log Repeated entries show: Error [ERR_UNSUPPORTED_ESM_URL_SCHEME] ... Received protocol 'c:' Possible root cause: A dynamic import in the interactive onboarding/provider model flow appears to pass a raw Windows absolute path instead of converting to a file:// URL (for example via pathToFileURL).

Impact: Windows users can be blocked from interactive onboarding and must use non-interactive workaround.

openclaw-2026-04-06.log

openclaw-2026-04-04.log

Steps to reproduce

  1. Run openclaw onboard
  2. Choose QuickStart
  3. Use existing config values
  4. Select provider Copilot Proxy
  5. Fill or accept base URL and model IDs
  6. Continue after “Model configured”
  7. At the “Default model” step (or immediately after), onboarding crashes

Expected behavior

The onboarding completes.

Actual behavior

Interactive onboarding exits with ERR_UNSUPPORTED_ESM_URL_SCHEME Error says Windows absolute paths must be file:// URLs and reports protocol c: Expected behavior:

Interactive onboarding should complete normally on Windows No ESM loader crash when resolving provider/model picker/plugin runtime

OpenClaw version

2026.4.5

Operating system

Windows 11

Install method

installer script

Model

Copilot proxy

Provider / routing chain

openclaw

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 most likely fix is to convert raw Windows absolute paths to file:// URLs in the interactive onboarding/provider model flow.

Guidance

  • Verify that the issue is specific to the interactive onboarding flow by comparing it with the non-interactive onboarding process, which works as expected.
  • Check the code for any dynamic imports in the interactive onboarding/provider model flow that may be passing raw Windows absolute paths instead of converting them to file:// URLs.
  • Consider using the pathToFileURL function to convert absolute paths to file:// URLs, as hinted in the possible root cause.
  • Review the openclaw-2026-04-06.log and openclaw-2026-04-04.log files for repeated error entries to confirm the ERR_UNSUPPORTED_ESM_URL_SCHEME error.

Example

const path = require('path');
const fileUrl = pathToFileURL('C:\\\\\\path\\\\\\to\\\\\\file.js');
console.log(fileUrl); // Output: file:///(C:/path/to/file.js)

Note: This example assumes the existence of a pathToFileURL function, which may need to be implemented or imported from a library.

Notes

The issue seems to be specific to Windows and the interactive onboarding flow. The provided logs and error messages suggest that the problem lies in the handling of absolute paths in the dynamic imports.

Recommendation

Apply a workaround by converting absolute paths to file:// URLs in the interactive onboarding/provider model flow, as this is the most likely cause of the issue.

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

The onboarding completes.

Still need to ship something?

×6

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

Back to top recommendations

TRENDING