Repository navigation
Replies: 3 comments
补充复现:0.2.1-rc.5 正常,升级 0.2.2-rc.5 后再次启动失败(2026-11-19)在同一台 Windows 电脑上完成了清理重装与版本对比,补充本次观察。以下将实际观察与待验证的解释分开记录。 环境
清理重装与版本对比
这个对比支持问题与版本或版本迁移流程有关,但还不能独立确定首次引入缺陷的提交,也不能完全排除运行时序的影响。此前本机 最新崩溃日志摘录同一天、清理重装前的一次 rc.5 请求追踪通过 main-process inspector 临时包装
已验证的局部绕过在此前的 随后将同样的绕过限定到 这项实验支持连接复用/请求取消交互是值得检查的方向,是绕过证据,并不是对 Node、Host 服务端或 PowerShell/WMI 中某个具体缺陷的最终定位。 期望与建议检查方向
另有 补充源码核对:首次环境采集确实位于 report 响应路径上核对官方
对应官方源码: |
rc.5 is still affected — exact rc.5 timings and a verified client-side fixConfirmed on I re-traced the shell's
On rc.5 the first report is not aborted by a 10 s boot timeout: A small client-side fix that was verified workingRetry once in const sendRpc = () => send(url, init);
let response;
try {
response = await sendRpc();
} catch (error) {
if (signal !== void 0) throw error; // analytics keeps aborting at 1 s
response = await sendRpc(); // boot reads get a fresh connection
}With this change on a real 0.2.2-rc.5 install: request #4 retried and returned 200 in 23 ms, the workspace opened, and 3 consecutive launches produced no crash log and no recovery dialog — without touching the profile or disabling telemetry. Suggested upstream options
Happy to share the full trace log or the patch if useful. |
Additional rc.5 reproduction: synchronous process creation stalls the Host; reset also occurs with a 15-second report deadlineReproduced on Windows 10 Pro x64, build 19045, official Desktop 0.2.2-rc.5, Electron 44.7.0, Node 24.21.0, locale zh-CN (2026-11-21). The installed desktop repeatedly displayed “DeepSeek Harness 无法使用”, with a main-process error of TypeError: fetch failed / cause: read ECONNRESET. Disabling the product analytics rows restored startup. To isolate this, a diagnostic copy of the shipped Host packages was run with the same installed Electron executable in ELECTRON_RUN_AS_NODE mode. The RPC client also ran under that Electron executable. Each run used a new, empty desktop profile with only the bundled base/web application layers: no user credentials, custom models, saved sessions, third-party plugins, or terminal TUI. Logging was added only to the diagnostic copy; the installed app package was not modified. Measured connection lifecycleThe test authenticates to the loopback Host, reads productAnalytics/enabled, starts the initial productAnalytics/report, and concurrently issues settings/describe. Instrumentation records the time before/after execFile returns and the Host HTTP socket events. In the run with the report deadline increased to 15 seconds:
The Host server reports keepAliveTimeout=5000 and keepAliveTimeoutBuffer=1000. The approximately 8.18-second synchronous process-creation interval exceeds that idle-connection window. This trace supports Host event-loop starvation followed by expiration of the reused idle connection. The Host remains alive and can serve a fresh request. Although the environment queries are scheduled with Promise.all, the measured intervals above are specifically the time spent inside each execFile call before it returns a ChildProcess, not the two child processes' total asynchronous execution durations. These creation intervals execute consecutively on the Host thread. Controls
Thus, cancelling the report at its 1-second deadline is not required to reproduce this failure on this machine. Merely extending that deadline does not fix it. Suggested areas to address: keep environment/process creation off the Host serving thread and startup path; allow narrowly scoped recovery for idempotent startup reads on ECONNRESET; include the safe RPC path in the fatal diagnostic without authentication query strings or cookies. The reason process creation is slow on this Windows installation has not been established. These measurements do not identify antivirus, a proxy, or another system component as the cause. They do demonstrate that optional startup analytics can stall the Host long enough to break an otherwise healthy local boot connection. 中文摘要:rc.5 仍可复现。实测两次 execFile 在返回前分别阻塞 5006/3170 毫秒,Host 旧连接随后超时关闭,settings/describe 报 ECONNRESET。统计请求限时改成 15 秒仍失败,说明取消统计请求不是必要条件;仅关闭统计采集后,设置读取恢复到 28–32 毫秒。以上是独立空白配置下的测量,未上传 Key、账户数据、会话内容或原始诊断文件。 |
Uh oh!
There was an error while loading. Please reload this page.
[Bug] Desktop fails to start with "无法使用" on Windows: first analytics report blocks ~10s on PowerShell cold start, overruns boot client timeout, subsequent request dies with ECONNRESET
Summary
On Windows, DeepSeek Harness Desktop (0.2.2-rc.3) intermittently fails to start: the main window never appears (or a window titled "DeepSeek Harness 无法使用" shows), and a crash log is written to
%APPDATA%\@deepseek-ai\dsh-desktop\logs\crash-*-main.logwith a top-levelTypeError: fetch failedcaused byread ECONNRESET.Root cause found by tracing the shell's
fetchcalls via the CDP inspector: the firstproductAnalytics/reportRPC issued during boot blocks for ~10 s becausecollectEnvironment()(@deepseek-ai/dsh-client-product-analytics) spawns twopowershell.exe -EncodedCommandchild processes (registry version query +Get-CimInstance Win32_Processor). On machines where PowerShell cold start is slow (Defender real-time scanning / .NET JIT), these queries take 4–7 s each. The boot-chain client aborts at its 10 s timeout, and the next request in the chain (settings/describe) then hitsECONNRESETon the poisoned socket — boot fails and the shell reports fatal.It is intermittent: once PowerShell's caches are warm (queries drop to ~0.4 s), the app starts fine; on cold start it fails. This explains why reinstalling "sometimes helps" and why disabling VPN does not.
Affected users: Windows machines with slow PowerShell/WMI cold start (very common with antivirus real-time scanning), especially right after boot.
Reproduction
Windows 11 (build 26300), DeepSeek Harness Desktop 0.2.2-rc.3 (Electron 44.7.0).
Make sure PowerShell
-EncodedCommandcold start is slow (e.g. after reboot, with Defender real-time protection active). Measured on the affected machine:execFile+-EncodedCommand).Launch the app. The shell issues
POST /api/productAnalytics/report(eventdesktop_app_launch). Traced via CDP (--inspect=9333+Runtime.evaluatewrappingglobalThis.fetch):Result: window titled "DeepSeek Harness 无法使用", crash log written. Reproducible across launches whenever the PowerShell cold-start penalty applies; ~22 s from launch to failure dialog.
Also reproducible against a manually spawned host child (same argv as
DesktopHostProcess, withELECTRON_RUN_AS_NODE=1andDSH_CLIENT_VERSION=0.2.2-rc.3): a validproductAnalytics/reportRPC takes 10.04 s on cold start, then succeeds in 32 ms on the second call (environment snapshot is cached).Current behavior
TypeError: fetch failed (ECONNRESET); a fatal dialog appears and the app is unusable for that launch.%APPDATA%\@deepseek-ai\dsh-desktop\logs\crash-*-main.logshows only the raw error, with no indication of which request failed (the URL is lost; we only found it by attaching a CDP tracer).Expected behavior
dsh-desktop:boot— product analytics is optional and should be fire-and-forget (or at least not sit on the boot critical path).collectEnvironmentshould not run synchronously within the first report path, or its queries should be pre-warmed/deferred and the report RPC should not block the connection for 10 s.Workaround (for affected users)
Disabling the two analytics plugin rows via the profile patch layer fully fixes startup on the affected machine (
~/.dsh/profiles/desktop/cordis.patch.yml):Verified: with this patch the app starts reliably, main window appears, no crash logs.
(
DSH_TELEMETRY_DISABLED=1only disables thesession-telemetry-otelrow perresolveTelemetryPatch()in@deepseek-ai/dsh-app-boot; it does not disableproduct-analytics, so it does not fix this bug.)Environment
@deepseek-ai/dsh-desktop0.2.2-rc.3 (nightly channel, win-x64)Happy to provide additional diagnostics if useful.
中文版 / Chinese version
[Bug] Windows 上桌面端启动失败显示"无法使用":首次 analytics report 因 PowerShell 冷启动阻塞约 10 秒,超过 boot 客户端超时,后续请求 ECONNRESET
摘要
在 Windows 上,DeepSeek Harness Desktop(0.2.2-rc.3)间歇性启动失败:主窗口不出现(或出现标题为**"DeepSeek Harness 无法使用"**的窗口),并在
%APPDATA%\@deepseek-ai\dsh-desktop\logs\crash-*-main.log写入崩溃日志,顶层错误为TypeError: fetch failed,cause 为read ECONNRESET。通过 CDP inspector 追踪 shell 的
fetch调用定位到了根因:boot 期间发出的第一条productAnalytics/reportRPC 阻塞约 10 秒——@deepseek-ai/dsh-client-product-analytics的collectEnvironment()会拉起两个powershell.exe -EncodedCommand子进程(读注册表版本号 +Get-CimInstance Win32_Processor查 CPU)。在 PowerShell 冷启动较慢的机器上(Defender 实时扫描 / .NET JIT),这两个查询各需 4–7 秒。boot 链路客户端在 10 秒超时处中断该请求,随后链路里的下一个请求(settings/describe)撞上被毒化的连接,得到ECONNRESET——boot 失败,shell 报致命错误。问题是间歇性的:PowerShell 缓存变热后(查询降到约 0.4 秒)应用能正常启动;冷启动时失败。这解释了为什么"重装有时有效"、为什么关 VPN 无效。
受影响用户:Windows 上 PowerShell/WMI 冷启动慢的机器(杀毒软件实时扫描时非常常见),尤其是刚开机后。
复现步骤
Windows 11(build 26300),DeepSeek Harness Desktop 0.2.2-rc.3(Electron 44.7.0)。
保证 PowerShell
-EncodedCommand冷启动慢(例如刚重启后、Defender 实时防护开启时)。在受影响机器上的实测数据:execFile+-EncodedCommand的方式完全一致)。启动应用。shell 会发出
POST /api/productAnalytics/report(事件desktop_app_launch)。通过 CDP(--inspect=9333+Runtime.evaluate包装globalThis.fetch)追踪到:结果:出现"DeepSeek Harness 无法使用"窗口并写入崩溃日志。只要 PowerShell 冷启动惩罚存在,每次启动都能复现;从启动到失败弹窗约 22 秒。
用与
DesktopHostProcess相同的 argv 手动拉起 Host 子进程(带ELECTRON_RUN_AS_NODE=1和DSH_CLIENT_VERSION=0.2.2-rc.3)也能复现:冷启动时合法的productAnalytics/reportRPC 耗时 10.04 秒,第二次调用仅 32 ms(环境快照已缓存)。当前行为
TypeError: fetch failed (ECONNRESET);弹致命错误对话框,该次启动不可用。%APPDATA%\@deepseek-ai\dsh-desktop\logs\crash-*-main.log只显示原始错误,完全看不出是哪个请求失败(URL 丢失;只有挂 CDP tracer 才能找到)。期望行为
dsh-desktop:boot失败——产品分析是可选功能,应当 fire-and-forget(至少不应挡在 boot 关键路径上)。collectEnvironment不应在第一条 report 的路径上同步运行,或其查询应预热/延迟,report RPC 不应把连接阻塞 10 秒。临时解决办法(给受影响的用户)
通过 profile 的 patch 层禁用两个 analytics 插件行即可完全修复该机器上的启动问题(
~/.dsh/profiles/desktop/cordis.patch.yml):已验证:加上此 patch 后应用稳定启动,主窗口正常出现,无崩溃日志。
(注意
DSH_TELEMETRY_DISABLED=1按@deepseek-ai/dsh-app-boot中resolveTelemetryPatch()的逻辑只禁用session-telemetry-otel行,不会禁用product-analytics,因此对修复本 bug 无效。)环境
@deepseek-ai/dsh-desktop0.2.2-rc.3(nightly 渠道,win-x64)如需更多诊断信息,我很乐意提供。
All reactions