4

So I'm trying to use the direct app install feature of Windows 10 Creators Update to allow downloading a packaged modern app from the web. The key feature of it is that it will auto update your app by checking back to the same URL of the .appinstaller file.

https://new-file-explorer.firebaseapp.com/ (the page is entirely generated by Visual Studio, no modifications from me)

The problem is that when I click it I just get "Error in parsing the app package."

If I manually download the .msixbundle that's referenced in the .appinstaller file it will work! Yet App Installer itself can't "parse" this package?

Here's the weirdest part: if I use "Add-AppxPackage -Appinstaller" from Powershell and point it towards the .appinstaller URL it will completely work!

The other answers on here do not apply, since they were all related to running it on a local server (I tried it anyways).

I thought this was related to MIME types, but I have set the MIME types as stated in the documentation and yet it still doesn't work. I've verified that by using this URL MIME type checker. I'm at a loss to what is actually causing this.

Here is the .appinstaller file:

<?xml version="1.0" encoding="utf-8"?>
<AppInstaller Uri="https://new-file-explorer.firebaseapp.com/InstallNFE.appinstaller" Version="1.0.9.0" xmlns="http://schemas.microsoft.com/appx/appinstaller/2017/2">
  <MainBundle Name="NewFileExplorer" Version="1.0.9.0" Publisher="CN=david" Uri="https://new-file-explorer.firebaseapp.com/InstallNFE_1.0.9.0_Test/InstallNFE_1.0.9.0_x86_x64.msixbundle" />
  <UpdateSettings>
    <OnLaunch HoursBetweenUpdateChecks="0" />
  </UpdateSettings>
</AppInstaller>

Here's a link to the .msixbundle it appears to be incapable of parsing (as you can see, it works manually downloading it!)

Heaney
  • 53
  • 1
  • 4
  • What's the app installer version and OS build version? Please follow the [Troubleshoot installation issues with the App Installer file](https://learn.microsoft.com/en-us/windows/msix/app-installer/troubleshoot-appinstaller-issues) to do troubleshooting. – Xie Steven Apr 24 '19 at 04:18
  • @XavierXie-MSFT I did follow those instructions. One problem btw is that that link is outdated, it doesn't mention .msix and .msixbundle MIME types- only the old appx. App Installer version is 1.0.30732.0 and the OS version is Windows 10 1809. – Heaney Apr 25 '19 at 15:00
  • My colleagues and I spent a long time trying to reproduce your issue. But we can't reproduce this problem. You could view this test [web page](https://testappinstaller-elvis.azurewebsites.net/). When you click the 'install sample app' link, the app installer will be opened and if you click 'install', it will show a 'certificate' relevant errors. It's normal. Because you have not install the certificate on your machine. We have not got the error like 'Error in parsing the app package'. – Xie Steven Apr 29 '19 at 06:34
  • So, please create a new blank UWP project and try to tell us the complete steps to reproduce your issue. – Xie Steven Apr 29 '19 at 06:35
  • 1
    @XavierXie-MSFT Are you saying you don't see the issue when trying from my website, or you can't reproduce the issue on your own server? Is there any way I can send you my full Visual Studio project? – Heaney May 02 '19 at 18:56
  • I meant that I cannot reproduce the issue on my server. I did not need full project. You just only need to provide a [mcve] and tell me the complete steps(include how you publish the web page and how you host the package directory). – Xie Steven May 04 '19 at 08:46

2 Answers2

6

Thought of putting the solution in case someone else is facing the issue. I also faced the same issue and was able to resolve myself. When opening the Windows 10 .appinstaller file from web, the error "Error in parsing the app package." occurs.

For me the cause was that the links provided in the HTML page index.html generated by Visual Studio was referring to some share location (as my installer location was a file share location) and the installer file was not there. The reason for this is that I didn't do the last step "Copy and Close" of publishing from VS (this step copies the installer from output location to installer location that you provided). Instead of "Copy and Close", I just clicked on another option "Close" and hence the issue.

Garima
  • 81
  • 1
  • 4
1

Just an additional input as i also encountered this issue and spent a whole day of finding the fix.

Let me just copy a line from .appinstaller file of the original poster.

<MainBundle Name="NewFileExplorer" Version="1.0.9.0" Publisher="CN=david" Uri="https://new-file-explorer.firebaseapp.com/InstallNFE_1.0.9.0_Test/InstallNFE_1.0.9.0_x86_x64.msixbundle" />

In this line, it only specify as ".msixbundle" file but the actual file in local folder is ".msixbundle.zip".

After I removed ".zip" from the filename of the file, the issue is gone.