openclaw - 💡(How to fix) Fix gateway install --force: dist/index.js entrypoint causes plugin load failure (Unknown system error -11) under launchd

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…

When the gateway plist entrypoint is set to dist/index.js (as set by gateway install --force), multiple plugins fail to load under launchd with Unknown system error -11: Unknown system error -11, read. The same binary and config works correctly when run directly in a shell.

Error Message

[plugins] canvas failed to load from .../dist/extensions/canvas/index.js: Error: Unknown system error -11: Unknown system error -11, read
[plugins] 7 plugin(s) failed to initialize (load: canvas, device-pair, file-transfer, phone-control, talk-voice; register: imessage, slack)

Initially surfaces earlier as:

[secrets] [SECRETS_RELOADER_DEGRADED] Error: Unknown system error -11: Unknown system error -11, read
Gateway failed to start: Startup failed: required secrets are unavailable.

Root Cause

When the gateway plist entrypoint is set to dist/index.js (as set by gateway install --force), multiple plugins fail to load under launchd with Unknown system error -11: Unknown system error -11, read. The same binary and config works correctly when run directly in a shell.

Fix Action

Workaround

Revert the plist entrypoint from dist/index.js to the npm-runtime wrapper (npm-runtime/node_modules/openclaw/openclaw.mjs). Gateway starts and all plugins load correctly.

<!-- broken (set by gateway install --force) -->
<string>/path/to/node</string>
<string>/path/to/dist/index.js</string>

<!-- working (original) -->
<string>/path/to/node</string>
<string>/path/to/npm-runtime/node_modules/openclaw/openclaw.mjs</string>

Code Example

[plugins] canvas failed to load from .../dist/extensions/canvas/index.js: Error: Unknown system error -11: Unknown system error -11, read
[plugins] 7 plugin(s) failed to initialize (load: canvas, device-pair, file-transfer, phone-control, talk-voice; register: imessage, slack)

---

[secrets] [SECRETS_RELOADER_DEGRADED] Error: Unknown system error -11: Unknown system error -11, read
Gateway failed to start: Startup failed: required secrets are unavailable.

---

<!-- broken (set by gateway install --force) -->
<string>/path/to/node</string>
<string>/path/to/dist/index.js</string>

<!-- working (original) -->
<string>/path/to/node</string>
<string>/path/to/npm-runtime/node_modules/openclaw/openclaw.mjs</string>
RAW_BUFFERClick to expand / collapse

Summary

When the gateway plist entrypoint is set to dist/index.js (as set by gateway install --force), multiple plugins fail to load under launchd with Unknown system error -11: Unknown system error -11, read. The same binary and config works correctly when run directly in a shell.

Affected version

2026.5.12-beta.1, macOS 14 (arm64)

Steps to reproduce

  1. Run openclaw gateway install --force — this sets the plist ProgramArguments to [..., /path/to/node, /path/to/dist/index.js, gateway, --port, 18789]
  2. The gateway enters a restart loop. Plugins including canvas, device-pair, file-transfer, imessage, phone-control, slack, talk-voice, bonjour fail with the error below on every boot.

Error

[plugins] canvas failed to load from .../dist/extensions/canvas/index.js: Error: Unknown system error -11: Unknown system error -11, read
[plugins] 7 plugin(s) failed to initialize (load: canvas, device-pair, file-transfer, phone-control, talk-voice; register: imessage, slack)

Initially surfaces earlier as:

[secrets] [SECRETS_RELOADER_DEGRADED] Error: Unknown system error -11: Unknown system error -11, read
Gateway failed to start: Startup failed: required secrets are unavailable.

Workaround

Revert the plist entrypoint from dist/index.js to the npm-runtime wrapper (npm-runtime/node_modules/openclaw/openclaw.mjs). Gateway starts and all plugins load correctly.

<!-- broken (set by gateway install --force) -->
<string>/path/to/node</string>
<string>/path/to/dist/index.js</string>

<!-- working (original) -->
<string>/path/to/node</string>
<string>/path/to/npm-runtime/node_modules/openclaw/openclaw.mjs</string>

Investigation notes

  • Error -11 on macOS is EDEADLK (resource deadlock avoided) — unusual for a file read() syscall
  • Plugins that succeed (acpx, anthropic, duckduckgo, ollama) vs fail (canvas, imessage, slack, etc.) don't differ by native addon presence (none have .node binaries)
  • Running dist/index.js directly in a shell with env -i and identical environment (including stdin=/dev/null, stdout/stderr to files) works fine — no plugin errors
  • Issue appears specific to the launchd process context (audit session / kqueue interaction?)
  • Node version not a factor: reproduced on both Homebrew Node 25.9.0 and nvm Node 22.22.2

Impact

gateway install --force leaves the gateway in a broken state that requires manual plist editing to recover. The secrets reloader error message is misleading — it looks like a config/auth problem, not an entrypoint problem.

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 - 💡(How to fix) Fix gateway install --force: dist/index.js entrypoint causes plugin load failure (Unknown system error -11) under launchd