Repository navigation
Replies: 1 comment
|
pnpm install dsh-cookie-cleaner ① 先看现状(客户端开着也能跑,只会告诉你读不到)& "$env:USERPROFILE.dsh\profiles\desktop\node_modules.bin\dsh-cookie-cleaner.cmd" ② 完全退出客户端:托盘图标 → 退出,并确认进程列表已无 DeepSeek HarnessGet-Process | Where-Object { $_.ProcessName -match 'DeepSeek|dsh' } # 应当没有输出 ③ 清理(先看会删几条,再真删)& "$env:USERPROFILE.dsh\profiles\desktop\node_modules.bin\dsh-cookie-cleaner.cmd" --clean --dry-run |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Desktop app stops starting after ~70 launches: accumulated
dsh-authcookies exceed Node's 16 KiB header limit (HTTP 431)Environment
@deepseek-ai/dsh-desktop, bundled@deepseek-ai/dsh0.2.1-rc.3)Symptoms
The window opens but permanently shows "DeepSeek Harness is unavailable". Nothing is logged to the profile log directory. Launching the executable from a console prints:
The embedded Host itself boots fine (
dsh web: ...is printed, plugins activate), and a fresh--user-data-dirstarts normally. Deleting the loopbackdsh-auth-*cookies from%APPDATA%\@deepseek-ai\dsh-desktop\Network\Cookiesfixes startup immediately.Root cause
dsh-desktop-hoststarts the Web host with--port 0(lib/index.js), so the loopback port is random on every launch.BrowserAuth#authenticatedUrl()appends a per-process launch token tohttp://127.0.0.1:<port>/?token=....BrowserAuth#authorizeIndex()mints a persistent cookie (30 days) namedi.e. the cookie name contains the random port, so each launch creates a new cookie instead of overwriting the previous one.
Electron's default session sends every
127.0.0.1cookie on each request. The cookies are never cleaned up, so theCookierequest header grows by ~224 bytes per launch.Node's HTTP server uses the default
maxHeaderSizeof 16 KiB. Once the accumulated cookies plus the standard Chromium request headers cross that limit, the Host answers 431 Request Header Fields Too Large before the route handler runs.The desktop shell's
authenticateWebHost()/connectDesktopWelcome()receive a non-OK response and fail the boot withdesktop welcome: Web authentication failed.In this report the profile had 71 cookies, one per launch since 2026-10-17.
Evidence
CookiesDB: 71 rows, allhost_key = 127.0.0.1, all nameddsh-auth-<hash>, value length 173 bytes (~16.2 KiB of raw cookie header).Direct Host reproduction (spawn
dsh-desktop-host, request the authenticated launch URL with N cookies and normal Chromium headers):303 See Other431 Request Header Fields Too Large431 Request Header Fields Too LargeAfter deleting only the loopback
dsh-auth-*cookies, the same installation starts normally and re-mints a single cookie.Reproduction
dsh-auth-*cookie.(Equivalent: seed the Electron session with ~70
dsh-auth-*cookies for127.0.0.1and launch.)Suggested fixes
Any one of these resolves it; the first two also prevent recurrence:
dsh-auth). Cookies are already scoped by host, not by port, so a constant name makes each launch overwrite the previous cookie.dsh-auth-*cookies for the loopback host whose name does not match the current authority — they can never authenticate again.http.createServer({ maxHeaderSize: 64 * 1024 }).Additional observation
All 71 cookies are stored unencrypted in the
CookiesSQLite database (valuecolumn populated,encrypted_valueempty). On Windows, Chromium normally encrypts cookie values with DPAPI/os_crypt; this may indicate an os_crypt fallback. It is not the cause of the startup failure, but it may be worth a separate look.Local workaround
Delete the loopback
dsh-auth-*rows (or the wholeNetwork\Cookiesfile) while the app is closed. Only the local desktop web session is lost; no account credentials are affected.All reactions