fix(windows): resolve untrusted publisher certificate error during msix installation

Windows users continue to get this error message when trying to install Slides For Worship. Need to see if we can find a verification that works so it doesn’t confuse users when they try to install

Automated Issue Triage

Status: Root cause confirmed in packaging and release configuration
Labels Assigned: bug, external user
Title Formatted: fix(windows): resolve untrusted publisher certificate error during msix installation

Root Cause Analysis

The attached screenshot confirms Windows App Installer fails when attempting to open slides_for_worship_x64.msix with the error:

“This app package’s publisher certificate could not be verified. Contact your system administrator or the app developer to obtain a new app package with verified certificates. The root certificate and all intermediate certificates of the signature in the app package must be trusted.” (Publisher: Unknown)

Windows App Installer strictly requires MSIX packages to be signed with a code-signing certificate chaining up to a trusted root authority in the Windows certificate store. Because the build pipeline currently signs with a self-signed certificate (CN=HymnsForWorshipCert_v2), Windows blocks side-loading unless the end user manually installs the certificate into their Trusted Root Certification Authorities or Trusted People store.

Relevant Codebase Touchpoints

  • packages/sfw_desktop/pubspec.yaml:
    • msix_config: Defines publisher as CN=HymnsForWorshipCert_v2 and install_certificate: false.
  • packages/sfw_website/lib/pages/download_page.dart:
    • Lines 73–85: Exposes both slides-for-worship-windows-x64-setup.exe (Inno Setup) and slides_for_worship_x64.msix. Users clicking the .msix download experience the App Installer certificate error.
  • packages/sfw_website/lib/api/downloads_api.dart:
    • Handles routing and serving of both .msix and .exe downloads.
  • packages/sfw_desktop/windows/installer/inno_setup.iss:
    • Compiles the standalone Inno Setup .exe installer (slides-for-worship-windows-{#AppArch}-setup.exe), which installs normally without App Installer certificate enforcement.
  • .gitea/workflows/release.yml:
    • Builds and packages Windows releases via flutter-build-windows.

Recommended Remediation Steps

  1. Immediate User Recommendation: Guide users to download the Windows x64 Setup (.exe) installer (slides-for-worship-windows-x64-setup.exe), which installs cleanly via Inno Setup without triggering the MSIX App Installer trust block.
  2. Website Adjustment (packages/sfw_website/lib/pages/download_page.dart):
    • Highlight the Inno Setup .exe as the recommended primary installer.
    • De-emphasize, remove, or annotate the .msix download option with installation notes until trusted signing is configured.
  3. Desktop Packaging (packages/sfw_desktop/pubspec.yaml):
    • If self-signed MSIX distribution is retained, consider setting install_certificate: true to generate certificate helper scripts for sideloading.
  4. Long-Term Code Signing:
    • Integrate a trusted code-signing certificate (such as Microsoft Trusted Signing / Azure Code Signing or SignPath Foundation for open-source projects) in the CI release workflow (.gitea/workflows/release.yml), or distribute the MSIX package via the Microsoft Store where Microsoft provides root trust.