electron-userland / electron-wix-msi

:dvd: Create traditional MSI installers for your Electron app
MIT License
319 stars 93 forks source link

Stub executable mysteriously removed after update installation #178

Closed gregcotten closed 8 months ago

gregcotten commented 8 months ago

I've successfully deployed my app (many many times over) using 5.0.0 of this repo. Updates have been served via MSI installers - no delta updates or anything like that.

I've recently tried to release a new version of my app using 5.1.2, and it seems the new MSI (created with 5.1.2) now completely removes the existing (installed) stub executable and doesn't replace it. The desktop shortcut also fails. Any thoughts?

Installing the new MSI from scratch (after uninstalling the old app) works fine - the stub executable is correctly installed.

gregcotten commented 8 months ago

OK some progress on understanding the bug.

Current deployment of our app 1.5.19 is: appVersion (aka "Product Version" in Windows file metadata): 1.5.19(.0) buildVersion (aka "File Version" in Windows file metadata: 642(.0.0.0)

The (attempted) updated deployment of our app 1.6.0 is: appVersion (aka "Product Version" in Windows file metadata): 1.6.0(.0) buildVersion (aka "File Version" in Windows file metadata: 678(.0.0.0)

For the 1.6.0 MSI installer (created by self-hosted Windows 10 runner, Wix 3.14 installed) - it seems (for the stub executable only) the "File Version" is being incorrectly set as 1.6.0.0 (instead of 678.0.0.0) and is therefore skipped by the MSI installer (since a "higher versioned" but older stub executable with File Version "642.0.0.0" existed already). The file version is set correctly on the actual executable inside app-1.6.0

Using msiexec with the /L*vx C:\Path\To\Log.log flag to log everything, I get this somewhat helpful error: Disallowing installation of component: {ACE2DF3D-B892-4ABC-BAAA-9F15DDE65CF0} since the same component with higher versioned keyfile exists where the ID of this component is the stub executable!

If I create a MSI for the identical project on my personal Windows 11 machine (also Wix 3.14 installed) there are no issues and the stub executable's File Version has the right version.

gregcotten commented 8 months ago

closing as I've pinned down the issue to this: https://github.com/electron-userland/electron-wix-msi/issues/179