openclaw - 💡(How to fix) Fix Bug: independent scripts in ~/.openclaw/extensions/ crash Gateway (missing openclaw.plugin.json) [1 pull requests]

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…

Fix Action

Fixed

Code Example

# 1. 在 extensions/ 目录放一个 helper 脚本
echo 'const x = 1;' > ~/.openclaw/extensions/my-helper.mjs

# 2. 尝试启动 Gateway
openclaw gateway start
# → 失败,日志显示缺少 openclaw.plugin.json

---

File: /Users/lr/.openclaw/extensions/
Problem:
 - plugins.entries.XXX: XXX: plugin manifest openclaw.plugin.json not found in /Users/lr/.openclaw/extensions/XXX.mjs

---

mkdir -p ~/.openclaw/mcp-scripts
mv ~/.openclaw/extensions/my-helper.mjs ~/.openclaw/mcp-scripts/
openclaw config validate
openclaw gateway start
RAW_BUFFERClick to expand / collapse

Bug: ~/.openclaw/extensions/ 下的独立脚本导致 Gateway 崩溃

描述

~/.openclaw/extensions/ 目录下的独立 .mjs/.js 文件会被 OpenClaw 自动发现为 native plugin 候选。当这些文件缺少同级的 openclaw.plugin.json 清单时,Gateway 在启动验证阶段报错且无法恢复。

复现步骤

# 1. 在 extensions/ 目录放一个 helper 脚本
echo 'const x = 1;' > ~/.openclaw/extensions/my-helper.mjs

# 2. 尝试启动 Gateway
openclaw gateway start
# → 失败,日志显示缺少 openclaw.plugin.json

实际日志

File: /Users/lr/.openclaw/extensions/
Problem:
 - plugins.entries.XXX: XXX: plugin manifest openclaw.plugin.json not found in /Users/lr/.openclaw/extensions/XXX.mjs

修复方法

mkdir -p ~/.openclaw/mcp-scripts
mv ~/.openclaw/extensions/my-helper.mjs ~/.openclaw/mcp-scripts/
openclaw config validate
openclaw gateway start

建议改进(Feature Request)

  1. 更好的错误提示:当前报错只指到父目录,不提示具体问题文件。建议错误信息包含具体文件名,帮助用户快速定位。

  2. 文档说明:在 docs.openclaw.ai 的插件/配置文档中明确说明 extensions/ 目录的 auto-discovery 行为,以及哪些类型文件应放在该目录、哪些应放在其他位置。

  3. 忽略已知文件类型:或考虑对 .mjs/.js 文件做更智能的识别——只加载有 openclaw.plugin.json 同伴的目录,而非扫描每个独立文件。

环境

  • OpenClaw v2026.5.27
  • macOS (x64)
  • 文件: ~/.openclaw/extensions/sse-to-stdio-bridge.mjs (MCP helper 脚本)

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 Bug: independent scripts in ~/.openclaw/extensions/ crash Gateway (missing openclaw.plugin.json) [1 pull requests]