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
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.
【Bug 反馈】桌面端启动硬失败:dsh-auth-* cookie 随每次启动累积,溢出 Node 请求头上限 → "Web authentication failed"
1. 环境
@deepseek-ai/dsh-desktop0.2.1-rc.32. 症状
startup阶段崩溃,弹窗:"DeepSeek Harness is unavailable / Web authentication failed"。%APPDATA%\@deepseek-ai\dsh-desktop\logs\crash-*-host.log崩溃日志原文:
3. 根因(已从 0.2.1-rc.3 源码确认)
--port 0启动(dsh-desktop-host/lib/index.js的main()),每次启动都分配一个随机端口。cookieName(authority) = "dsh-auth-" + base64url(sha256(authority)),其中authority = requestAudience(headers) = url.host = "127.0.0.1:<port>"(dsh-client-connection/lib/index.js)。Network/Cookies(SQLite)里。Cookie请求头加上其它请求头(Host、UA、Sec-Fetch-* 等)超过 Node 默认maxHeaderSize(16,384),index 请求被拒(431,临界点附近表现为 401),外壳层统一报成 "Web authentication failed"(lib/main.js:8886的if (!authenticated.ok) throw)。4. 实测证据(本机)
读取
%APPDATA%\@deepseek-ai\dsh-desktop\Network\Cookies(SQLite,表cookies):共 71 个
dsh-auth-*cookie,host_key全部为127.0.0.1。71 个 cookie 对应 71 个互不相同的端口,证明"每次启动一个新随机端口、一个新 cookie":
单个 cookie:
name52 字节(dsh-auth-+ 43 位 base64url),value173 字节(v1.<payload>.<signature>),合计每个 226 字节。71 个 cookie 组成的
Cookie头 value 长度 = 16,186 字节;加上Host、Connection、User-Agent、Sec-Fetch-*等其余请求头,总头长超过 Node 默认 16,384 上限。任意一个 cookie value 的 payload 解 base64url 后,可见端口被固化在 cookie 里:
这直接印证了根因:cookie 的身份(authority)绑定了随机端口。
5. 确认修复(实测有效)
仅删除
cookies表中所有name LIKE 'dsh-auth-%'的行(不动其它 cookie、不动账号会话、不动任务数据):删除后应用恢复正常,认证通过、可正常进入工作区。数据库
PRAGMA integrity_check返回ok。6. 建议修复(供参考,二选一即可)
cookieName与 payload 里的authority只按 hostname(127.0.0.1)计算,而不是host:port,让每次启动复用同一个 cookie 名,从根上杜绝累积。dsh-auth-*回环 cookie,或缩短其 Max-Age(单次会话)。7. 临时 workaround(给用户)
DELETE,或直接删除%APPDATA%\@deepseek-ai\dsh-desktop\Network\Cookies文件(会退出登录,需重新登录)。All reactions