microsoft / msix-packaging

MSIX SDK
MIT License
963 stars 163 forks source link

[BUG] Windows Services installed via MSIX become corrupted and can't start after package servicing #587

Closed skywall-ben closed 4 months ago

skywall-ben commented 1 year ago

Project MSIX SDK

Describe the bug Hi, I am a developer with skywall.net, a product that uses MSIX for packaging. On Windows, our product consists of two Windows Services, which we create via AppxManifest.xml in our MSIX package. The manifest is included here in case we are doing anything obviously incorrect. However, our product has been running fine on MSIX up to this point for about a year now, leading us to think something has changed behind the scenes with the MSIX framework or AppX Deployment Service.

Recently we've been observing an issue where after a while running on a user's machine, the services will no longer start, saying "error 87: parameter incorrect" in Service Control Manager. This seems to occur after the package is serviced. We do not have auto-update set up for the package, so it is curious that the package is serviced as though it was going to receive updates.

To Reproduce Steps to reproduce the behavior: Install product, and conduct normal usage of the computer until the AppX Deployment Service takes the package down for servicing, after which the services will not start.

Expected behavior

  1. AppX Deployment Server should not take the package down for servicing without any package auto update settings
  2. AppX Deployment Server package servicing should not corrupt the services.

Platform Windows 11 build 22621.1848

Additional context Attached are the AppX log files obtained from a customer machine where the error occurred; they show initial installation of version 1.0.0.0, and then manual upgrades to 1.0.0.1 and 1.0.0.2. The services started correctly after each of these upgrades, and there were no changes to the manifest in any of them. Package servicing occurs on the 29th without any updates being installed or supplied, after which the services became corrupt on the user's machine, and would not start.

log.txt

AppxManifest.txt

anarvekar-msft commented 10 months ago

This issue doesn't quite belong in this repository, but I asked internally about it and the recommendation is to file a bug through Feedback Hub with the repro steps to have better traction. It will also help if the registries under Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\ are shared