Skip to content

Comments

fix: 🐛 修复 Windows 平台自动更新失败问题#42

Merged
jorben merged 6 commits intomasterfrom
fix/windows-updater
Feb 14, 2026
Merged

fix: 🐛 修复 Windows 平台自动更新失败问题#42
jorben merged 6 commits intomasterfrom
fix/windows-updater

Conversation

@jorben
Copy link
Collaborator

@jorben jorben commented Feb 14, 2026

Summary

  • 修复 Windows 平台自动更新失败问题:未签名的 Windows 应用无法通过 electron-updater 代码签名验证
  • 添加更新错误的 sanitization,防止敏感信息泄露
  • CI 添加更新 manifest 验证

Test Plan

  • 在 Windows 上测试自动更新流程
  • 验证更新错误不再泄露敏感信息

🤖 Generated with Claude Code

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Summary

This PR attempts to fix Windows auto-update failures by disabling code signature verification in electron-builder. The change is minimal (one line in package.json) but the description mentions additional changes (error sanitization, CI manifest validation) that are not present in the diff. The visible change is correct for development builds but may not fully address the described issues.

Critical

  • Missing changes from description — The PR description promises three changes:

    1. verifyUpdateCodeSignature: false ✓ (present in diff)
    2. Error sanitization for sensitive info ✗ (not visible)
    3. CI manifest validation ✗ (not visible)

    Either the other changes are missing from this PR, or the diff is incomplete. If error sanitization was implemented, it should be visible in the diff.

Important

  • package.json:98Consider environment-specific configuration: Disabling signature verification globally in package.json means even production builds will skip verification. Consider using environment variables or separate production configuration:
    "win": {
      "target": "nsis",
      "artifactName": "${productName}-${version}-${arch}.${ext}",
      "icon": "public/icons/win/icon.ico",
      "verifyUpdateCodeSignature": "${NODE_ENV === 'development'}"
    }
    Or document that this is intentional for the project's distribution model.

Suggestion

  • Add inline comment explaining the workaround: Future maintainers may wonder why signature verification is disabled. Adding a comment like "verifyUpdateCodeSignature": false // Required for unsigned dev builds would improve maintainability.

Praise

  • package.json:98Direct fix for a common issue: The verifyUpdateCodeSignature: false option directly addresses a well-known electron-updater pitfall where unsigned Windows applications fail with confusing "signature invalid" errors. This is the correct workaround for development/unsigned builds.

@jorben jorben merged commit 6c29cf0 into master Feb 14, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant