4

I'm trying to use the new updater in the Windows 10 Fall Creators Update to update my UWP app that is distributed outside the Store.

I'm using a .appinstaller file and trigger the install with a link like this: ms-appinstaller:?source=https://xxx.s3.amazonaws.com/xxx.appinstaller

The install of the initial and the updated version both work this way.

However, the update is never installed automatically.

My .appinstaller file:

<?xml version="1.0" encoding="utf-8"?>
<AppInstaller
   xmlns="http://schemas.microsoft.com/appx/appinstaller/2017"
   Version="1.0.77.0" 
   Uri="https://xxx.s3.amazonaws.com/xxx.appinstaller" > 

   <MainBundle 
       Name="4f479232-f509-428e-a58a-65652003c90f"
       Publisher="CN=xxx, O=xxx, L=xxx, C=DE"
       Version="1.0.77.0"
       Uri="https://xxx.s3.amazonaws.com/xxx/Packaging_1.0.77.0_Test/Packaging_1.0.77.0_x86_x64.appxbundle" />
    <UpdateSettings>
         <OnLaunch/>
    </UpdateSettings>
</AppInstaller>

the updated .appinstaller file differs only in the version beeing 1.0.78.0 and the MainBundle-Url pointing to the updated package. All the code signatures are valid.

I have not modified the app in any way for this updater.

Catching the updater connecting with Fiddler was unsuccessful.

I would really appreciate any help with this, as I don't even know how to debug this. Does the App Installer create logs anywhere?

--

PS C:\Users\marvin> Get-AppxPackage -Name 4f479232-f509-428e-a58a-65652003c90f


Name              : 4f479232-f509-428e-a58a-65652003c90f
Publisher         : CN=xxx, O=xxx, L=xxx, C=DE
Architecture      : X64
ResourceId        :
Version           : 1.0.77.0
PackageFullName   : 4f479232-f509-428e-a58a-65652003c90f_1.0.77.0_x64__1mez93s8c8axt
InstallLocation   : C:\Program Files\WindowsApps\4f479232-f509-428e-a58a-65652003c90f_1.0.77.0_x64__1mez93s8c8axt
IsFramework       : False
PackageFamilyName : 4f479232-f509-428e-a58a-65652003c90f_1mez93s8c8axt
PublisherId       : 1mez93s8c8axt
IsResourcePackage : False
IsBundle          : False
IsDevelopmentMode : False
Dependencies      : {4f479232-f509-428e-a58a-65652003c90f_1.0.77.0_neutral_split.scale-100_1mez93s8c8axt,
                    4f479232-f509-428e-a58a-65652003c90f_1.0.77.0_neutral_split.scale-400_1mez93s8c8axt}
IsPartiallyStaged : False
SignatureKind     : Developer
Status            : Ok

EDIT: Since posting this I have found a page describing logs and error codes: https://msdn.microsoft.com/en-us/library/hh973484.aspx# In the AppXDeployment-Server log I see an event that gets logged on every start of my app:

Type: info, DeploymentOperation 31
Message Started deployment UpdateUsingAppInstallerOperation on a
package with main parameter 4f479232-f509-428e-a58a-65652003c90f_1.0.77.0_x64__1mez93s8c8axt 
and Options: 0 and 0. See http://go.microsoft.com/fwlink/?LinkId=235160 
for help diagnosing app deployment issues.

Edit 2: I have created a sample project that shows this issue here: https://github.com/Marv51/appxUpdater

You can download the compiled, signed and packed binary bundles from: https://testingappxupdater.s3.amazonaws.com/index.html

marv51
  • 366
  • 1
  • 11
  • I am also unable to make .appinstaller work. See https://twitter.com/tonyvca/status/921693502722990082 – Tony Oct 22 '17 at 12:48
  • @Tony Install with .appinstaller works here, only the Updater part is not working. But I'm using this for a Desktop Bridge App, so there are no dependencies. – marv51 Oct 23 '17 at 11:28
  • I think that the AppInstaller Version should be 1.0.0.0 – Tony Oct 23 '17 at 17:28
  • Your right, looks like it should be 1.0.0.0. I changed that and retested the updater: Didn't change anything. Thanks anyway. – marv51 Oct 23 '17 at 18:32
  • 1
    I am also having problems with the Updater. It does not update my App. – Tony Oct 23 '17 at 18:37

3 Answers3

3

Here are the detailed steps I followed:

  1. Have a properly constructed AppInstaller file. In my test, Uri element under <AppInstaller> attribute referred to itself.
  2. Install it by using the custom scheme ms-appinstaller:?source=<http://...>
  3. Verify the version that is installed is the one specified in the AppInstaller file.
  4. Modify the AppInstaller file by incrementing the Version element under <AppInstaller> attribute.
  5. Modify the specified app package under the <MainBundle> or <MainPackage> attribute to refer to the new version. Make sure the Name, Version, Publisher all match the elements specified in the app manifest.
  6. Save it and upload to the same location in the web server.
  7. Either wait 24hrs or move your system clock forward by 24hrs. how to change system clock
  8. After 24hrs, launch the app again and close it. On this launch of the app, the update check should be triggered. Upon closing the app, the update will complete successfully.
  9. Launch the app again and this time it should be the new version. Depending on the size of the update, it might time longer for the update operation to complete.
Chait
  • 41
  • 2
  • Good steps explanation!!!! Thank you so much! You are GOD! But I can't find any information about triggering event of updating. Does app contain .appinstaller file into itself for checking and comperation new version via app file (on the server)? Does application packing into itself appinstaller file? How it determine urls for .appinstaller and .appxbundle files? Thank you in advance. – pavel Feb 26 '18 at 11:05
1

@marv51 - Windows 10 deployment service currently only checks for an update once every 24 hours per launch of the app. So, try to launch the app again after 24hrs and the update should be applied once the launched app is closed.

If you don't want to wait, you can forward the system clock 24hrs and launch the app again to trigger the update.

Chait
  • 41
  • 2
  • Does the deployment service log any additional output anywhere? Can I set a Verbose/Debug flag or something? Can I start the process from PowerShell? I waited 24h tried it, no update. I set the clock one day forward, rebooted, started the app, waited 5 min, exited the app, started the app again, same version. EventViewer shows the same UpdateUsingAppInstallerOperation on every start. Nothing more. – marv51 Oct 24 '17 at 20:55
  • Sorry to hear that. There isn't a way to trigger the update process from PowerShell. You can install the .AppInstaller file using PowerShell though. Can you verify that you can manually install that updated .AppInstaller file without any issues? – Chait Oct 25 '17 at 00:22
  • I have verified that the new version installs successfully when triggered manually. – marv51 Oct 25 '17 at 12:23
  • I have created a sample project: https://github.com/Marv51/appxUpdater The signed bundles and the appinstaller files I have uploaded at: https://testingappxupdater.s3.amazonaws.com/index.html – marv51 Oct 25 '17 at 12:24
  • So in your first .AppInstaller file, you are supposed to refer to the second .AppInstaller file. Otherwise, deployment platform wouldn't know where to pick up new version from. – Chait Oct 25 '17 at 20:14
  • To have your app update automatically- in your first .AppInstaller instead of referring to itself, refer to the new .AppInstaller file. This should fix your issue. – Chait Oct 25 '17 at 20:17
  • Oh, I have been replacing the uploaded .appinstaller file after the install with the second .appinstaller (So that if the deployment platform checks the same url it was installed from, it finds a new .appinstaller file). I will try the reference as soon as possible! Thank you very much. – marv51 Oct 25 '17 at 20:18
  • So if you are replacing first .AppInstaller with a newer one and still keeping same filename and just changing app packages that are referenced in it. Then, that should also work. Are you saying that didn't work for you? – Chait Oct 25 '17 at 20:28
  • yes that didn’t work. Tested it here on two machines both running 16299.19. – marv51 Oct 25 '17 at 20:31
  • Should I file a bug somewhere, or have you already taken care of this? – marv51 Oct 28 '17 at 12:56
  • 1
    I verified on my system and was able to see that the update was applied. I will write out more detailed instructions as another answer in this post. Lets see if that helps. – Chait Oct 30 '17 at 22:09
0

I could not get this to work with the Fall Creators Update. However, it is working now in build 17127 with the new tooling from VisualStudio 2017 15.7 Preview 2 and the preview SDK.

The new VisualStudio Preview lets you configure the update URL on package creation. In my inital testing it appears to work without issues.

marv51
  • 366
  • 1
  • 11