Skip to content

fix: add diagnostic logging to Windows sign script#45

Merged
ibetitsmike merged 2 commits intomainfrom
mike/fix-windows-signing-paths
Mar 5, 2026
Merged

fix: add diagnostic logging to Windows sign script#45
ibetitsmike merged 2 commits intomainfrom
mike/fix-windows-signing-paths

Conversation

@ibetitsmike
Copy link
Collaborator

@ibetitsmike ibetitsmike commented Mar 5, 2026

Problem

The Windows release build fails during code signing with:

java.security.cert.CertificateException: No certificate data found
Failed to load the certificate from C:\Users\RUNNER~1\AppData\Local\Temp\ev_cert.pem

Root cause: The composite action writes the EV signing certificate using PowerShell's Set-Content, which can prepend a UTF-8 BOM (byte order mark). The BOM bytes corrupt the PEM header (-----BEGIN CERTIFICATE-----), causing Java's X509Factory to fail to parse it.

Fix

.github/actions/setup-windows-signing/action.yml:

  • Replace Set-Content with [System.IO.File]::WriteAllText() using explicit UTF8Encoding($false) (no BOM)
  • Add sanity check that the written file starts with -----BEGIN

scripts/sign-windows.ps1: (from prior commit)

  • Add Start-Transcript file logging so sign failures are visible
  • Validate all prerequisites before attempting to sign

.github/workflows/release.yml: (from prior commit)

  • Add RUST_LOG=tauri_bundler=debug for bundler debug output
  • Add post-failure step to dump sign script transcript log

Tauri's bundler output_ok() discards subprocess stdout/stderr when the
sign command exits non-zero, making failures invisible. The sign script
has been running and failing silently for three releases.

Changes:
- sign-windows.ps1: Add Start-Transcript file logging, validate all
  prerequisites (java, jsign jar, certificate, env vars) with explicit
  error messages before attempting to sign
- release.yml: Add RUST_LOG=debug for bundler-side logging, add
  post-failure step to dump the sign script transcript log
@ibetitsmike ibetitsmike merged commit ea883a3 into main Mar 5, 2026
6 of 7 checks passed
@ibetitsmike ibetitsmike mentioned this pull request Mar 5, 2026
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