Repository navigation
Two desktop-app (0.2.0-rc.2) bugs: BOM written into profile package.json crashes boot; turn resume after interrupted tool call crashes with 'prepare' undefined #8837
Replies: 1 comment
|
补一份同根因的实测(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.
Two reproducible bugs on DSH Desktop 0.2.0-rc.2 (Windows 11, electron 44, node 24.18.1):
1. Boot crash: BOM written into profile package.json
readProfileManifestcrashes with:The affected profile's
package.jsonwas valid before, then started failing — the file had been rewritten with a UTF-8 BOM prefix (U+FEFF). JSON.parse rejects the BOM, so every subsequent boot of that profile dies until the BOM is stripped by hand. I hit this twice on 2026-10-01 and again on 2026-10-03 on the same profile (desktop), which suggests something in the app rewrites the profile manifest with a BOM-prefixed writer.Fix: strip the BOM before
JSON.parse(or never write one) —JSON.parse(text.replace(/^\uFEFF/, '')).2. Turn resume crash:
Cannot read properties of undefined (reading 'prepare')In a long-running desktop session (84 turns / 543 steps, 12 subagents), a host restart interrupted two running tool calls (the session correctly records them as interrupted, result unknown, and injects the recovery prompt). After that, the turn fails with:
This is not persisted in the session artifact (v4 jsonl) and produces no host crash log — it fails silently on the turn-resume path. Subsequent messages in the same session keep failing the same way, so the session is effectively stuck. A clean host restart + new turn may or may not recover it; a brand-new session works.
Suspect: the turn-resume path (agent/session prepare) dereferences something that is undefined when the previous turn ended mid-tool-call. Might already be reworked on master — mentioning it here for the rc.2 desktop build.
Happy to provide the affected session artifacts or more diagnostics if useful.
— ThreeBody6666
All reactions