MSIX Web Installer not working - Error in parsing the app package

1.3k views Asked by At

I have been all over the other threads about this question but nothing seems to fix my problem. No matter what I do, my .appinstaller doesn't work. I keep getting : Error in parsing the app package.

First off let me say I can access both the .appinstaller file and the .appxbundle file using the direct URLs. Also, I am able to install using .appxbundle and I have a signed certificate. I also tried doing the loopback exemption but that didnt work either. Here is the XML to my .appinstaller

<?xml version="1.0" encoding="utf-8"?>
<AppInstaller
    Uri="http://dev.xxxxxx.com/MSIXPrototype/HelloWorldPackage.appinstaller"
    Version="1.0.7.0" xmlns="http://schemas.microsoft.com/appx/appinstaller/2017/2">
    <MainBundle
        Name="xxxx"
        Version="1.0.7.0"
        Publisher="CN=my_cert"
        Uri="http://dev.xxxxxx.com/MSIXPrototype/HelloWorldPackage_1.0.7.0_x64.appxbundle" />
    <UpdateSettings>
        <OnLaunch
            HoursBetweenUpdateChecks="0" />
    </UpdateSettings>
</AppInstaller>

In addition, I have added all the MIME types to my apache httpd.conf file as such :

    AddType application/appinstaller .appinstaller
    AddType application/msixbundle .msixbundle
    AddType application/appxbundle .appxbundle
    AddType application/msix .msix
    AddType application/appx .appx 

I would appreciate any help on this. Thanks!

2

There are 2 answers

3
Bogdan Mitrache On

Well, lately I've seen all kinds of strange and similar parsing errors or simply the OS ignoring settings from the XML.

For your case, I've seen only two solutions that worked:

  1. Try a restart of the machine. I know, it's not the advice you would expect but it worked way too many times for others on the MSIX Tech community, so I am not excluding this solution.

  2. Make sure that your URIs don't contain any blank spaces. We had this problem during some internal tests and the OS simply said the .appinstaller file is corrupt and failed to parse it, even if the blank space from the URI was properly escaped ("%20") and the browser was loading it correctly.

0
viraptor On

There's a rarely mentioned requirement for hosting which can cause this error. Your web server (and/or all the loadbalancers / caches in front) has to support Range headers in the request.

This means you can't host your app installer on (for example) Netlify and many other providers. Mentioned here in context of S3.