openclaw - ✅(Solved) Fix [Bug]: Telegram channel crash on Windows 11 — ERR_UNSUPPORTED_ESM_URL_SCHEME (Received protocol 'c:') in 2026.4.24, grammY deps missing out-of-the-box [1 pull requests, 6 comments, 5 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#72040Fetched 2026-04-27 05:35:44
View on GitHub
Comments
6
Participants
5
Timeline
15
Reactions
0
Author
Timeline (top)
commented ×6cross-referenced ×5labeled ×2closed ×1

On Windows 11, the Telegram channel provider crashes immediately on startup in 2026.4.24 with ERR_UNSUPPORTED_ESM_URL_SCHEME (Received protocol 'c:'), making the channel completely unusable. Additionally, grammY and related packages are not installed out-of-the-box even after a clean install.

Error Message

Telegram channel exits immediately on every startup attempt with the following error: Additionally, after a fresh install of 2026.4.24, grammY and all related @grammyjs/* packages are missing and must be installed manually. Even after installing them manually, the ESM URL error persists and the Telegram channel never starts.

Root Cause

On Windows 11, the Telegram channel provider crashes immediately on startup in 2026.4.24 with ERR_UNSUPPORTED_ESM_URL_SCHEME (Received protocol 'c:'), making the channel completely unusable. Additionally, grammY and related packages are not installed out-of-the-box even after a clean install.

Fix Action

Fixed

PR fix notes

PR #72070: fix(plugins): jiti file URL for Windows ESM import (#72040)

Description (problem / solution / changelog)

Summary

  • Problem: On Windows, bundled channel/plugin loading via jiti can hit ERR_UNSUPPORTED_ESM_URL_SCHEME / Received protocol 'c:' when Node’s native ESM import receives a drive-letter path. Reported for Telegram in #72040.
  • Why it matters: Channel can fail to start on Windows even when the install is otherwise valid.
  • What changed: normalizeJitiFileSpecifier in src/plugins/jiti-file-specifier.ts converts win32 absolute drive/UNC paths to file: URLs. getCachedPluginJitiLoader passes a normalized jiti “filename” and wraps the returned jiti instance with a Proxy, so the callable still satisfies the full Jiti type (fix for TS2740) while normalizing the request path on each invocation. Unit tests in jiti-file-specifier.test.ts; existing jiti-loader-cache.test.ts kept green.
  • What did NOT change: Non-Windows platforms, specifiers that are already file:, and plugin manifest / discovery.

Change Type

  • Bug fix
  • Feature
  • Refactor
  • Docs
  • Security hardening
  • Chore/infra

Scope

  • API / contracts (jiti load seam only, internal)
  • Integrations (bundled plugins load path)

Linked issues

  • Closes #72040
  • Regression/bug

Root cause

  • Root cause: jiti’s nativeImport uses import(). On Windows, bare C:\... strings are not valid ESM specifiers; they must be file: URLs.
  • CI lesson: A thin arrow wrapper for Jiti breaks tsc because Jiti is a callable with extra properties — the fix is a Proxy preserving the real object.

Regression test plan

  • Unit — jiti-file-specifier.test.ts (win32 + linux behavior)
  • Existing — jiti-loader-cache.test.ts (caching, aliasing, overrides)

User-visible

  • Windows: bundled channels (e.g. Telegram) that load through this jiti path should no longer fail immediately on that ESM error (subject to any separate packaging/dependency issues).

Diagram — N/A

Security

  • All “No” (path normalization to file: only).

Changelog

  • Omitted in this PR to keep CHANGELOG.md conflict-free. Maintainers can add a line at merge if required.

Compatibility

  • Yes — only affects how absolute paths are passed to jiti/Node on Windows.

Risks

  • Risk: Proxy edge cases on exotic jiti call patterns — mitigation: apply trap only rewrites a leading string argument; all other Reflect.apply pass-through. Tests + prior loader tests.

Review conversations (bots)

  • Addressed: TypeScript — wrapper must preserve Jiti shape; fixed with Proxy (CI build:ci-artifacts previously failed on TS2740).
  • Changelog — removed from the PR diff to reduce merge pain per contributor request.

CI

  • Failing build-artifacts on the pre-fix commit was directly due to the arrow-wrapper type error; the Proxy fix is targeted at that. A full pnpm build:ci-artifacts run may still require a complete trusted workspace pnpm install (local/CI), unrelated to the diff’s logic.

Changed files

  • src/plugins/jiti-file-specifier.test.ts (added, +20/-0)
  • src/plugins/jiti-file-specifier.ts (added, +34/-0)
  • src/plugins/jiti-loader-cache.ts (modified, +18/-3)

Code Example

[telegram] [default] starting provider (@centralpc_openclaw_bot)
[telegram] [default] 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:'
[telegram] [default] auto-restart attempt 1/10 in 5s

---

[gateway] ready (2 plugins: browser, telegram; 8.1s)
[gateway] starting channels and sidecars...
[telegram] [default] starting provider (@centralpc_openclaw_bot)
[telegram] [default] 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:'
[telegram] [default] auto-restart attempt 1/10 in 5s
[telegram] [default] starting provider (@centralpc_openclaw_bot)
[telegram] [default] 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:'
[telegram] [default] auto-restart attempt 2/10 in 10s
[health-monitor] [telegram:default] health-monitor: restarting (reason: stopped)


This occurs on every startup. Manually installing grammy + @grammyjs/* does not resolve it. Rolling back to 2026.4.22 fixes both issues immediately.
RAW_BUFFERClick to expand / collapse

Bug type

Regression (worked before, now fails)

Beta release blocker

No

Summary

On Windows 11, the Telegram channel provider crashes immediately on startup in 2026.4.24 with ERR_UNSUPPORTED_ESM_URL_SCHEME (Received protocol 'c:'), making the channel completely unusable. Additionally, grammY and related packages are not installed out-of-the-box even after a clean install.

Steps to reproduce

  1. Install OpenClaw 2026.4.24 on Windows 11 via npm install -g openclaw (fresh or upgrade from 2026.4.22)
  2. Configure Telegram channel with a valid bot token
  3. Start the gateway: openclaw gateway start
  4. Observe the gateway log

Expected behavior

Telegram channel starts successfully, as it did in 2026.4.22. All required runtime dependencies (grammy, @grammyjs/* packages) are installed automatically without manual intervention.

Actual behavior

Telegram channel exits immediately on every startup attempt with the following error:

[telegram] [default] starting provider (@centralpc_openclaw_bot)
[telegram] [default] 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:'
[telegram] [default] auto-restart attempt 1/10 in 5s

This repeats in a restart loop (up to 10 attempts). The health-monitor then marks the channel as stopped and attempts to restart it again.

Additionally, after a fresh install of 2026.4.24, grammY and all related @grammyjs/* packages are missing and must be installed manually. Even after installing them manually, the ESM URL error persists and the Telegram channel never starts.

Rollback to 2026.4.22 immediately resolves both issues — Telegram channel starts fine and grammY deps are present.

OpenClaw version

2026.4.24 (cbcfdf6)

Operating system

Windows 11

Install method

npm global (npm install -g openclaw)

Model

moonshot/kimi-k2.6

Provider / routing chain

openclaw -> moonshot/kimi-k2.6

Additional provider/model setup details

No response

Logs, screenshots, and evidence

[gateway] ready (2 plugins: browser, telegram; 8.1s)
[gateway] starting channels and sidecars...
[telegram] [default] starting provider (@centralpc_openclaw_bot)
[telegram] [default] 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:'
[telegram] [default] auto-restart attempt 1/10 in 5s
[telegram] [default] starting provider (@centralpc_openclaw_bot)
[telegram] [default] 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:'
[telegram] [default] auto-restart attempt 2/10 in 10s
[health-monitor] [telegram:default] health-monitor: restarting (reason: stopped)


This occurs on every startup. Manually installing grammy + @grammyjs/* does not resolve it. Rolling back to 2026.4.22 fixes both issues immediately.

Impact and severity

Affected: All Windows users using the Telegram channel on 2026.4.24 Severity: Critical — Telegram channel is completely non-functional, crashes immediately on every startup Frequency: 100% reproducible on Windows 11 with npm global install Consequence: Telegram channel unusable, forced rollback to 2026.4.22

Additional information

No response

extent analysis

TL;DR

The most likely fix is to modify the Telegram channel provider to use a valid file:// URL scheme for absolute paths on Windows.

Guidance

  • Verify that the issue is specific to Windows 11 and the 2026.4.24 version of OpenClaw by testing on other operating systems and versions.
  • Check the configuration of the Telegram channel provider to ensure that it is using the correct URL scheme for absolute paths on Windows.
  • Consider manually installing the grammY and @grammyjs/* packages to see if it resolves the issue, although it did not work in the provided example.
  • Review the OpenClaw documentation and code to see if there are any known issues or workarounds for this problem.

Example

No code snippet is provided as the issue is more related to configuration and setup.

Notes

The issue seems to be specific to the 2026.4.24 version of OpenClaw on Windows 11, and rolling back to 2026.4.22 resolves the issue. However, without more information about the code and configuration, it's difficult to provide a more specific solution.

Recommendation

Apply a workaround by modifying the Telegram channel provider to use a valid file:// URL scheme for absolute paths on Windows, as the issue is critical and affects all Windows users using the Telegram channel on 2026.4.24.

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

Telegram channel starts successfully, as it did in 2026.4.22. All required runtime dependencies (grammy, @grammyjs/* packages) are installed automatically without manual intervention.

Still need to ship something?

×6

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

Back to top recommendations

TRENDING

openclaw - ✅(Solved) Fix [Bug]: Telegram channel crash on Windows 11 — ERR_UNSUPPORTED_ESM_URL_SCHEME (Received protocol 'c:') in 2026.4.24, grammY deps missing out-of-the-box [1 pull requests, 6 comments, 5 participants]