Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

winget silent termination/exit: no stdout/stderror output, 0 output #5098

Open
inoperable opened this issue Dec 27, 2024 · 9 comments
Open
Labels
Issue-Bug It either shouldn't be doing this or needs an investigation. Needs-Author-Feedback Issue needs attention from issue or PR author

Comments

@inoperable
Copy link

Brief description of your issue

No error or any kind of feeback to the user.
Is Winget going the MS usual style of meaningful feedback?

Steps to reproduce

Winget doesnt output any useful information and just exits without anything.

Expected behavior

I want to have some meaningful error message, not the usual Windows behaviour where processes exit without any kind of output or with some useless 0x0800RANDOM code - the usual

Actual behavior

Image

Environment

Winget 1.10.40
windows 10.0.19045.4651
@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs-Triage Issue need to be triaged label Dec 27, 2024
@inoperable
Copy link
Author

ModLoad: 00007ff9`43e20000 00007ff9`43ebe000   C:\windows\system32\uxtheme.dll
onecore\windows\core\console\open\src\interactivity\win32\systemconfigurationprovider.cpp(181)\conhost.exe!00007FF6DD0F434E: (caller: 00007FF6DD0F4C64) LogHr(1) tid(3158) 80004005 Unspecified error
onecore\windows\core\console\open\src\renderer\gdi\state.cpp(243)\conhost.exe!00007FF6DD0F6736: (caller: 00007FF6DD0F885F) LogHr(2) tid(163c) 80004005 Unspecified error
ModLoad: 00007ff9`47b10000 00007ff9`47c24000   C:\windows\System32\MSCTF.dll
ModLoad: 00007ff9`47290000 00007ff9`4735d000   C:\windows\System32\OLEAUT32.dll
onecore\windows\core\console\open\src\renderer\gdi\invalidate.cpp(207)\conhost.exe!00007FF6DD11E7C6: (caller: 00007FF6DD0FC07D) ReturnHr(1) tid(163c) 80004005 Unspecified error
onecore\windows\core\console\open\src\renderer\gdi\invalidate.cpp(162)\conhost.exe!00007FF6DD11E771: (caller: 00007FF6DD109F53) ReturnHr(2) tid(163c) 80004005 Unspecified error
onecore\windows\core\console\open\src\renderer\gdi\invalidate.cpp(225)\conhost.exe!00007FF6DD11E78A: (caller: 00007FF6DD109F53) ReturnHr(3) tid(163c) 80004005 Unspecified error
onecore\windows\core\console\open\src\renderer\gdi\invalidate.cpp(78)\conhost.exe!00007FF6DD11E7A3: (caller: 00007FF6DD109F53) ReturnHr(4) tid(163c) 80004005 Unspecified error
onecore\windows\core\console\open\src\renderer\base\renderer.cpp(225)\conhost.exe!00007FF6DD124B1D: (caller: 00007FF6DD10A3C0) LogHr(3) tid(163c) 80004005 Unspecified error
onecore\windows\core\console\open\src\renderer\gdi\invalidate.cpp(207)\conhost.exe!00007FF6DD11E7C6: (caller: 00007FF6DD0FC07D) ReturnHr(5) tid(163c) 80004005 Unspecified error
onecore\windows\core\console\open\src\renderer\gdi\invalidate.cpp(162)\conhost.exe!00007FF6DD11E771: (caller: 00007FF6DD109F53) ReturnHr(6) tid(163c) 80004005 Unspecified error
onecore\windows\core\console\open\src\renderer\gdi\invalidate.cpp(225)\conhost.exe!00007FF6DD11E78A: (caller: 00007FF6DD109F53) ReturnHr(7) tid(163c) 80004005 Unspecified error
onecore\windows\core\console\open\src\renderer\gdi\invalidate.cpp(78)\conhost.exe!00007FF6DD11E7A3: (caller: 00007FF6DD109F53) ReturnHr(8) tid(163c) 80004005 Unspecified error
onecore\windows\core\console\open\src\renderer\base\renderer.cpp(225)\conhost.exe!00007FF6DD124B1D: (caller: 00007FF6DD10A3C0) LogHr(4) tid(163c) 80004005 Unspecified error
onecore\windows\core\console\open\src\renderer\gdi\invalidate.cpp(207)\conhost.exe!00007FF6DD11E7C6: (caller: 00007FF6DD0FC07D) ReturnHr(9) tid(163c) 80004005 Unspecified error
onecore\windows\core\console\open\src\renderer\gdi\invalidate.cpp(162)\conhost.exe!00007FF6DD11E771: (caller: 00007FF6DD109F53) ReturnHr(10) tid(163c) 80004005 Unspecified error
onecore\windows\core\console\open\src\renderer\gdi\invalidate.cpp(225)\conhost.exe!00007FF6DD11E78A: (caller: 00007FF6DD109F53) ReturnHr(11) tid(163c) 80004005 Unspecified error
onecore\windows\core\console\open\src\renderer\gdi\invalidate.cpp(78)\conhost.exe!00007FF6DD11E7A3: (caller: 00007FF6DD109F53) ReturnHr(12) tid(163c) 80004005 Unspecified error
onecore\windows\core\console\open\src\renderer\base\renderer.cpp(225)\conhost.exe!00007FF6DD124B1D: (caller: 00007FF6DD10A3C0) LogHr(5) tid(163c) 80004005 Unspecified error
ModLoad: 00007ff9`2a380000 00007ff9`2a42c000   C:\windows\SYSTEM32\TextShaping.dll
ModLoad: 00007ff9`2eb40000 00007ff9`2edda000   C:\windows\WinSxS\amd64_microsoft.windows.common-controls_6595b64144ccf1df_6.0.19041.4355_none_60b8b9eb71f62e16\comctl32.DLL

Unspecified error - that's so useful

@inoperable
Copy link
Author

C:__w\1\s\external\pkg\src\AppInstallerCommonCore\Settings.cpp(309)\WindowsPackageManager.dll!00007FF90025E6F3: (caller: 00007FF9002897D4) Exception(1) tid(22d0) 800F024B The hash for the file is not present in the specified catalog file. The file is likely corrupt or the victim of tampering.
(32c4.22d0): C++ EH exception - code e06d7363 (first chance)

@denelon
Copy link
Contributor

denelon commented Dec 27, 2024

What are you trying to do?

In looking at the screenshot, running winget.exe without any arguments the client would return with an error as opposed to a "0" success, but it would provide the default "--help" output.

The second instance of running winget has no command, but the "--version" argument should provide the current installed version.

The third instance shows passing "--config" as an argument, but that is not a supported argument.

@microsoft-github-policy-service microsoft-github-policy-service bot removed the Needs-Triage Issue need to be triaged label Dec 27, 2024
@inoperable
Copy link
Author

Thank you, but what exactly are you trying to say? As you can see, its silently crashing without any output, at this point it doesn't matter what I want to do - because it's not executing any command, just outputs a warning if a non-existing option/flag is used.

Is that a normal behavior?

@inoperable
Copy link
Author

So, some obfuscated AppInstaller check fails, with the usual obfuscation and silently craps out, which, in terms craps out winget- but it does so in the same fashion.

It starting to be a habit of MS hyadra-oss to be intertwined with not-oss, but poisoning the overall stack with the usual behavior.

@florelis
Copy link
Member

If there is any error, winget generally reports it.
If it isn't reporting the error, that is a bug and not something intentional. It may be crashing immediately when the error happens (e.g. if we dereference a null pointer without checking it), or we missed catching a possible exception. Either way we can improve the handling of that specific error once we identify it.

C:__w\1\s\external\pkg\src\AppInstallerCommonCore\Settings.cpp(309)\WindowsPackageManager.dll!00007FF90025E6F3: (caller: 00007FF9002897D4) Exception(1) tid(22d0) 800F024B The hash for the file is not present in the specified catalog file. The file is likely corrupt or the victim of tampering.

So it is failing while reading one of the secure settings. I'm not familiar with that part of the code so I would have to do some digging. @yao-msft / @JohnMcPMS do you know what this error means?

Image

I can't help but notice that you're running winget.exe directly from a directory. How did you set that up?
A normal installation would have it somewhere in the WindowsApps folder, and you would use the App Execution Alias that gets added to your path automatically.

@florelis
Copy link
Member

For why there is no error message for this:

At the top level, right after we parse the command line argument (things work up to this point), we do some argument validation. The argument validation checks that none of the arguments is blocked by admin settings, which of course requires instantiating the admin settings. AdminSettingsInternal instantiates a Settings::Stream which opens the settings container, which ultimately ends in the SecureSettingsContainer that is throwing the exception. No point of that stack catches the exception, so it crashes. We need to add a catch somewhere in there, just need to think of the right level to do it

@denelon
Copy link
Contributor

denelon commented Dec 27, 2024

What happens if you run winget --info rather than ./winget.exe in the directory with the executable?

@denelon denelon added Issue-Bug It either shouldn't be doing this or needs an investigation. Needs-Author-Feedback Issue needs attention from issue or PR author labels Dec 27, 2024
@jmux
Copy link

jmux commented Dec 28, 2024

Well. It's a good thing I have a strong backup procedure, because I just lost my two primary workstations to WinGet, Windows Store, Windows Apps, and every other cascading service/app/crap that failed after. None of the restore/repair solutions helped. I phased back versions, but the OS drive is trashed, corrupted, and is now permission hell.

I'm data-shredding every last bit of MS code and never touching this shit again.
After 29 years, I think I've finally had enough.
Enjoy the masochism folks.
Image

PS C:\Windows> sfc /scannow
Beginning system scan.  This process will take some time.
Beginning verification phase of system scan.
Verification 100% complete.
Windows Resource Protection did not find any integrity violations.

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Bug It either shouldn't be doing this or needs an investigation. Needs-Author-Feedback Issue needs attention from issue or PR author
Projects
None yet
Development

No branches or pull requests

4 participants