Repository navigation
[Bug] Web 插件管理页在读取失败后一直显示“正在读取插件…” #7682
Replies: 2 comments
|
I traced this to Those three calls have no failure exit and no deadline of their own. So there are two ways to arrive at exactly the reported state, and both are terminal:
What makes this worth reporting as a store-side bug rather than a transport one: the page already ships the exit. One detail worth stating precisely, because it narrows the diagnosis: A plugin that closes the user-visible halfI published It is a browser-half cordis plugin. When the Web shell mounts it, a sibling plugin fiber wraps each of the three reads on the
It never cancels a read, never retries one, and never invents a value. Two things I had to verify rather than assume, in case anyone else wraps these namespaces:
The bound is the plugin's value; the fix belongs in coreI want to be explicit about the ceiling here. The plugin restores the designed error path, which is what the reporter's symptom needs, but it is a wrapper — a fourth read added to the store tomorrow is not covered until someone extends it, and a hung read still holds its request object behind the page. The store itself should stop being unbounded:
Happy to adjust the plugin if a canonical shape for bounded Remote reads lands in core — it is a thin wrapper by design and can be deleted the day Install- insert:
- id: remote-read-guard
name: '@argszero/cordis-plugin-remote-read-guard'The package ships that row as |
|
补一份同根因的实测(DSH 桌面端 0.2.0-rc.2 / Windows 11 / profile 「插件页读不出来」和「清单带 BOM 启动即崩」是同一个函数。 同一文件、同一宿主、不重启的单变量对照:
也就是说 BOM 是谁写的(我这次不是 app):那次重写唯一的语义变化是给 建议:在这一处剥离 BOM,并让报错点名「文件以 UTF-8 BOM 开头」——BOM 的来源可能是 PowerShell 5.1、某些编辑器或第三方安装脚本,用户不该靠猜(#6758 的论点)。 |
Uh oh!
There was an error while loading. Please reload this page.
现象
Web 的「插件管理」页面有时一直显示“正在读取插件…”,刷新和添加插件按钮不可用,页面也没有错误提示或重试入口。我在 Chrome 中遇到过这个现象;同一个正在运行的 Host,在另一个浏览器中能立即显示插件列表。清除用户安装的插件后,
webprofile 只包含@deepseek-ai/dsh-base和@deepseek-ai/dsh-web-app,Chrome 中仍会卡住。Chrome 那次底层请求失败的具体原因尚未确认。可稳定复现的客户端问题
在
packages/client/ui-plugin-manager/src/client/manager-store.ts的PluginManagerController.read()中,让ctx.remote.pluginInventory.list()返回 rejected Promise(例如连接中断),或返回一直 pending 的 Promise;后面的pluginManager.listBundles()/listPlugins()也有同样问题。当前方法只有try/finally,没有在失败时把状态从loading改为error,也没有为一直 pending 的读取设置截止时间。因此页面可以无限停在“正在读取插件…”。期望行为
读取失败或超过合理等待时间时,页面应退出加载状态,显示已有的错误和“重试”界面,允许用户再次读取;刷新失败时应保留此前加载成功的列表。
环境
0.1.7-rc.1相关代码:
PluginManagerController.read()。All reactions