资源安装报错

资源安装与队列推送过程中可能出现的报错、解决方案及说明

本文档汇总 AstroBox 在资源安装、队列推送、插件安装等流程中可能向用户展示的报错信息。常见报错与解决方案已置顶,完整清单见文末。


常见报错与解决方案

install result message missing

报错原文

install result message missing

触发场景:安装过程中穿戴设备重启或断联,导致安装结果消息丢失。

解决方案:尝试重启安装;如果仍然如此,请确认资源本身是否有问题(文件损坏或不完整)。

源码位置modules/core/src/device/xiaomi/components/install.rs:226

third-party/watchface app install failed: InstallFailed

报错原文

third-party app install failed: InstallFailed
watchface app install failed: InstallFailed

触发场景:穿戴设备拒绝了安装,具体原因不明(设备返回 InstallFailedVerifyFailed 状态码),有概率是因为设备本身处于不可安装资源的状态或是资源中使用了当前设备不支持的新特性。

解决方案:建议重启穿戴设备和 AstroBox 后或删一点资源后再尝试。如果依旧不行请与创作者取得联系。

源码位置modules/core/src/device/xiaomi/components/install.rs:397

install prepare failed with status: Downgrade

报错原文

install prepare failed with status: Downgrade

触发场景:表盘 ID 冲突(设备上已存在更高版本或相同 ID 的表盘,拒绝降级安装)。

解决方案:更换表盘 ID,或在设置中开启「强制安装表盘」后重试。

源码位置modules/core/src/device/xiaomi/components/install.rs:207

install prepare failed with status: LowStorage

报错原文

install prepare failed with status: LowStorage

触发场景:穿戴设备存储空间不足,或安装的资源数量已达到设备上限。

解决方案:清理设备上的无用资源后再安装。

源码位置modules/core/src/device/xiaomi/components/install.rs:207

failed to send MASS payload: Mass data prepare was not READY

报错原文

failed to send MASS payload
Caused by: Mass data prepare was not READY

触发场景:设备认为当前不具备安装条件(设备处于 Busy / Duplicated / LowStorage / LowBattery / Downgrade 等非 Ready 状态),具体原因不详。

解决方案:建议重启穿戴设备和 AstroBox 后再尝试。

源码位置modules/core/src/device/xiaomi/components/mass.rs:421,外层 context 在 components/install.rs:214

install request is already in progress

报错原文

install request is already in progress

触发场景:同时安装多个资源时,有一定概率出现安装请求冲突。

解决方案:建议重启应用后重新安装。

源码位置modules/core/src/device/xiaomi/components/install.rs:116


完整报错清单

一、Toast 弹窗报错

安装队列通用

触发位置消息 Key说明
pages/queue.tsx:146plugin.install.unsupported非 Tauri 运行时尝试安装插件
pages/plugin/storeDetail.tsx:83plugin.install.unsupported非 Tauri 环境安装插件

安装辅助函数 (installhelper)

触发位置消息说明
logic/queue/installhelper.ts:169queue.watchfaceIdConflict(可附带「覆盖安装」按钮)安装表盘时检测到 downgrade 冲突
logic/queue/installhelper.ts:262device.connect.noDevice无已连接设备
logic/queue/installhelper.ts:448resource.firmware.invalid + 文件名(可附带「继续安装」按钮)固件文件校验失败
logic/queue/installhelper.ts:532resource.unknown.type + 文件名文件扩展名检查不通过
logic/queue/installhelper.ts:555plugin.install.unsupported非 Tauri 环境安装 ABP
logic/queue/installhelper.ts:559resource.unknown.type + 文件名ABP 文件类型不允许
logic/queue/installhelper.ts:572err.messageplugin.install.failedplugsys_install_abp 调用异常
logic/queue/installhelper.ts:619resource.unknown.type + 文件名detectSelectedFileType 返回 undefined
logic/queue/installhelper.ts:623resource.unknown.type + 文件名扩展名检查不通过
logic/queue/installhelper.ts:630plugin.install.unsupportedABP 为 Web File 对象(非路径)

插件操作

触发位置消息说明
pages/plugin/detail.tsx:344plugin.action.enableFailed启用插件失败
pages/plugin/detail.tsx:350plugin.action.disableFailed禁用插件失败
pages/plugin/detail.tsx:356err.message / plugin.action.updateFailed插件状态切换失败
pages/plugin/detail.tsx:375plugin.action.uninstallFailed卸载插件失败
pages/plugin/detail.tsx:388err.message / plugin.action.uninstallFailed卸载插件失败

二、队列内嵌报错(progressDesc)

taskList.ts 捕获 action 抛出的异常后,将错误写入任务卡片红色 progressDesc

来源典型错误消息触发场景
installhelper.tsdevice.connect.noDevice安装开始时无设备
installhelper.tsresource.firmware.invalid固件校验失败
installhelper.tsresource.unknown.type + 文件名文件类型未知
installhelper.tsplugin.install.unsupported插件安装不支持
installhelper.tsplugin.install.failedABP 安装调用失败
pluginhelper.tsplugin.install.unsupported插件安装不支持
pluginhelper.tsplugin.install.failed: store base empty插件存储基础为空

三、Rust 后端返回错误

设备安装验证

位置错误消息触发条件
frontapi/device.rs:647device_install: either \data` or `file_path` is required`安装参数缺失
frontapi/device.rs:748device_install: file type mismatch...文件类型不匹配
frontapi/device.rs:764device_install: either \data` or `file_path` is required`安装参数缺失

插件系统

位置错误消息触发条件
frontapi/plugsys.rs:224invalid path component in `{relative_path}`插件路径验证
frontapi/plugsys.rs:284store base is empty插件存储验证
frontapi/plugsys.rs:325manifest entry is empty插件清单验证
frontapi/plugsys.rs:474Failed to remove plugin directory: {err}插件目录移除
frontapi/plugsys.rs:492Invalid folder name: path traversal detected路径遍历检测
frontapi/plugsys.rs:517Failed to remove plugin directory: {err}插件目录移除
frontapi/plugsys.rs:566Plugin '{name}' is disabled插件启动验证
frontapi/plugsys.rs:570err.to_string()插件启动失败
frontapi/plugsys.rs:577Plugin '{name}' is not loaded插件未加载
frontapi/plugsys.rs:602Plugin '{name}' is disabled插件 UI 打开验证
frontapi/plugsys.rs:606err.to_string()插件 UI 打开失败
frontapi/plugsys.rs:613Plugin '{name}' is not loaded插件 UI 打开验证
frontapi/plugsys.rs:644Plugin '{name}' is not ready插件 RPC 验证
frontapi/plugsys.rs:673Plugin '{name}' is not ready插件状态验证

插件平台 Stub

插件错误消息触发条件
iap/src/error.rsIAP is not supported on this platformIAP 平台检查
inappbrowser/src/error.rsin-app browser is not supported on this platform浏览器平台检查
cloud-push/src/stub.rscloud push is not supported on this platform云推送不支持

四、WASM / 逻辑层抛错

位置错误消息触发条件
ipc/wasmBridge.ts:106device_install is not implemented for wasm runtimeWASM 不支持 device_install
ipc/wasmBridge.ts:114device_install in wasm runtime requires binary dataWASM install 缺少数据
ipc/wasmBridge.ts:130device_install in wasm runtime expects Uint8Array-compatible dataWASM install 数据类型错误
logic/queue/installhelper.ts:281device.connect.noDevice安装时无设备
logic/queue/pluginhelper.ts:67plugin.install.unsupported插件安装不支持
logic/queue/pluginhelper.ts:70plugin.install.failed: store base empty插件存储基础为空
backendHandlers.ts:220Invalid deeplink payload深度链接 payload 无效
backendHandlers.ts:227Missing resource id or provider深度链接缺少资源 ID 或提供商
backendHandlers.ts:238Missing plugin name深度链接缺少插件名
backendHandlers.ts:243Unknown deeplink target未知深度链接目标
位置错误消息触发条件
local_api/handlers.rs:98missing path资源安装路径缺失
local_api/handlers.rs:109path must be absolute路径非绝对路径
local_api/handlers.rs:119path is not a file路径不是文件
local_api/handlers.rs:154frontend rejected request前端拒绝安装请求
local_api/handlers.rs:164err.to_string()ServerLink 入队错误

六、其他排查建议

报错建议操作
resource.unknown.type确认文件扩展名正确,资源文件未损坏
resource.firmware.invalid确认固件文件完整,或尝试点击「继续安装」
plugin.install.unsupported插件安装仅支持 Tauri 桌面端,Web/WASM 不支持
store base is empty检查插件存储目录权限,或重启 AstroBox
device.connect.noDevice先连接设备再执行安装操作
queue.watchfaceIdConflict确认是否覆盖安装,或更换不同 ID 的表盘
Plugin '{name}' is disabled先启用插件再执行操作
Plugin '{name}' is not loaded检查插件是否正确安装,尝试重新安装

大纲