Repository navigation
Replies: 3 comments
|
Additional confirmation from a Windows x64 installation of DSH Desktop 0.2.1-rc.3 (Electron 44.7.0, Node 24.21.0). The observed startup failure was: What was verified during troubleshooting:
This confirms that clearing the accumulated cookies is an effective recovery step for this failure, but it is only a workaround: the installed cookie-management code remains unchanged. For a durable fix, please bound/clean up stale Desktop-owned loopback auth cookies before the first authenticated request, while preserving isolation for concurrently running instances. Also include the actual HTTP status in the startup error, so a 431 does not send users down the plugin-reset/reinstall path. 中文补充:本机 rc.3 确认遇到同一问题,71 条本机 Cookie 导致 HTTP 431;禁用第三方插件后仍失败。退出 DSH、备份并清理这些 Cookie 后,原有会话窗口可正常打开。希望启动前处理旧认证 Cookie 的积累,并在报错中显示真实 HTTP 状态码。 |
|
Third independent confirmation on 0.2.1-rc.3 / Windows x64, plus an A/B experiment on a real installation that isolates the cookie jar as the sole cause. Environment
State of the jar when the crash loop startedRead from
A/B experiment on the real installerWith the app fully stopped, rows were inserted into / deleted from the
This removes the remaining alternative explanations (plugin composition, profile state, rc.3 packaging): the jar contents alone flip the same installation between "cannot start" and "starts fine". Self-reinforcing loopPhase A also re-confirmed the loop the original report implies: the crashing run mints one more real cookie during the successful first hop ( Both suggested directions (name cookies by host, or prune stale 中文补充:rc.3 真机 A/B 验证。注入 85 条合成 |
|
Additional confirmation on macOS arm64, DSH Desktop 0.2.1-rc.3, Electron 44.7.0, Node 24.21.0. The startup error was: What we verified locally:
Recovery confirmed on the actual installation: ordinary restarts, rolling back a custom Chrome bridge, and the built-in “Disable third-party plugins, back up profile patch, and restart” action all failed to restore startup. After fully exiting DSH, privately backing up its Cookie database, and deleting only those 71 DSH-owned loopback auth rows, the same installed application opened its normal main window and existing conversations again. We did not reinstall or modify the application bundle, or delete conversation/model-key data. Another focused fix option: Desktop already obtains the current Host cookie via A local source change for this transport wiring and status reporting passed 133 focused Desktop tests and the Desktop Host typecheck; it has not been submitted upstream or deployed to the installed app. No real cookie values, credentials, or private diagnostic paths are included here. |
Uh oh!
There was an error while loading. Please reload this page.
Desktop auth cookie accumulates one entry per launch and eventually blocks startup with HTTP 431
Environment
http://127.0.0.1:<random port>Summary
The browser-session cookie is named after the request authority, and the authority includes the ephemeral port. The cookie jar is keyed by host only, so every launch mints a new cookie that is never removed. Because all cookies for
127.0.0.1are sent on every request, theCookieheader grows without bound until it exceeds Node's default 16 KiB header limit. The Host then answers431, and the desktop shell reports onlydesktop welcome: Web authentication failed.Root cause
@deepseek-ai/dsh-client-connection,browser-auth:Each launch allocates a new port, so
cookieName()differs,Set-Cookieadds a new row, and nothing ever deletes the previous rows. Cookies carryMax-AgeofcookieMaxAgeDays(default 30 days, documented), which is far longer than the ~70 launches needed to hit the limit.Measured boundary
Each cookie is 52-byte name + 173-byte value, i.e. 228 bytes with
=and;. Replaying the cookies captured from a real profile against the running listener:Node's default
maxHeaderSizeis 16,384. The threshold is 70 cookies, i.e. 70 launches inside the 30-day window. At ~7 launches/day this reproduces in about 10 days. In the reported profile the jar held 71 cookies dated over 10 days.Impact
cordis.patch.ymlto an empty array in order to "rule out plugins". That is a heavy, wrong-path remedy for a header-size problem.Confirmed still present in 0.2.1-rc.3
The same
cookieName()/requestAudience()pair ships unchanged in the rc.3app.asar; upgrading does not fix it. A profile that hit the limit on rc.2 reaches it again on rc.3.Suggested fixes (any one is sufficient)
session.cookiesfor the loopback host and delete everydsh-auth-*entry whose signedauthorityis not the current one (or keep only the newest N). Electron can do this before the first request.maxHeaderSize, and cap the number of minted cookies.431versus401would have made this diagnosable in one minute instead of an afternoon.Reproduction without a full app
With the app closed, read
%APPDATA%\@deepseek-ai\dsh-desktop\Network\Cookies(SQLite, tablecookies,host_key = '127.0.0.1',name LIKE 'dsh-auth-%'), joinname=valuewith;into aCookieheader, send it to the listener alongside a normal Chromium header set, and vary the number of pairs. 69 passes, 70 returns 431.Related defect, same incident: the recovery action backs up the post-overwrite state
"Disable third-party plugins, back up profile patch, and restart" writes the patch file and then creates the
.bak. On a real machine, bothcordis.patch.yml.bak-<id>andcordis.patch.yml.minimal-<stamp>contained the already-emptied[](217 bytes), not the 3,793-byte original. The original only survived because an older rotating backup happened to exist. A recovery action whose label promises a backup should copy the file before rewriting it.中文摘要
桌面端每次启动都会为
127.0.0.1:<随机端口>新发一个dsh-auth-<sha256(host:port)>cookie,旧的从不清理;Chromium 只按主机名保存,于是每次启动 Cookie 头都会增长。实测 69 条返回 401、70 条返回 431(Node 默认 16 KiB 上限),约 70 次启动后应用彻底起不来,界面只报 "Web authentication failed",并引导用户重装或禁用插件。rc.3 中这段代码未改。建议:cookie 名只按主机名计算,或启动时清理不匹配当前 authority 的旧 cookie,或给本地监听器放大maxHeaderSize;另外把真实状态码带进错误信息。附带一处:恢复按钮的"备份"是在覆盖之后做的,备份到的是清空后的版本。All reactions