惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
H
Help Net Security
云风的 BLOG
云风的 BLOG
Apple Machine Learning Research
Apple Machine Learning Research
H
Hackread – Cybersecurity News, Data Breaches, AI and More
Hugging Face - Blog
Hugging Face - Blog
博客园_首页
D
Docker
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
Blog — PlanetScale
Blog — PlanetScale
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
GbyAI
GbyAI
博客园 - Franky
B
Blog RSS Feed
Stack Overflow Blog
Stack Overflow Blog
L
LangChain Blog
量子位
V
Visual Studio Blog
Y
Y Combinator Blog
小众软件
小众软件
N
Netflix TechBlog - Medium
博客园 - 三生石上(FineUI控件)
Microsoft Security Blog
Microsoft Security Blog
雷峰网
雷峰网

Recent Commits to openclaw:main

test: merge chat side-result checks · openclaw/openclaw@ddd2c2a test: merge cron history checks · openclaw/openclaw@f7eb746 test: merge responsive navigation shell checks · openclaw/openclaw@c2e4b47 docs(changelog): add codex oauth fixes · openclaw/openclaw@628e6cd test: merge navigation routing cases · openclaw/openclaw@5d8cecb Tests: mock channel registry bundled fallback · openclaw/openclaw@2b08233 Secrets: avoid broad web search discovery for single plugin config · openclaw/openclaw@a464f59 test: merge config view browser checks · openclaw/openclaw@20cf511 fix(status): align oauth health with runtime · openclaw/openclaw@eed7116 feat: add macOS screen snapshots for monitor preview (#67954) thanks … · openclaw/openclaw@f377db1 fix: report shared auth scopes in hello-ok (#67810) thanks @BunsDev · openclaw/openclaw@0b6c39b Auto-reply: avoid eager bundled route fallback · openclaw/openclaw@3ea1bf4 Tests: narrow session binding contract setup · openclaw/openclaw@54e4e16 fix(macOS): enable undo/redo in webchat composer text input (#34962) · openclaw/openclaw@00951dc Tests: speed up channel setup promotion · openclaw/openclaw@82b529a Docs: refresh agent instructions · openclaw/openclaw@5775fe2 fix(auth): serialize OAuth refresh across agents to fix #26322 (#67876) · openclaw/openclaw@8e79080 test: allow ollama public surface boundary test · openclaw/openclaw@7d4f1a6 Docs: add test performance guardrails · openclaw/openclaw@89706d3 Tests: restore context-engine usage proof · openclaw/openclaw@e4c4f95 Tests: slim context engine runtime coverage · openclaw/openclaw@74c198f ci: retry failed custom checkouts · openclaw/openclaw@0ee5baf test: trim duplicate provider auth onboarding cases · openclaw/openclaw@1ffc02e matrix: fix sessions_spawn --thread subagent session spawning (#67643) · openclaw/openclaw@1ce2596 test: reduce auth choice fixture churn · openclaw/openclaw@857b9cd test: mock health status config boundaries · openclaw/openclaw@9d5ab4a test: mock onboard config io boundary · openclaw/openclaw@299694d test: mock legacy state plugin boundaries · openclaw/openclaw@2713089 test: mock channel install boundaries · openclaw/openclaw@b945248 test: mock doctor preview channel boundaries · openclaw/openclaw@b1a3ad4
fix(channels): hint at when bundled channel module is mis...
BSG2000 · 2026-05-22 · via Recent Commits to openclaw:main

@@ -1,6 +1,6 @@

11

import path from "node:path";

22

import type { OpenClawConfig } from "../../config/types.openclaw.js";

3-

import { formatErrorMessage } from "../../infra/errors.js";

3+

import { extractErrorCode, formatErrorMessage } from "../../infra/errors.js";

44

import { isPathInside } from "../../infra/path-guards.js";

55

import { createSubsystemLogger } from "../../logging/subsystem.js";

66

import type {

@@ -241,6 +241,35 @@ function loadGeneratedBundledChannelModule(params: {

241241

}

242242

}

243243244+

// Walk the `.cause` chain looking for a Node-style "module not found" code.

245+

// Native-require failures inside `module-loader.ts` rewrap the original Node

246+

// error in a new Error with `{ cause }`, so the missing-module code lives on

247+

// the cause rather than the top-level error.

248+

function findMissingModuleCodeInChain(error: unknown): string | undefined {

249+

const seen = new Set<unknown>();

250+

let current: unknown = error;

251+

while (current && !seen.has(current)) {

252+

seen.add(current);

253+

const code = extractErrorCode(current);

254+

if (code === "ERR_MODULE_NOT_FOUND" || code === "MODULE_NOT_FOUND") {

255+

return code;

256+

}

257+

if (typeof current !== "object") {

258+

return undefined;

259+

}

260+

current = (current as { cause?: unknown }).cause;

261+

}

262+

return undefined;

263+

}

264+265+

export function describeBundledChannelLoadError(error: unknown, channelId: string): string {

266+

const detail = formatErrorMessage(error);

267+

if (findMissingModuleCodeInChain(error) !== undefined) {

268+

return `${detail} (run \`openclaw doctor --fix\` to install missing bundled runtime dependencies for channel ${channelId})`;

269+

}

270+

return detail;

271+

}

272+244273

function loadGeneratedBundledChannelEntry(params: {

245274

rootScope: BundledChannelRootScope;

246275

metadata: BundledChannelPluginMetadata;

@@ -264,7 +293,7 @@ function loadGeneratedBundledChannelEntry(params: {

264293

entry,

265294

};

266295

} catch (error) {

267-

const detail = formatErrorMessage(error);

296+

const detail = describeBundledChannelLoadError(error, params.metadata.manifest.id);

268297

log.warn(`[channels] failed to load bundled channel ${params.metadata.manifest.id}: ${detail}`);

269298

return null;

270299

}

@@ -293,7 +322,7 @@ function loadGeneratedBundledChannelSetupEntry(params: {

293322

}

294323

return setupEntry;

295324

} catch (error) {

296-

const detail = formatErrorMessage(error);

325+

const detail = describeBundledChannelLoadError(error, params.metadata.manifest.id);

297326

log.warn(

298327

`[channels] failed to load bundled channel setup entry ${params.metadata.manifest.id}: ${detail}`,

299328

);

@@ -573,7 +602,7 @@ function getBundledChannelPluginForRoot(

573602

loadContext.lazyPluginsById.set(id, normalizedPlugin);

574603

return normalizedPlugin;

575604

} catch (error) {

576-

const detail = formatErrorMessage(error);

605+

const detail = describeBundledChannelLoadError(error, id);

577606

log.warn(`[channels] failed to load bundled channel ${id}: ${detail}`);

578607

loadContext.lazyPluginsById.set(id, null);

579608

return undefined;

@@ -601,7 +630,7 @@ function getBundledChannelSecretsForRoot(

601630

loadContext.lazySecretsById.set(id, secrets ?? null);

602631

return secrets;

603632

} catch (error) {

604-

const detail = formatErrorMessage(error);

633+

const detail = describeBundledChannelLoadError(error, id);

605634

log.warn(`[channels] failed to load bundled channel secrets ${id}: ${detail}`);

606635

loadContext.lazySecretsById.set(id, null);

607636

return undefined;

@@ -626,7 +655,7 @@ function getBundledChannelAccountInspectorForRoot(

626655

loadContext.lazyAccountInspectorsById.set(id, inspector);

627656

return inspector;

628657

} catch (error) {

629-

const detail = formatErrorMessage(error);

658+

const detail = describeBundledChannelLoadError(error, id);

630659

log.warn(`[channels] failed to load bundled channel account inspector ${id}: ${detail}`);

631660

loadContext.lazyAccountInspectorsById.set(id, null);

632661

return undefined;

@@ -654,7 +683,7 @@ function getBundledChannelSetupPluginForRoot(

654683

loadContext.lazySetupPluginsById.set(id, plugin);

655684

return plugin;

656685

} catch (error) {

657-

const detail = formatErrorMessage(error);

686+

const detail = describeBundledChannelLoadError(error, id);

658687

log.warn(`[channels] failed to load bundled channel setup ${id}: ${detail}`);

659688

loadContext.lazySetupPluginsById.set(id, null);

660689

return undefined;

@@ -682,7 +711,7 @@ function getBundledChannelSetupSecretsForRoot(

682711

loadContext.lazySetupSecretsById.set(id, secrets ?? null);

683712

return secrets;

684713

} catch (error) {

685-

const detail = formatErrorMessage(error);

714+

const detail = describeBundledChannelLoadError(error, id);

686715

log.warn(`[channels] failed to load bundled channel setup secrets ${id}: ${detail}`);

687716

loadContext.lazySetupSecretsById.set(id, null);

688717

return undefined;