microsoft / microsoft/msix-packaging
Add-ProvisionedAppxPackage Failed for Sparse Package / Packaing with External Location
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 1.1k
- Forks
- 193
- Avg merge
- 2h 16m
- Merged PRs (30d)
- 2
Description
A user is trying to install our app and is running into an error regarding Add-ProvisionedAppxPackage.
Some guidance would be much appreciated as AI can't seem to figure out how to reproduce this bug in a VM.
wix installer commands being run
Add-AppxPackage -Stage '[INSTALLFOLDER]Obscura.msix' -ExternalLocation '[INSTALLFOLDER]';
Add-AppxProvisionedPackage -Online -PackagePath '[INSTALLFOLDER]Obscura.msix' -SkipLicense
msi.log
WixQuietExec64: Add-AppxProvisionedPackage : Add-AppxProvisionedPackage failed. Error code = 0xc1570108
dism.log
2026-09-03 14:08:42, Error DISM DISM Appx Provider: PID=48008 TID=19576 onecore\admin\appmodel\utilities\provisionhelper\msixpackageadapter.cpp(773)\AppxProvider.dll!00007FFEFCA3AC3F: (caller: 00007FFEFCA38A6A) ReturnHr(1) tid(4c78) C1570108 Msg:[Policy check failed]
- CAppxManager::ResultLoggingCallback
2026-09-03 14:08:42, Error DISM DISM Appx Provider: PID=48008 TID=19576 onecore\admin\appmodel\utilities\provisionhelper\msixpackageadapter.cpp(398)\AppxProvider.dll!00007FFEFCA38AAE: (caller: 00007FFEFCA25FCF) ReturnHr(2) tid(4c78) C1570108 Msg:[Pre-install policy check failed for package 'SovereignEngineering.ObscuraVPN_1.174.0.0_neutral__rxzjtnvhd6q16'.]
- CAppxManager::ResultLoggingCallback
2026-09-03 14:08:42, Error DISM DISM Appx Provider: PID=48008 TID=19576 onecore\admin\appmodel\utilities\provisionhelper\msixpackageadapter.cpp(1820)\AppxProvider.dll!00007FFEFCA3408F: (caller: 00007FFEFCA341F3) ReturnHr(3) tid(4c78) 80070002 The system cannot find the file specified.
Msg:[Failed to get the list of packages to remove]
- CAppxManager::ResultLoggingCallback
2026-09-03 14:08:42, Error DISM DISM Appx Provider: PID=48008 TID=19576 onecore\admin\appmodel\utilities\provisionhelper\msixpackageadapter.cpp(274)\AppxProvider.dll!00007FFEFCA341BF: (caller: 00007FFEFCA39624) ReturnHr(4) tid(4c78) 80070002 The system cannot find the file specified.
Msg:[Failed to deregister main package and get its dependent packages]
- CAppxManager::ResultLoggingCallback
2026-09-03 14:08:42, Warning DISM DISM Appx Provider: PID=48008 TID=19576 onecore\admin\appmodel\utilities\provisionhelper\msixpackageadapter.cpp (74) - (null) [Msg] - Failed to deregister packages. (hr:0x80070002) - CAppxManager::InformationLoggingCallback
2026-09-03 14:08:42, Error DISM DISM Appx Provider: PID=48008 TID=19576 onecore\admin\appmodel\utilities\provisionhelper\msixprovisioningrequest.cpp(671)\AppxProvider.dll!00007FFEFCA26158: (caller: 00007FFEFCA2CF5A) ReturnHr(5) tid(4c78) C1570108 Msg:[Failed to provision package SovereignEngineering.ObscuraVPN_1.174.0.0_neutral__rxzjtnvhd6q16 while processing target type = 0]
- CAppxManager::ResultLoggingCallback
2026-09-03 14:08:42, Error DISM DISM Appx Provider: PID=48008 TID=19576 onecore\admin\appmodel\utilities\provisionhelper\msixprovisioningrequest.cpp(869)\AppxProvider.dll!00007FFEFCA26170: (caller: 00007FFEFCA2CF5A) ReturnHr(6) tid(4c78) C1570108 - CAppxManager::ResultLoggingCallback
2026-09-03 14:08:42, Error DISM DISM Appx Provider: PID=48008 TID=19576 onecore\admin\appmodel\utilities\provisionhelper\msixprovisioningrequest.cpp(671)\AppxProvider.dll!00007FFEFCA2CF79: (caller: 00007FFEFCA2CEDA) ReturnHr(7) tid(4c78) C1570108 - CAppxManager::ResultLoggingCallback
2026-09-03 14:08:42, Error DISM DISM Appx Provider: PID=48008 TID=19576 onecore\admin\appmodel\utilities\provisionhelper\msixprovisioningrequest.cpp(694)\AppxProvider.dll!00007FFEFCA2CE83: (caller: 00007FFEFCA2EFF7) ReturnHr(8) tid(4c78) C1570108 Msg:[Failed to register staged packages.]
- CAppxManager::ResultLoggingCallback
2026-09-03 14:08:42, Error DISM DISM Appx Provider: PID=48008 TID=19576 onecore\admin\appmodel\utilities\provisionhelper\msixprovisioningmanager.cpp(1314)\AppxProvider.dll!00007FFEFCA2F02A: (caller: 00007FFEFC9FA2C3) ReturnHr(9) tid(4c78) C1570108 Msg:[Failed to provision packages.]
- CAppxManager::ResultLoggingCallback
2026-09-03 14:08:42, Error DISM DISM Appx Provider: PID=48008 TID=19576 Failed to initialize package set - CAppxManager::AddAllUserAppxPackageWithOptionalPackagesAndRegionAndStubPackageOptionAndFeatureID(hr:0xc1570108)
2026-09-03 14:08:42, Error DISM API: PID=3144 TID=46720 Call to AddAllUserAppxPackage failed with hr = 0xc1570108 - CAddAppxCommandObject::InternalExecute(hr:0xc1570108)
2026-09-03 14:08:42, Error DISM API: PID=3144 TID=46720 InternalExecute failed - CBaseCommandObject::Execute(hr:0xc1570108)
Google yields the following results when narrowing the search to "AppxProvisionedPackage" "0xc1570108" "Policy check failed"
Our app is self-contained so not sure how it would need a dependency installed on the users' computer.
It's interesting to note that Add-AppxPackage succeeded but not Add-AppxProvisionedPackage. The direction I'm thinking of going with is to require Add-AppxPackage to always succeed but Add-AppxProvisionedPackage is optional. Then in the GUI code, I will add a button to prompt the user to fix the package identity if it's missing.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with windows/wix-msi/Package.wxs at line 109 and review the Add-AppxPackage and Add-AppxProvisionedPackage commands alongside msi.log and dism.log. Reproduce the sparse-package installation failure and determine the conditions behind error 0xc1570108. Done means documenting the cause and confirming whether provisioning can be optional without breaking installation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- powershell
- Domain
- operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Needs clarification
- Newbie friendliness
- 38/100