Repository navigation
Replies: 2 comments
|
rc.5 的安装器在改名之前已经执行 要先升级,可以从托盘彻底退出 DSH,关掉开在 |
0 replies
|
Hi ZHAI Jun,
Thank you
已解决这个问题,通过Deepseek找到是搜狗输入法死锁了进程。
尽管不理解为何输入法需要挂着。
Anyway,可以反馈给其他遇到相似问题的用户。
感谢support.
JamieChen
***@***.***
ShangHai
原始邮件
发件人:ZHAI Jun ***@***.***>
发件时间:2026年11月22日 16:24
收件人:deepseek-ai/deepseek-harness ***@***.***>
抄送:799057557 ***@***.***>, Author ***@***.***>
主题:Re: [deepseek-ai/deepseek-harness] Desktop auto-update on Windows always fails: installer inherits the install directory as cwd (error 32) (Discussion #14045)
rc.5 的安装器在改名之前已经执行 SetOutPath $PLUGINSDIR,而且更新进度窗口的 rundll32 也已经改成从系统目录启动。后面这一点是 rc.2 发生过的同类故障,修复已包含在 rc.5。你这次的错误码一样,持锁的进程还需要另外确认。 改名前切换目录 进度窗口的工作目录
要先升级,可以从托盘彻底退出 DSH,关掉开在 D:\deepseek 里的终端,再从下载目录双击官方 rc.5 安装包,选原安装位置覆盖安装。如果手动安装也报 32,我会先在资源监视器的「关联的句柄」里搜 D:\deepseek,抓到持锁进程再决定要改哪里。
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you authored the thread.
|
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.
Summary
On Windows the in-app update from 0.2.2-rc.1 to 0.2.2-rc.5 fails at the directory-swap step every
time. The NSIS installer tries to rename
D:\deepseektoD:\deepseek.old-{GUID}and gets Windowserror 32 (ERROR_SHARING_VIOLATION) on all 10 retries, then gives up and the app comes back on the old
version.
Root cause: the Electron main process's current working directory is the install directory (the
shortcuts ship with "Start in" =
D:\deepseek), andelectron-updater'sBaseUpdater.spawnLog()startsthe installer without a
cwd, so the installer inheritsD:\deepseek. The installer therefore holdsits own handle to the directory it is about to rename. The retry loop can never succeed — it is a
self-inflicted, permanent lock.
Environment
0.2.2-rc.1(registryDisplayVersion)0.2.2-rc.5(channelnightly)D:\deepseekD:\deepseek10.0.26300, x64electron-updater(BaseUpdater.js/NsisUpdater.js)Symptoms
version reopens. The update is offered again.
Evidence
%LOCALAPPDATA%\@deepseek-aidsh-desktop-updater\installer-logs\directory-failure-*.log(4 files, one per attempt, identical content apart from timestamps/GUIDs):
Process working directories, read from the PEB of the live app processes:
Shortcut configuration:
Reproduction of the Windows behaviour on the same machine (isolated temp directory, no app involved):
Code path
lib/main.js(desktop shell)DesktopUpdateCoordinator#install()callsthis.updater.quitAndInstall(true, true).electron-updater/out/BaseUpdater.js#quitAndInstall()callsinstall(), which callsdoInstall(), and thensetImmediate(() => app.quit()).electron-updater/out/NsisUpdater.js#doInstall()spawns the installer throughBaseUpdater#spawnLog():The installer renames
$INSTDIRto$INSTDIR.old-{GUID}before unpacking, which fails because itsown current directory is inside
$INSTDIR.The desktop shell never calls
process.chdir(), so the main process keeps the working directory thatExplorer passed from the shortcut ("Start in").
Suggested fix
Any one of these breaks the lock:
Preferred — give the spawned installer a safe working directory in
electron-updater/out/BaseUpdater.js#spawnLog():Or, in the desktop shell,
process.chdir(app.getPath("temp"))once during startup, before theupdater is constructed.
Or, in the NSIS script,
SetOutPath $TEMPbefore the backupMoveFileExWso the installer neverkeeps its cwd inside
$INSTDIR.Consider not creating shortcuts with "Start in" =
$INSTDIR(the default electron-builderbehaviour), since it makes the failure deterministic on every update.
Workaround for end users
Set the shortcuts' "Start in" to a directory outside the install path (e.g.
%USERPROFILE%). Theinstaller then inherits a harmless cwd and the update succeeds. This does not survive a manual
re-launch by double-clicking the exe inside
D:\deepseek.Note on local patching (context)
The installed
app.asaris protected by Electron ASAR integrity: the executable embeds anINTEGRITY/ELECTRONASARresource holding the SHA256 of the ASAR header (verified on this machine:the header hash equals the resource value). A local workaround therefore has to keep the header
byte-identical — only in-place, same-size edits of file contents are possible. The proper fix still has
to ship in a build.
中文摘要
Windows 桌面端从
0.2.2-rc.1更新到0.2.2-rc.5每次都失败:安装器要把D:\deepseek改名为D:\deepseek.old-{GUID},连续 10 次报 Windows 错误 32(文件被占用)。原因是三个快捷方式的「起始位置」都是
D:\deepseek,主进程的工作目录因此是安装目录;而electron-updater的spawnLog()启动安装器时没有传
cwd,安装器继承了D:\deepseek,于是它自己锁住了它要改名的目录,重试永远不会成功。建议给spawn 传入
cwd: os.tmpdir()(或在启动时process.chdir到临时目录,或在 NSIS 里先把SetOutPath切到
$TEMP)。用户侧规避:把快捷方式「起始位置」改到安装目录之外。Attachments
logs/directory-failure-20261122-100820.loglogs/directory-failure-20261122-101015.loglogs/directory-failure-20261122-101850.loglogs/directory-failure-20261122-103709.loglogs/update-info.jsonenvironment.txtInstaller logs (verbatim)
directory-failure-20261122-100820.log
directory-failure-20261122-101015.log
directory-failure-20261122-101850.log
directory-failure-20261122-103709.log
update-info.json
{"fileName":"deepseek-harness-0.2.2-rc.5-win-x64.exe","sha512":"wWySRp7Hk5gcH324jBxAc7KV0mniHzQDofyQexOJMIAWXBkgHTsRCr3IrdwX1XO8OIhDZsLYmve4mLxskikYIg==","isAdminRightsRequired":false}All reactions