Troubleshoot MSIX launch issue

%3CLINGO-SUB%20id%3D%22lingo-sub-1038032%22%20slang%3D%22en-US%22%3ETroubleshoot%20MSIX%20launch%20issue%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1038032%22%20slang%3D%22en-US%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F73899%22%20target%3D%22_blank%22%3E%40John%20Vintzel%3C%2FA%3E%26nbsp%3B%20we%20have%20been%20experimenting%20with%20lots%20of%20msix%20packages%20recently%20and%20found%20couple%20of%20them%20does%20not%20launch%20at%20all%20.%20We%20could%20face%20similar%20issue%20in%20production%20and%20wanted%20to%20check%20what%20all%20troubleshooting%20steps%20have%20been%20recommended%20%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIs%20there%20any%20command%20to%20get%20inside%20container%20and%20try%20to%20launch%20main%20exe%20within%20it%20%3F%20We%20could%20do%20similar%20thing%20in%20AppV%20.%20Any%20help%2Fdirection%20%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1039545%22%20slang%3D%22en-US%22%3ERe%3A%20Troubleshoot%20MSIX%20launch%20issue%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1039545%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F144842%22%20target%3D%22_blank%22%3E%40Amit%20Kumar%3C%2FA%3E%26nbsp%3Bhere%20are%20more%20details%20on%20how%20to%20launch%20other%20processes%20inside%20the%20container%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2FMSIX%2FMSIX-Runtime-Support-debugging-using-external-launch%2Fidi-p%2F289497%22%20target%3D%22_blank%22%3Ehttps%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2FMSIX%2FMSIX-Runtime-Support-debugging-using-external-launch%2Fidi-p%2F289497%3C%2FA%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1041198%22%20slang%3D%22en-US%22%3ERe%3A%20Troubleshoot%20MSIX%20launch%20issue%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1041198%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F144842%22%20target%3D%22_blank%22%3E%40Amit%20Kumar%3C%2FA%3E%20There%20are%20a%20lot%20of%20things%20that%20might%20go%20wrong%2C%20and%20you%20may%20need%20to%20try%20multiple%20approaches.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThe%20simplest%20is%20a%20Process%20Monitor%20trace.%26nbsp%3B%20You'll%20easily%20be%20able%20to%20see%20if%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3Ethe%20app%20launches%20at%20all%3C%2FLI%3E%0A%3CLI%3Eissues%20with%20finding%20dlls%3C%2FLI%3E%0A%3CLI%3Eissues%20with%20the%20app%20not%20seeing%20files%20in%20the%20VFS%5CAppData%20or%20VFS%5CLocalAppData%20folder.%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3EProcmon%20can%20be%20intimidating%20if%20you%20are%20not%20used%20to%20it%2C%20it%20is%20monitoring%20not%20just%20your%20app%20but%20everything%20unless%20you%20learn%20to%20filter%20things%20out.%20So%20for%20MSIX%20we%20have%20the%20PSF%20using%20the%20PsfTraceFixup%20shim.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIf%20you%20package%20using%20the%20Psf%20inside%2C%20you%20launch%20a%20PsfLaunch%20exectable%20along%20with%20a%20config.json%20file%20to%20have%20it%20run%20your%20exectable%20and%20inject%20the%20TraceFixup%20into%20the%20process.%26nbsp%3B%20This%20fixup%20doesn't%20modify%20the%20app%20behavior%20but%20will%20trace%20out%20the%20most%20important%20file%20and%20registry%20calls.%26nbsp%3B%20You%20can%20an%20option%20to%20have%20it%20output%20to%20the%20debug%20console%20(which%20you%20read%20via%20a%20tool%20like%20SysInternals%20DbgView)%2C%20or%20to%20a%20private%20event%20log%20(which%20you%20read%20with%20a%20GUI%20tool%20called%20PsfMonitor%20that%20is%20part%20of%20the%20Psf).%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EI%20prefer%20to%20trace%20with%20PsfTrace%20as%20it%20is%20recording%20the%20actual%20request%20by%20the%20application%20(intercepting%20at%20the%20Windows%20API%20layer)%20before%20other%20forms%20of%20intercepts%2C%20such%20as%20the%20Psf%20Runtime%2C%20get%20involved.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThe%20command%20line%20approach%20is%20a%20Powershell%20command%20and%20requires%20(at%20least%20currently)%20that%20you%20enable%20Developer%20Mode%20on%20the%20PC.%26nbsp%3B%20While%20I%20loved%20that%20approach%20under%20App-V%20debugging%2C%20I%20find%20I%20really%20need%20the%20tracing%20to%20figure%20out%20what%20is%20wrong%20unless%20the%20issue%20is%20really%20simple.%26nbsp%3B%20Advanced%20Installer%20Hover%20is%20a%20convenient%20way%20to%20do%20this%20rather%20than%20the%20PowerShell%2C%20but%20it%20also%20needs%20Developer%20Mode%20to%20work.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EI'll%20note%20for%20completeness%2C%20I%20always%20use%20MSIX%20Commander%20to%20get%20me%20an%20explorer%20in%20the%20package%20folder%20so%20that%20I%20can%20easily%20see%20the%20structure.%26nbsp%3B%20This%20isn't%20an%20explorer%20running%20inside%20the%20container%2C%20but%20I%20can%20see%20the%20files%20and%20look%20inside%20them%20as%20long%20as%20I%20don't%20want%20to%20change%20them.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1045909%22%20slang%3D%22en-US%22%3ERe%3A%20Troubleshoot%20MSIX%20launch%20issue%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1045909%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F149589%22%20target%3D%22_blank%22%3E%40Tim%20Mangan%3C%2FA%3EThanks%20for%20sharing%20this%20information%20.%20I%20will%20give%20an%20attempt%20to%20use%20psftrace.%3C%2FP%3E%3C%2FLINGO-BODY%3E
Occasional Contributor

Hi @John Vintzel  we have been experimenting with lots of msix packages recently and found couple of them does not launch at all . We could face similar issue in production and wanted to check what all troubleshooting steps have been recommended ?

 

Is there any command to get inside container and try to launch main exe within it ? We could do similar thing in AppV . Any help/direction ?

3 Replies

@Amit Kumar here are more details on how to launch other processes inside the container:

 

https://techcommunity.microsoft.com/t5/MSIX/MSIX-Runtime-Support-debugging-using-external-launch/idi...

@Amit Kumar There are a lot of things that might go wrong, and you may need to try multiple approaches.

 

The simplest is a Process Monitor trace.  You'll easily be able to see if

  • the app launches at all
  • issues with finding dlls
  • issues with the app not seeing files in the VFS\AppData or VFS\LocalAppData folder.

Procmon can be intimidating if you are not used to it, it is monitoring not just your app but everything unless you learn to filter things out. So for MSIX we have the PSF using the PsfTraceFixup shim.

 

If you package using the Psf inside, you launch a PsfLaunch exectable along with a config.json file to have it run your exectable and inject the TraceFixup into the process.  This fixup doesn't modify the app behavior but will trace out the most important file and registry calls.  You can an option to have it output to the debug console (which you read via a tool like SysInternals DbgView), or to a private event log (which you read with a GUI tool called PsfMonitor that is part of the Psf).

 

I prefer to trace with PsfTrace as it is recording the actual request by the application (intercepting at the Windows API layer) before other forms of intercepts, such as the Psf Runtime, get involved.

 

The command line approach is a Powershell command and requires (at least currently) that you enable Developer Mode on the PC.  While I loved that approach under App-V debugging, I find I really need the tracing to figure out what is wrong unless the issue is really simple.  Advanced Installer Hover is a convenient way to do this rather than the PowerShell, but it also needs Developer Mode to work.

 

I'll note for completeness, I always use MSIX Commander to get me an explorer in the package folder so that I can easily see the structure.  This isn't an explorer running inside the container, but I can see the files and look inside them as long as I don't want to change them.

@Tim ManganThanks for sharing this information . I will give an attempt to use psftrace.