你的 ccc-skeleton-viewer-v3 插件与当前 Cocos 4.0.0-beta.2 的 API 不兼容

用Pink发现了个问题。不知道是我环境的问题,还是bug

你的 ccc-skeleton-viewer-v3 插件与当前 Cocos 4.0.0-beta.2 的 API 不兼容,在编辑器启动阶段抛出异常,打断了 CocosHost 的初始化链路( Promise.all (index 2) 被 reject),导致后续能力(含 Agent 工具桥接)没有完成装配——这就是工具调用报 “upstream unreachable” 的最可能原因。

二、日志里的故障链

时间线(23:43–23:44):

  1. 23:43:48 CocosHost 开始注册场景运行时: [PrivateSceneRuntime] ... SUD.pink-scene-editor; CLI 0.2.0-beta.2
  2. 23:43:48.509 致命错误 :

failed to load main for ‘ccc-skeleton-viewer’:
TypeError: Editor.I18n.getLanguage is not a function
at editor-main-util.js:6:41
at editor-main-kit.js:2:32
at …/ccc-skeleton-viewer-v3/src/main/index.js:4:23
at loadExtensionMain (SUD.pink-scene-editor/dist/runtime.cjs)
at loadExtensionPreviewHost (…)
at registerBrowserPreview (…)
at … cocosHost.pink.js
at async Promise.all (index 2)

关键点:异常从 你的项目插件 抛出,穿透 SUD.pink-scene-editor 的 loadExtensionMain ,一路冒泡到 cocosHost.pink.js 的 Promise.all (index 2) 。 Promise.all 只要有一个 reject,整段初始化就中断。
3. 23:43:57 后续表现: skip preview routes for 'ccc-skeleton-viewer': preview main failed to load
4. 23:44:17 之后:构建/预览任务卡在 Init bundle root assets success... (0%) ,从 23:44 到 23:47 每 3 秒刷一次 Still running ,进度永远是 0%,期间反复出现 cocosHostAssets.refresh ["db://assets"] 。

所以是 一个插件的 API 不兼容,拖垮了两条链路 :宿主初始化 + 构建任务。