Repository navigation
Replies: 1 comment
|
Windows x64 同样复现。两处补充: |
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.
桌面版启动被「Web authentication failed」挡住,Host 的 303 是成功的,失败的是 431
报错图
环境
0.2.1-rc.2(Electron 44.7.0 / Node 24.21.0)source: host,phase: startup~/Library/Application Support/@deepseek-ai/dsh-desktop/Cookies复现
--port 0。Cookies。host_key = 127.0.0.1且name LIKE 'dsh-auth-%'的行增加两条,名字不同。Cookies,执行文末 SQL,再启动。应用打开,库里重新只有 1 条dsh-auth-*。不必真的启动 70 次才能确认头上限。Host 起来之后,对它打印的
http://127.0.0.1:<port>/?token=...发带 token 的 GET,Cookie 头用等长的填充:303 上的
Set-Cookie单独拿去请求去掉 token 的/,状态是 200text/html。PRAGMA integrity_check在 71 条时为ok。根因
抛错在安装包
DeepSeek Harness.app/Contents/Resources/app.asar/lib/main.js第 8886 行,函数connectDesktopWelcome(打包注释标的源文件是lib/types/welcome-backend.js)。状态码没有进入消息:send是 Electronnet.fetch,默认跟随重定向。前面一步是同文件约 8229–8233 行的authenticateWebHost(打包注释lib/types/web-document.js)。它用 Nodefetch,redirect: "manual",而且不读 Electron 的 cookie 罐:这次崩溃日志是前一句,不是后一句,所以 Host 已经返回了 303 和
Set-Cookie。cookie 名字把当次端口算了进去。代码在安装包
app.asar内的dsh/node_modules/@deepseek-ai/dsh-client-connection/lib/index.js,打包注释标的源文件是lib/types/browser-auth.js:sessionCookie写的是Path=/; HttpOnly; SameSite=Strict,Max-Age为 30 天。浏览器按 host 发送,不按端口过滤。--port 0使每次启动的名字都不同,新的Set-Cookie不会覆盖旧行。70 条左右之后,net.fetch跟随Location: ./时带上全部历史 cookie,请求头超过 Node 默认的 16384,Host 回 431,response.ok === false,界面仍显示认证失败。本机 71 条的时间跨度大约 6 天。失败那一次库里的条数加了 1(303 的 Set-Cookie 已入库),再启动就不再增加,和「第一跳本身已经 431」一致。
崩溃对话框为什么清不掉
「禁用第三方插件、备份 profile patch 并重启」调用
sanitizeProfile:把cordis.patch.ymlrename 成cordis.patch.yml.bak-<毫秒>,再把dsh.profile.bundles写成["@deepseek-ai/dsh-base", "@deepseek-ai/dsh-web-app"]。下次启动发现 patch 不在,写入空数组[]。cookie 库不在这个函数里。插件卸掉之后,431 还在。
cordis.patch.yml里同时放着模型、locale、默认模型;这一步会把这些设置一起换成[]。profile 目录里会留下.bak-<毫秒>,可以从那里拼回去。建议修复
requestAudience在 HTTP loopback 上返回 hostname(或固定字符串),让下一次Set-Cookie覆盖同一行。调大max-http-header-size只是把阈值往后推。throw带上状态码:`desktop welcome: Web authentication failed (HTTP ${authenticated.status})`。431 和 401 现在是同一句。sanitizeProfile继续重置 bundles 即可。用户 patch 已有.bak,不要在同一次恢复里把生效文件换成[]。若要针对这次对话框提供恢复,退出后删除host_key='127.0.0.1' AND name LIKE 'dsh-auth-%',保留当次进程新写的那一条。当前变通
完全退出后备份
Cookies,执行:不要改
Partitions/下的 cookie 库。重新打开后应只新增 1 条dsh-auth-*。这些行对应已经退出的随机端口。命名不改的话,冷启动频繁的机器过几十天会再满,同一条语句仍然适用。All reactions