Repository navigation
Replies: 1 comment
Independent Windows reproduction — and the 70/71 boundary verified by direct measurementYour analysis matches mine, and I can close the one gap: you inferred "the threshold sits between 70 and 71"; here is the boundary measured directly on both sides. Environment: Windows 11 x64 · Direct boundary testStarted the same Host standalone (
Two things this settles:
Extra confirmations
One addition to your fix listYour four suggestions all hold (pruning on startup is the minimal one). Add a fifth, nearly free:
Related
Your launcher workaround is a good stopgap; pruning by cookie name at startup is basically the same thing inside the app. |
Uh oh!
There was an error while loading. Please reload this page.
Summary
On Windows,
@deepseek-ai/dsh-desktop0.2.1-rc.2 eventually refuses to start. A dialog appears:The cause is not a corrupted install or a bad plugin: the app writes one new authentication cookie per launch into its own
Network\Cookiesstore, on a new loopback port each time, and never removes the old ones. After ~70 launches the accumulatedCookie:header for127.0.0.1exceeds Node's default 16 KB request-header limit, so the internal welcome handshake fails and startup aborts.Environment
@deepseek-ai/dsh-desktop0.2.1-rc.2%APPDATA%\@deepseek-ai\dsh-desktopD:\Program Files\deepseek\Crash log evidence
%APPDATA%\@deepseek-ai\dsh-desktop\logs\crash-2026-10-24T00-44-35-982Z-host.log(8 such files within 2 minutes, one per restart attempt):Cookie store evidence
%APPDATA%\@deepseek-ai\dsh-desktop\Network\Cookies(SQLite, Chromium schema), parsed after a failed start:host_key = 127.0.0.1dsh-auth-+ 43 random chars (52 chars total)valuelength = 173 bytes, stored in plaintext (encrypted_valuelength = 0)is_httponly = 1,is_secure = 0, expiry 2026-11-16Per-cookie header cost:
name(52) + "=" (1) + value(173) + "; " (2)= 228 bytes.71 × 228 ≈ 15.9 KB, which together with ordinary request headers crosses the Node.js default
--max-http-header-sizeof 16384 bytes. The failure threshold sits between 70 and 71 cookies.Creation timestamps (UTC) map 1:1 to launches:
So the count only ever grows, at ~9 launches/day → the bug returns about one week after a clean start, which matches the reported "it worked fine for a while, then suddenly stopped starting".
Why it is a loopback-port problem
The desktop app serves its UI on
127.0.0.1:<random port>and mints a fresh per-launch auth cookie for that origin. Because the port changes, the cookie's name is never reused, so the normal "replace existing cookie" path never triggers — every launch adds one more row for the same host.Observed ports across launches differed each time (e.g.
51765→53574→55094).Reproduction
Network\Cookieswith Ndsh-auth-*rows for127.0.0.1).Network\Cookiesaway, start again → app starts normally.Suggested fixes (any one of these)
dsh-auth-*cookies for127.0.0.1that do not match the current launch (or that are older than N days). This is the minimal fix and needs no port changes.Current workaround
Fully exit the app, then rename (do not delete blindly)
%APPDATA%\@deepseek-ai\dsh-desktop\Network\Cookies(plusCookies-wal/Cookies-shmif present) and restart. The file is exclusively locked while the app runs, so this must be done with the app closed.I wrapped this into a small launcher that does it automatically on every start, keeping the last 10 backups — that turns "app silently dies once a week" into "app always starts".
中文摘要
Windows 上 DSH 桌面端跑约 70 次之后就无法启动,弹窗写
desktop welcome: Web authentication failed。真因是每次启动都往自己的Network\Cookies里写一条新的、绑定当时随机端口127.0.0.1的认证 cookie(dsh-auth-+ 43 位随机名,值 173 字节),从不清理;71 条时累计Cookie:头约 15.9 KB,越过 Node 默认 16 KB 的请求头上限,启动握手失败。证据:崩溃日志 8 份(
crash-*-host.log,connectDesktopWelcomeatmain.js:8886);cookie 库 71 条全部host_key=127.0.0.1,按天新增 14/6/2/18/6/12/9/4,最后一条创建后 3 秒即崩溃;单条头部开销 228 字节,阈值落在 70→71 之间;按每天 9 次启动算约一周复发。建议:启动时清掉不属于本次启动的
dsh-auth-*;或固定端口/固定 cookie 名;或超限时清库重试一次,而不是直接启动失败。All reactions