App Crash or Freeze, 'Entry point not found' for UWP builds from certification server.... RRS feed

  • General discussion

  • The last three days I was working hard to solve a problem, submitting our UWP app to the store. Now I know why it was not working and I want to make my knowledge public. Maybe it will help someone.


    • We have an UWP app targeting Windows 10 fall creators update which was published successfully to the sore previously.
    •  A new version fails the certification process with “10.4.2 App Crash or Freeze”
    • Debug build of the app is starting and working on our developer machine
    • Side loadable release builds are also starting and working on our build and test machines
    • The “.appxbundle” – package created by the “build for store” process contained in the AppPackages/AppName*version*_Test folder is also loading without troubles. (This package contains our code compiled with the native tool chain)
    • But the “.appxbundle” – package extracted from the *.appxupload  (this is the zip-file uploaded to the store) fails at startup after it was side loaded on my test machine. (for side loading you need to install the *.cer file contained in the AppPackages/AppName*version*_Test folder to your system cert store unter trusted roots) OK. Something must be wrong with the uploaded “.appxupload ” package. WRONG! The “.appxbundle” contained in the “.appxupload ” contains the .net dlls and not the compiled code from the native tool chain. This package does always crash after side loading it. So this crash is not the problem reported by the certification process!

    Now things are very complicated:

    -          The uploaded “.appxupload” package contains the .NET dlls which are compiled via the native tool chain on the Microsoft certification server which generates a package which fails at startup. The same build process on my developer machine with the locally installed native tool chain generates perfectly loadable builds. Unfortunately, there are no more details available from the certification process. Also Microsoft support could not help me. They build a package which fails without details and I can not download the build package for debugging. That’s bad!

    -          Fortunately, I have found a way to use the Microsoft certification build server to get a downloadable UWP package for debugging. I used test-flight. The test-flight certification process builds the same package internally. Fortunately, it does not try to start the build as part of the certification process. So I was able to install the test flight package on my local machine for debugging. And it crashed at startup! Yeah! Using some gflags and VS I was able to find, that the entry point for “FormatMessage” was not found.

    -          Entry point for “FormatMessage” not found: After some searching I found this https://github.com/AArnott/pinvoke/commit/2843cb918562050fd4e6df1f3fca0c72f4812eb4 and yes, I was using this library with the old version. The problem here was, that for some VS releases the “C:\Program Files (x86)\Windows Kits\10\App Certification Kit\SupportedAPIs-x??.xml” file contains some entry point definitions for FormatMessage which does not exist. So the native tool chain compiles against the wrong entry point which causes the app crash at startup.  But why was it working on my local machine? This is because I am using Visual Studio 15.7.1 which has already fixed the problem. Unfortunately, the build infrastructure of Microsoft which is used for the UWP certification process (at least for our targeted OS version: Windows 10 falls creators update) uses the buggy version of the SupportedAPIs-x??.xml file which generates broken packages for our UWP app. After I used the latest version of PInvoke.Kernel32.dll  which contains a workaround for the problem, all was fine. (If you are also using PInvoke.Kernel32.dll please install the nuget-package directly to the UWP-project, automatic references added by other nuget-packages like PCLCrypto add an older version, verify the version of PInvoke.Kernel32.dll in your bin/x86/Debug build output folder, it should be at least

    So, in short:

    -          The Microsoft Build server for submitted UWP packages is using a buggy “C:\Program Files (x86)\Windows Kits\10\App Certification Kit\SupportedAPIs-x??.xml” file, which allows bindings to non-existing function entry points causing app crashes for the certification process. Local release builds created with the native toolchain of VS 15.7.1 are working. Here the SupportedAPIs-x??.xml is fixed!

    1. è Microsoft should fix the SupportedAPIs-x??.xml for their build environment!
    2. è Microsoft should give us the possibility, to download created app packages for failed certification processes for further debugging.

    I hope this helps!



    • Edited by tle.ax Friday, May 18, 2018 8:35 AM
    • Changed type Mattew Wu Monday, May 21, 2018 8:34 AM better type
    Friday, May 18, 2018 7:04 AM

All replies

  • Hi Thomas,

    Thank you very much for your sharing the experience.

    For your suggestion to Microsoft, you could post it at Windows Developer User Voice: https://wpdev.uservoice.com/forums/110705-universal-windows-platform.

    Best regards,

    Mattew Wu

    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Monday, May 21, 2018 7:59 AM