microsoft / Microsoft-Win32-Content-Prep-Tool

A tool to wrap Win32 App and then it can be uploaded to Intune
963 stars 202 forks source link

IntuneWinAppUtil.exe crashes the whole terminal without any error message displayed #108

Closed GUILLEMAUDBenoitZeendoc closed 10 months ago

GUILLEMAUDBenoitZeendoc commented 11 months ago

Hi,

I'm trying to package Git for deployment via Intune, but the packaging of the installer fails. It completely crashes the terminal, and no error message is displayed (or I don't have the time to notice it before the terminal crashes.

Installer I'm trying to package : https://github.com/git-for-windows/git/releases/download/v2.42.0.windows.2/Git-2.42.0.2-64-bit.exe Command-line used : .\IntuneWinAppUtil.exe -c "C:\Users\XXX\Downloads\IntuneWinAppUtil\Git\" -s "Git-64-bit.exe" -o "C:\Users\XXX\Downloads\IntuneWinAppUtil\out\"

It worked fine for the previous version of the Git installer :-/

I tried in Powershell 7.3.8, and a Command Prompt

Joly0 commented 11 months ago

Happens to me quite often recentely aswell, though somehow only when using pwsh, not when using windows powershell

GUILLEMAUDBenoitZeendoc commented 11 months ago

Happens to me quite often recentely aswell, though somehow only when using pwsh, not when using windows powershell

Weird... I tried in an admin standalone command prompt (not one embedded in Microsoft Terminal, which I used earlier), and it did work 🤷‍♂️

I was not able to find a relevant error message in the event viewer though.

GUILLEMAUDBenoitZeendoc commented 11 months ago

If it can help to troubleshoot, the only difference I can think of between the stand-alone Command Prompt, and the one embedded in Windows Terminal, is the font used. The standalone uses the default one, whereas Terminal is configured to use 'Meslo LGM Nerd Font'

Joly0 commented 11 months ago

Not sure if the reason is the windows terminal. As i have always used the terminal, either with pwsh or powershell and only occasionally had issues with the intune prep tool and as i said, i just tried it with powershell in windows terminal and that worked

Joly0 commented 11 months ago

But weirdly enough, this issue seems to come and go. Just tested again with pwsh in windows terminal and this time it went through no error no crash

Joly0 commented 11 months ago

Btw, i think this might be an issue because of a recent windows update. The latest update broke something with .net framework, which causes powershell to completely crash in a windows sandbox. Thie tool is based on .net framework aswell, so it could be just a coincedence, or this could aslo be the root of the issue

bluvoDK commented 11 months ago

Maybe this trace helps in solving:

***** Path validation summary ** Response Time (ms) Location Deferred srv Symbol search path is: srv Executable search path is: ModLoad: 0000022852fb0000 0000022852fc0000 IntuneWinAppUtil.exe ModLoad: 00007ff96ef50000 00007ff96f167000 ntdll.dll ModLoad: 00007ff95b260000 00007ff95b2cb000 C:\WINDOWS\SYSTEM32\MSCOREE.DLL ModLoad: 00007ff96db30000 00007ff96dbf4000 C:\WINDOWS\System32\KERNEL32.dll ModLoad: 00007ff96c420000 00007ff96c7c6000 C:\WINDOWS\System32\KERNELBASE.dll (3a98.51b0): Break instruction exception - code 80000003 (first chance) ntdll!LdrpDoDebuggerBreak+0x30: 00007ff96f02b824 cc int 3 1:003> g ModLoad: 00007ff96cd30000 00007ff96cde0000 C:\WINDOWS\System32\ADVAPI32.dll ModLoad: 00007ff96e570000 00007ff96e617000 C:\WINDOWS\System32\msvcrt.dll ModLoad: 00007ff96d950000 00007ff96d9f6000 C:\WINDOWS\System32\sechost.dll ModLoad: 00007ff96e720000 00007ff96e837000 C:\WINDOWS\System32\RPCRT4.dll ModLoad: 00007ff95ba70000 00007ff95bb0b000 C:\Windows\Microsoft.NET\Framework64\v4.0.30319\mscoreei.dll ModLoad: 00007ff96d2c0000 00007ff96d31e000 C:\WINDOWS\System32\SHLWAPI.dll ModLoad: 00007ff96b180000 00007ff96b198000 C:\WINDOWS\SYSTEM32\kernel.appcore.dll ModLoad: 00007ff964810000 00007ff96481a000 C:\WINDOWS\SYSTEM32\VERSION.dll ModLoad: 00007ff95a7e0000 00007ff95b184000 C:\Windows\Microsoft.NET\Framework64\v4.0.30319\clr.dll ModLoad: 00007ff96d320000 00007ff96d4cd000 C:\WINDOWS\System32\USER32.dll ModLoad: 00007ff95b9f0000 00007ff95b9fc000 C:\WINDOWS\SYSTEM32\VCRUNTIME140_1_CLR0400.dll ModLoad: 00007ff95b9b0000 00007ff95b9cb000 C:\WINDOWS\SYSTEM32\VCRUNTIME140_CLR0400.dll ModLoad: 00007ff96c2d0000 00007ff96c2f6000 C:\WINDOWS\System32\win32u.dll ModLoad: 00007ff95a640000 00007ff95a70d000 C:\WINDOWS\SYSTEM32\ucrtbase_clr0400.dll ModLoad: 00007ff96db00000 00007ff96db29000 C:\WINDOWS\System32\GDI32.dll ModLoad: 00007ff96c300000 00007ff96c418000 C:\WINDOWS\System32\gdi32full.dll ModLoad: 00007ff96cc10000 00007ff96ccaa000 C:\WINDOWS\System32\msvcp_win.dll ModLoad: 00007ff96c9b0000 00007ff96cac1000 C:\WINDOWS\System32\ucrtbase.dll ModLoad: 00007ff96d280000 00007ff96d2b1000 C:\WINDOWS\System32\IMM32.DLL ModLoad: 00007ff96d5c0000 00007ff96d94a000 C:\WINDOWS\System32\combase.dll (3a98.51b0): Unknown exception - code 04242420 (first chance) ModLoad: 00007ff96e9f0000 00007ff96e9f8000 C:\WINDOWS\System32\psapi.dll ModLoad: 00007ff958f80000 00007ff95a58f000 C:\WINDOWS\assembly\NativeImages_v4.0.30319_64\mscorlib\987f639e2113a820112aca65fb12396c\mscorlib.ni.dll ModLoad: 00007ff96eb00000 00007ff96ec9f000 C:\WINDOWS\System32\ole32.dll ModLoad: 00007ff96d5c0000 00007ff96d94a000 C:\WINDOWS\System32\combase.dll ModLoad: 00007ff96cad0000 00007ff96cb4a000 C:\WINDOWS\System32\bcryptPrimitives.dll ModLoad: 00007ff96ba60000 00007ff96ba7b000 C:\WINDOWS\SYSTEM32\CRYPTSP.dll ModLoad: 00007ff96b140000 00007ff96b175000 C:\WINDOWS\system32\rsaenh.dll ModLoad: 00007ff96ba40000 00007ff96ba4c000 C:\WINDOWS\SYSTEM32\CRYPTBASE.dll ModLoad: 00007ff96bc90000 00007ff96bcb8000 C:\WINDOWS\SYSTEM32\bcrypt.dll ModLoad: 00007ff9586a0000 00007ff9587cf000 C:\Windows\Microsoft.NET\Framework64\v4.0.30319\clrjit.dll (3a98.51b0): CLR exception - code e0434352 (first chance) ModLoad: 00007ff952f10000 00007ff953b2c000 C:\WINDOWS\assembly\NativeImages_v4.0.30319_64\System\4fa015327c8f6de209996c36442169bd\System.ni.dll ModLoad: 00007ff950850000 00007ff9512d6000 C:\WINDOWS\assembly\NativeImages_v4.0.30319_64\System.Core\b8f14768d1564a407e5711fd562b1c66\System.Core.ni.dll ModLoad: 00007ff88e840000 00007ff88ed4e000 C:\WINDOWS\assembly\NativeImages_v4.0.30319_64\WindowsBase\232486d2c4b9ed88caaa564b9b097fd7\WindowsBase.ni.dll ModLoad: 0000022853380000 0000022853392000 System.IO.Compression.dll ModLoad: 00000228533a0000 00000228533b2000 System.IO.Compression.dll CLR:(C:\WINDOWS\Microsoft.Net\assembly\GAC_64\mscorlib\v4.0_4.0.0.0__b77a5c561934e089\mscorlib.dll) Rejecting native image because native image dependency C:\WINDOWS\Microsoft.Net\assembly\GAC_64\mscorlib\v4.0_4.0.0.0__b77a5c561934e089\mscorlib.dll had a different identity than expected CLR:(C:\WINDOWS\Microsoft.Net\assembly\GAC_64\mscorlib\v4.0_4.0.0.0__b77a5c561934e089\mscorlib.dll) Rejecting native image because native image dependency C:\WINDOWS\Microsoft.Net\assembly\GAC_64\mscorlib\v4.0_4.0.0.0__b77a5c561934e089\mscorlib.dll had a different identity than expected CLR:(C:\WINDOWS\Microsoft.Net\assembly\GAC_64\mscorlib\v4.0_4.0.0.0__b77a5c561934e089\mscorlib.dll) Rejecting native image because native image dependency C:\WINDOWS\Microsoft.Net\assembly\GAC_64\mscorlib\v4.0_4.0.0.0__b77a5c561934e089\mscorlib.dll had a different identity than expected CLR:(C:\WINDOWS\Microsoft.Net\assembly\GAC_64\mscorlib\v4.0_4.0.0.0__b77a5c561934e089\mscorlib.dll) Rejecting native image because native image dependency C:\WINDOWS\Microsoft.Net\assembly\GAC_64\mscorlib\v4.0_4.0.0.0__b77a5c561934e089\mscorlib.dll had a different identity than expected ModLoad: 0000022853330000 000002285333a000 System.IO.Compression.FileSystem.dll ModLoad: 0000022853380000 000002285338a000 System.IO.Compression.FileSystem.dll ModLoad: 00007ff96dcf0000 00007ff96e548000 C:\WINDOWS\System32\shell32.dll ModLoad: 00007ff96a040000 00007ff96a932000 C:\WINDOWS\SYSTEM32\windows.storage.dll ModLoad: 00007ff969f00000 00007ff96a03e000 C:\WINDOWS\SYSTEM32\wintypes.dll ModLoad: 00007ff96da00000 00007ff96daf3000 C:\WINDOWS\System32\SHCORE.dll ModLoad: 00007ff88fc10000 00007ff88fc35000 C:\Windows\Microsoft.NET\Framework64\v4.0.30319\clrcompression.dll ModLoad: 00007ff96c200000 00007ff96c226000 C:\WINDOWS\SYSTEM32\profapi.dll (3a98.51b0): CLR exception - code e0434352 (first chance) (3a98.51b0): CLR exception - code e0434352 (first chance) (3a98.51b0): CLR exception - code e0434352 (first chance) ModLoad: 00007ff934e40000 00007ff934f72000 C:\Windows\Microsoft.NET\Framework64\v4.0.30319\diasymreader.dll ModLoad: 000002286d6e0000 000002286d7e4000 image000002286d6e0000 ModLoad: 000002286d7f0000 000002286d8f4000 image000002286d7f0000 (3a98.51b0): CLR exception - code e0434352 (!!! second chance !!!) KERNELBASE!RaiseException+0x6c: 00007ff96c484ffc 0f1f440000 nop dword ptr [rax+rax]

Alledger commented 11 months ago

I have seen this same issue. Works if i run from CMD, but not from Terminal

Done3319 commented 11 months ago

For me it also stopped working from CMD, since Windows build 22621.2428.

Stack Trace:

Exception Info: System.IO.IOException
   at System.IO.__Error.WinIOError(Int32, System.String)
   at System.Console.GetBufferInfo(Boolean, Boolean ByRef)
   at System.Console.get_ForegroundColor()
   at Microsoft.Management.Service.IntuneWinAppUtil.LogUtil.WriteWithForegroundColor(System.ConsoleColor, System.Action)
   at Microsoft.Management.Service.IntuneWinAppUtil.Program.Main(System.String[])
Joly0 commented 11 months ago

Sadly there is no source code available, so no chance dor anyone of us to find out, why this might be happening....

NRL-LEastham commented 11 months ago

If you need to do a workaround on this try this: IntuneWinAppUtil.exe crashes when run in Windows Terminal

BornToBeRoot commented 11 months ago

Same issue on Win 10 22H2 19045.3570

Edit: Tested on Windows Powershell and Windows Termin (PowerShell 7)

rvk-David commented 11 months ago

I've experience just the opposite, INTUNEWINAPPUTIL crashes in cmd but not terminal.

boscorelly commented 11 months ago

I have seen this same issue. Works if i run from CMD, but not from Terminal

happens in every command line tool, in admin or not.

githubpow commented 10 months ago

my workaround is to run the command with the PowerShell console maximized, as mentioned in the issue by [NRL-LEastham]

d-rankin commented 10 months ago

@nikyusof I'm getting the same issue with the new 1.8.5 version if I use Terminal.

I've fallen back to admin CMD instead of the Terminal and this seems to be working for now.

BornToBeRoot commented 10 months ago

@nikyusof we have the same issue with the latest version. If the PowerShell window is hidden or maximized it works...

woodyard commented 9 months ago

+1. This is getting really annoying.

rvk-David commented 9 months ago

I had slightly better results if I removed spaces from the msi package.

From: Henrik Skovgaard @.> Sent: Wednesday, December 20, 2023 12:51 AM To: microsoft/Microsoft-Win32-Content-Prep-Tool @.> Cc: David Kafrissen @.>; Comment @.> Subject: Re: [microsoft/Microsoft-Win32-Content-Prep-Tool] IntuneWinAppUtil.exe crashes the whole terminal without any error message displayed (Issue #108)

+1. This is getting really annoying.

— Reply to this email directly, view it on GitHubhttps://github.com/microsoft/Microsoft-Win32-Content-Prep-Tool/issues/108#issuecomment-1864085063, or unsubscribehttps://github.com/notifications/unsubscribe-auth/A6AXC5TD77OHCLXXJS5Q35TYKKRFRAVCNFSM6AAAAAA6G4HE7GVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNRUGA4DKMBWGM. You are receiving this because you commented.Message ID: @.**@.>>

stutf commented 8 months ago

I also confirm this bug - mine always crashed at 61 or 62 percent. I tried both v1.8.4 and v1.8.5 with same issue. I tried both Powershell and CMD with same issue, both inside the 'Windows Terminal' Maximizing the window fixes the crash in both Powershell and CMD. I'm running W11 23H2.

MrSoapsud commented 8 months ago

Still happening with 1.8.5 on W11 23H2 in Powershell and CMD.

Voljka1 commented 7 months ago

Windows 11 Pro, 23H2, build 26040.1000. IntuneWinAppUtil.exe -v 1.8.5.0

Crashed at 62% in Terminal, cmd.exe, when running from .bat file or just in command line: C:\work\INTUNE\IntuneWinAppUtil.exe -c "C:\work\INTUNE\Notepad++ 8.6.1" -s "npp.8.6.1.Installer.x64.exe" -o "C:\work\INTUNE\Output"

Does not crash, if window are maximized. Just AMAZING. Wow...

Dyana91Elena commented 7 months ago

Windows 11 Pro, 23H2, build 26040.1000. IntuneWinAppUtil.exe -v 1.8.5.0

Crashed at 62% in Terminal, cmd.exe, when running from .bat file or just in command line: C:\work\INTUNE\IntuneWinAppUtil.exe -c "C:\work\INTUNE\Notepad++ 8.6.1" -s "npp.8.6.1.Installer.x64.exe" -o "C:\work\INTUNE\Output"

Does not crash, if window are maximized. Just AMAZING. Wow...

This for me this has worked on a at 13GB app. Thank you :)

The Notepad++ I was able to do it directly from IntuneWinApp Depeds a lot where is the file and where is the output folder