You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
DesktopHostFatalError: Unexpected token '', "{
"n"... is not valid JSON
at JSON.parse (<anonymous>)
at readProfileManifest (.../dsh/node_modules/@deepseek-ai/dsh-app-boot/lib/index.js:835:22)
at loadProfileDirectory (.../dsh/node_modules/@deepseek-ai/dsh-app-boot/lib/index.js:921:18)
at main (.../dsh/node_modules/@deepseek-ai/dsh-desktop-host/lib/index.js:221:18)
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
环境
10.0.26100.8875,Electron 44.0.0 / Node 24.18.1)现象
%APPDATA%\@deepseek-ai\dsh-desktop\logs\crash-<ts>-host.log:复现
Set-Content -Encoding UTF8(会写 BOM)改写~/.dsh/profiles/<profile>/package.json——内容本身是完全合法的 JSON;或手工在文件头插入EF BB BF。影响
这是一个只有写文件的人才知道要避免的坑:脚本、第三方插件安装器、甚至用户手工编辑都可能带来 BOM,而表现是"程序打不开 + 没有任何面向用户的提示",排查成本很高(必须去翻 crash log 才知道是 manifest 的 BOM)。
建议(任一即可)
text.replace(/^\uFEFF/, '')—— 对 JSON 内容没有副作用;readProfileManifest捕获SyntaxError时给出明确错误:「profile manifest 解析失败:<路径>(疑似 UTF-8 BOM 或 JSON 语法错误)」,并在 GUI 里显示,而不是静默崩溃;(这条经验来自 2026-10-01 我自己用脚本把这个文件改坏的一次事故,后来靠保留的社区版才恢复。放在这里希望省下别人一轮排查。)
All reactions