Repository navigation
fix(windows): 运行时权限修复被拒绝时继续启动,不再阻止在线更新 - #148
Merged
Merged
Conversation
The pre-window runtime ACL repair (b73b5a2) is fatal: it shows a modal error and exits before the first startup heartbeat. Online updates are applied by the previous release's updater, which does not grant the access, so the new app repairs as the current user. When the install folder was created with administrator rights, that user has no WRITE_DAC and the repair returns Access is denied; the update rolls back with 'startup health stopped making progress', although the previous release runs in the same folder without the grant. Log the failure and continue. Successful repairs, the installer and the updater grants are unchanged; a renderer that truly cannot start still fails in the window phases, with this log line as the cause. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
freedomkk-qfeng
added a commit
that referenced
this pull request
Oct 13, 2026
fix(windows): 按实际失败修复工作区沙箱权限,取消启动时强制改 ACL
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
问题
Windows 用户把应用装在自定义目录(例:
D:\Apps\TokenWorks),从不含 b73b5a2 的旧版在线更新到含该提交的版本时,两次更新都在启动自检失败并回退:updated application startup health stopped making progress(错误框未关闭,5 分钟没有心跳)。update-trace.jsonl中新版本没有任何health-starting-*心跳。desktop-host.log:原因
configureEduworkPaths()在写任何启动心跳之前同步调用ensureRuntimeAccess(EduWork-Updater.exe ensure-runtime-access)。失败时会弹出dialog.showErrorBox,并调用app.exit(1)。electronaccess.Ensure,apply.go中新增的授权不会运行,只能由新版应用自己以普通用户身份补授权。WRITE_DAC,Ensure在根目录这一步就返回 Access is denied。修改
dsh-electron/src/product.mjs:ensureRuntimeAccess失败时写日志[desktop:runtime-access] continuing without repair: …,然后继续启动。electronaccess.Ensure不变,仍会回滚失败的权限修改。window-create/window-load阶段会照常报错,这条日志说明原因。dsh-electron/tests/runtime-access.test.mjs:原「失败时弹框并退出」的源码检查,改为「失败时记录日志并继续,处理分支中没有 showErrorBox / app.exit / throw」。基于上游main(9b9803b)运行node --test dsh-electron/tests/*.test.mjs:188 项,183 通过,5 项按平台跳过,0 失败。可选的进一步改进(未包含)
runtime-access阶段心跳,便于更新器显示具体阶段。Ensure遇到 Access is denied 时区分「已可读,无需修改」和「确实无法读取」:可先用受限令牌试读,再决定是否需要修改。来源
原作者:@wf0229(词元工坊 USTC TokenWorks,核心提交
57bd000),随 TokenWorks 0.2.11 发布。用户报告日期:2026-10-13。🤖 Generated with Claude Code