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.
[Bug] Desktop welcome: Web authentication failed on startup due to net.fetch stripping SameSite=Strict cookies on 303 redirect / 桌面端启动在欢迎页握手时因 net.fetch 剥离重定向 Cookie 导致认证崩溃循环
English Description
1. Summary
On macOS (
arm64), launching the desktop application (e.g.,0.2.1-rc.5/0.2.1-rc.3) encounters an unhandled fatal error during the initial desktop welcome phase:Error: desktop welcome: Web authentication failed at connectDesktopWelcomeThis causes
dsh-desktop:bootto reject, crashing the Electron main process and renderer, resulting in an endless restart/crash loop under process supervisors.2. Root Cause Analysis
In
apps/desktop/src/main.ts(around line 458):and
apps/desktop/src/welcome-backend.ts:net.fetchis invoked from the Node/main process environment, there is no top-level browsing context.303 See Otherredirect during authentication, Chromium's underlying network stack stripsSameSite=Strictcookies across the redirect hop.HTTP 401 Unauthorized.connectDesktopWelcomechecks!authenticated.okand throwsError: desktop welcome: Web authentication failed, aborting the desktop boot sequence.3. Stack Trace (Sanitized)
4. Suggested Fix
In
apps/desktop/src/main.ts, ensure request headers explicitly carry the resolved host cookies during handshake, or wrapfetchto preserve cookies across redirects:And in
apps/desktop/src/welcome-backend.ts, allow 303 redirect responses or follow-through:中文说明 (Chinese Description)
1. 问题概述
在 macOS (
arm64) 环境下启动桌面端官方包(如0.2.1-rc.5及0.2.1-rc.3)时,主进程在欢迎页鉴权阶段报未捕获异常:Error: desktop welcome: Web authentication failed at connectDesktopWelcome导致
dsh-desktop:boot远程调用拒绝,主进程及渲染器闪退退出,在进程看门狗下陷入反复重启与崩溃循环。2. 根因剖析
在
apps/desktop/src/main.ts(约 458 行)中:welcomeBackend = await connectDesktopWelcome(ready.url, (input, init) => net.fetch(input, init), ...)net.fetch运行在 Node 宿主上下文,缺少顶层浏览上下文(Top-Level Browsing Context);303 See Other临时重定向;SameSite=Strict的认证 Cookie;HTTP 401 Unauthorized;welcome-backend.ts判定!authenticated.ok抛出desktop welcome: Web authentication failed,主进程初始化中断崩溃。3. 建议修复
在
apps/desktop/src/main.ts中改用显式挂载hostCookie的 Fetch 包装器,避免依赖缺失上下文的net.fetch自动 Cookie 转发;并在welcome-backend.ts中放宽重定向状态码校验。All reactions