openclaw - ✅(Solved) Fix v2026.4.12: channels.status crashes with ENOENT on missing audit/qa-channel bundle files [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#66129Fetched 2026-04-14 05:39:04
View on GitHub
Comments
1
Participants
2
Timeline
2
Reactions
0
Author
Timeline (top)
commented ×1cross-referenced ×1

On [email protected] (1c0672b), two bundle files referenced at runtime are missing from the installed package, causing channels.status to fail and gateway-http handlers to log unhandled ENOENT errors.

Error Message

[gateway] request handler failed: Error: Cannot find module '/usr/lib/node_modules/openclaw/dist/audit-Cb4RZuLD.js' imported from /usr/lib/node_modules/openclaw/dist/channel-CJUAgRQR.js: code=ERR_MODULE_NOT_FOUND [ws] ⇄ res ✗ channels.status 3840ms errorCode=UNAVAILABLE errorMessage=Error: Cannot find module ...

Root Cause

On [email protected] (1c0672b), two bundle files referenced at runtime are missing from the installed package, causing channels.status to fail and gateway-http handlers to log unhandled ENOENT errors.

Fix Action

Fixed

PR fix notes

PR #66277: fix(channels): guard broken bundled channel loads

Description (problem / solution / changelog)

Summary

  • Problem: partially present bundled channel artifacts can throw out of loadChannelPlugin() and take down channels.status / gateway auth-bypass path discovery instead of degrading gracefully.
  • Why it matters: issue #66129 showed this with the private qa-channel bundle path, which made status probes fail for an otherwise usable install.
  • What changed: bundled channel/plugin setup loads now catch activation-time failures, cache the broken entry as unavailable, and skip it; added a regression test for the broken-entry path.
  • What did NOT change (scope boundary): this PR does not change the npm packaging policy for private QA bundles.

Change Type (select all)

  • Bug fix
  • Feature
  • Refactor required for the fix
  • Docs
  • Security hardening
  • Chore/infra

Scope (select all touched areas)

  • Gateway / orchestration
  • Skills / tool execution
  • Auth / tokens
  • Memory / storage
  • Integrations
  • API / contracts
  • UI / DX
  • CI/CD / infra

Linked Issue/PR

  • Closes #66129
  • Related #66129
  • This PR fixes a bug or regression

Root Cause (if applicable)

  • Root cause: the bundled channel loader already guarded entry-module resolution, but it let entry.loadChannelPlugin() / entry.loadSetupPlugin() exceptions escape. A partial bundled plugin surface could therefore crash callers that enumerate bundled channels.
  • Missing detection / guardrail: there was no regression test for a bundled channel entry that resolves successfully but throws during plugin activation.
  • Contributing context (if known): private QA bundles are intentionally kept out of the published npm pack, so a partial/broken bundled surface needs to fail closed instead of propagating through shared runtime paths.

Regression Test Plan (if applicable)

  • Coverage level that should have caught this:
    • Unit test
    • Seam / integration test
    • End-to-end test
    • Existing coverage already sufficient
  • Target test or file: src/channels/plugins/bundled.shape-guard.test.ts
  • Scenario the test should lock in: a bundled channel entry that loads but throws from loadChannelPlugin() is skipped and cached as unavailable instead of throwing to callers.
  • Why this is the smallest reliable guardrail: it exercises the exact shared loader seam used by channels.status and gateway auth-bypass path discovery without needing a full packaged install repro.
  • Existing test that already covers this (if any): none found.
  • If no new test is added, why not: N/A

User-visible / Behavior Changes

  • channels.status and gateway HTTP auth-bypass path discovery now degrade gracefully when a bundled channel entry is partially present or broken instead of failing the whole request.

Diagram (if applicable)

N/A

Security Impact (required)

  • New permissions/capabilities? (Yes/No) No
  • Secrets/tokens handling changed? (Yes/No) No
  • New/changed network calls? (Yes/No) No
  • Command/tool execution surface changed? (Yes/No) No
  • Data access scope changed? (Yes/No) No
  • If any Yes, explain risk + mitigation:

Repro + Verification

Environment

  • OS: macOS 15 / darwin 25.3.0
  • Runtime/container: local repo checkout, plus direct inspection of the published [email protected] tarball
  • Model/provider: N/A
  • Integration/channel (if any): bundled channel loader / qa-channel
  • Relevant config (redacted): N/A

Steps

  1. Inspect the published [email protected] tarball and confirm the private qa-channel public entry files are not shipped.
  2. Follow the shared bundled channel runtime path used by channels.status / gateway auth-bypass discovery.
  3. Simulate a bundled channel entry that resolves but throws while loading the actual channel plugin.

Expected

  • Shared runtime callers skip the broken bundled channel and continue serving the request.

Actual

  • The thrown error escaped from the bundled channel loader and could fail shared runtime callers.

Evidence

Attach at least one:

  • Failing test/log before + passing after
  • Trace/log snippets
  • Screenshot/recording
  • Perf numbers (if relevant)

Human Verification (required)

  • Verified scenarios: inspected the v2026.4.12 packaging state, confirmed the runtime loader path, ran the new guard test, reran the nearest npm-release QA-pack test, and ran pnpm check plus pnpm build.
  • Edge cases checked: repeated broken bundled plugin lookups stay cached as unavailable instead of retrying and rethrowing.
  • What you did not verify: a full globally installed repro invoking the gateway over HTTP.

Review Conversations

  • I replied to or resolved every bot review conversation I addressed in this PR.
  • I left unresolved only the conversations that still need reviewer or maintainer judgment.

Compatibility / Migration

  • Backward compatible? (Yes/No) Yes
  • Config/env changes? (Yes/No) No
  • Migration needed? (Yes/No) No
  • If yes, exact upgrade steps:

Risks and Mitigations

  • Risk: a genuinely broken bundled channel now gets skipped rather than surfacing as a hard failure to the caller.
    • Mitigation: the loader still emits a warning log, and this matches the existing fail-open behavior for broken entry-module discovery.

Additional Context

  • Testing run:
    • pnpm test src/channels/plugins/bundled.shape-guard.test.ts
    • pnpm test test/openclaw-npm-release-check.test.ts -t 'private qa artifacts'
    • pnpm check
    • pnpm build
  • AI assistance: Cursor was used for implementation and verification; the final diff and runtime path were reviewed manually before opening this PR.

Made with Cursor

Changed files

  • CHANGELOG.md (modified, +1/-0)
  • src/channels/plugins/bundled.shape-guard.test.ts (modified, +172/-0)
  • src/channels/plugins/bundled.ts (modified, +77/-20)

Code Example

[gateway] request handler failed: Error: Cannot find module '/usr/lib/node_modules/openclaw/dist/audit-Cb4RZuLD.js' imported from /usr/lib/node_modules/openclaw/dist/channel-CJUAgRQR.js: code=ERR_MODULE_NOT_FOUND
[ws] ⇄ res ✗ channels.status 3840ms errorCode=UNAVAILABLE errorMessage=Error: Cannot find module ...

---

[gateway-http] unhandled error in request handler: Error: bundled plugin entry "./api.js" failed to open from "/usr/lib/node_modules/openclaw/dist/extensions/qa-channel/index.js" (resolved "/usr/lib/node_modules/openclaw/dist/extensions/qa-channel/api.js", plugin root "/usr/lib/node_modules/openclaw/dist/extensions/qa-channel", reason "path"): ENOENT: no such file or directory, lstat '/usr/lib/node_modules/openclaw/dist/extensions/qa-channel/api.js'
    at resolvePluginGatewayAuthBypassPaths (file:///usr/lib/node_modules/openclaw/dist/server.impl-95X_lxU6.js:24805:23)

---

$ ls /usr/lib/node_modules/openclaw/dist/extensions/qa-channel/
runtime-api.js
RAW_BUFFERClick to expand / collapse

Summary

On [email protected] (1c0672b), two bundle files referenced at runtime are missing from the installed package, causing channels.status to fail and gateway-http handlers to log unhandled ENOENT errors.

Environment

  • Version: 2026.4.12 (1c0672b)
  • Installed via: npm i -g [email protected]
  • Platform: Linux srv1193605 6.x (Ubuntu 24.04)
  • Node: /usr/bin/node

Reproduction

  1. Fresh install [email protected] globally
  2. Start gateway: systemctl --user start openclaw-gateway
  3. Call channels.status via CLI/API — or just hit any endpoint that resolves plugin gateway-auth bypass paths

Observed error 1 — channels.status

[gateway] request handler failed: Error: Cannot find module '/usr/lib/node_modules/openclaw/dist/audit-Cb4RZuLD.js' imported from /usr/lib/node_modules/openclaw/dist/channel-CJUAgRQR.js: code=ERR_MODULE_NOT_FOUND
[ws] ⇄ res ✗ channels.status 3840ms errorCode=UNAVAILABLE errorMessage=Error: Cannot find module ...

dist/audit-Cb4RZuLD.js is referenced from dist/channel-CJUAgRQR.js but does not exist in the installed package.

Observed error 2 — qa-channel plugin resolution

[gateway-http] unhandled error in request handler: Error: bundled plugin entry "./api.js" failed to open from "/usr/lib/node_modules/openclaw/dist/extensions/qa-channel/index.js" (resolved "/usr/lib/node_modules/openclaw/dist/extensions/qa-channel/api.js", plugin root "/usr/lib/node_modules/openclaw/dist/extensions/qa-channel", reason "path"): ENOENT: no such file or directory, lstat '/usr/lib/node_modules/openclaw/dist/extensions/qa-channel/api.js'
    at resolvePluginGatewayAuthBypassPaths (file:///usr/lib/node_modules/openclaw/dist/server.impl-95X_lxU6.js:24805:23)

Directory contents

$ ls /usr/lib/node_modules/openclaw/dist/extensions/qa-channel/
runtime-api.js

Expected: api.js, index.js, runtime-api.js. Only runtime-api.js is present.

Impact

  • channels.status returns UNAVAILABLE — any tooling that hits this endpoint will fail
  • gateway-http logs the qa-channel error on every request that resolves plugin auth bypass paths (noise + perf)
  • Not blocking agent operation for consumers that don't use qa-channel, but the stack trace runs on every startup probe

Suspected cause

Bundle build for 2026.4.12 appears to have dropped two esbuild-hashed chunks from the published tarball. Either the publish step missed emitting them or a .npmignore/files entry filtered them out.

Happy to provide additional diagnostics if helpful.

extent analysis

TL;DR

The issue can be fixed by ensuring that the missing bundle files are included in the installed package, possibly by adjusting the .npmignore or files entry in the openclaw package.

Guidance

  • Verify the contents of the openclaw package by checking the dist directory for the missing files (audit-Cb4RZuLD.js and api.js).
  • Check the .npmignore and files entries in the openclaw package to ensure that the missing files are not being excluded from the published package.
  • Consider re-building and re-publishing the openclaw package to ensure that all necessary files are included.
  • As a temporary workaround, manually adding the missing files to the dist directory may resolve the issue, but this is not a recommended long-term solution.

Example

No code snippet is provided as the issue is related to missing files in the package rather than a code error.

Notes

The issue appears to be related to a packaging error, and resolving it will require adjustments to the packaging process rather than changes to the code itself. Additional diagnostics may be necessary to fully understand the root cause of the issue.

Recommendation

Apply workaround: manually add the missing files to the dist directory or re-build and re-publish the openclaw package to ensure that all necessary files are included. This is recommended because the issue is likely due to a packaging error, and a workaround or re-publishing the package can resolve 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…

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 v2026.4.12: channels.status crashes with ENOENT on missing audit/qa-channel bundle files [1 pull requests, 1 comments, 2 participants]