Repository navigation
fix(desktop): 凭据保险箱无法解密时保留原文件并继续启动 - #109
Merged
Merged
Conversation
Contributor
|
已审查提交 损坏凭据文件后,客户端能够启动,原坏文件完整保留;设置中能明确看到密钥缺失。重新填写测试密钥后,模型请求正常,再次启动仍可使用,会话和模型配置保留。文件读取错误也没有被误当作损坏文件处理。 本轮主要覆盖凭据文件损坏后的恢复,模型服务为合成测试源;没有完整覆盖 macOS 钥匙串临时故障和跨机器迁移。在上述已测范围内未发现阻断合并的问题,建议合并。 |
… failing startup A vault the current OS account can no longer decrypt (copied install, reset password, lost key) made every credential read return 400, so the required connection plugin failed and the content trial was rejected. Rename the file beside itself, log the reason, and continue signed out. Read errors other than a missing file still fail. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
wf0229
force-pushed
the
pr/credential-vault-recovery
branch
from
October 26, 2026 12:14
0bea2b0 to
d5f6580
Compare
Contributor
Author
|
已基于最新 main(0.4.9)重新整理,解决了与通知窗口改动的冲突,桌面测试全部通过,源码收据已刷新。此前的 macOS 实测结论仍适用,麻烦维护者有空时看一下。 |
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
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 上,本机凭据保险箱(
browser/credentials.encrypted)无法被当前账户解密时,应用卡在启动页:重装应用无效。首次启动时,签名配置的试运行也会因此失败,配置被标记为「未通过启动检查」。
常见场景:从其他电脑或账户拷贝了安装目录、管理员重置过 Windows 密码、
Local State损坏而保险箱文件仍在。原因
保险箱由 Electron safeStorage 加密,密钥受当前账户的 DPAPI 保护。
EncryptedVault.read()解密或解析失败时直接抛错,本机桥对任何异常都返回 400,于是必需的 connection 插件无法激活。修改
credentials.encrypted.unreadable-<时间戳>,原样保留不删除,然后按「没有凭据」继续,用户重新登录即可。onUnreadable回调写一行诊断日志{"component":"credential-vault","event":"unreadable","reason":"decrypt|format|schema","kept":"…"},不含任何密钥。测试
dsh-electron/tests/native-vault.test.mjs:node --test dsh-electron/tests/*.test.mjs:127/127。来源
原作者:@wf0229(词元工坊 USTC TokenWorks),已随 TokenWorks 0.2.7 发布。用户实测:手动改名保险箱文件后即可恢复,与本修复的行为一致。