microsoft / winget-cli

WinGet is the Windows Package Manager. This project includes a CLI (Command Line Interface), PowerShell modules, and a COM (Component Object Model) API (Application Programming Interface).
https://learn.microsoft.com/windows/package-manager/
MIT License
23.03k stars 1.43k forks source link

Installing with --disable-interactivity flag with the "Resume" experimental feature enabled results in "0x8000ffff : Catastrophic failure" #4584

Open aaronliu0130 opened 3 months ago

aaronliu0130 commented 3 months ago

Brief description of your issue

In the latest preview, installing with --disable-interactivity causes winget-cli to fail with a cryptic message

Steps to reproduce

winget install Rustlang.Rust.MSVC --disable-interactivity

Expected behavior

it installs correctly

Actual behavior

it spins for a few seconds and then

An unexpected error occurred while executing the command: 0x8000ffff : Catastrophic failure

Environment

Windows Package Manager (Preview) v1.9.1763-preview
Copyright (c) Microsoft Corporation. All rights reserved.

Windows: Windows.Desktop v10.0.26040.1000
System Architecture: X64
Package: Microsoft.DesktopAppInstaller v1.24.1763.0

Winget Directories
-----------------------------------------------------------------------------------------------------------------------
Logs                               %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\Diag…
User Settings                      %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\sett…
Portable Links Directory (User)    %LOCALAPPDATA%\Microsoft\WinGet\Links
Portable Links Directory (Machine) C:\Program Files\WinGet\Links
Portable Package Root (User)       %LOCALAPPDATA%\Microsoft\WinGet\Packages
Portable Package Root              C:\Program Files\WinGet\Packages
Portable Package Root (x86)        C:\Program Files (x86)\WinGet\Packages
Installer Downloads                %USERPROFILE%\Downloads

Links
---------------------------------------------------------------------------
Privacy Statement   https://aka.ms/winget-privacy
License Agreement   https://aka.ms/winget-license
Third Party Notices https://aka.ms/winget-3rdPartyNotice
Homepage            https://aka.ms/winget
Windows Store Terms https://www.microsoft.com/en-us/storedocs/terms-of-sale

Admin Setting                             State
--------------------------------------------------
LocalManifestFiles                        Enabled
BypassCertificatePinningForMicrosoftStore Disabled
InstallerHashOverride                     Disabled
LocalArchiveMalwareScanOverride           Disabled
ProxyCommandLineOptions                   Disabled
DefaultProxy                              Disabled
Trenly commented 3 months ago

Can you attach the log file from winget install Rustlang.Rust.MSVC --disable-interactivity --verbose --logs ? I'm not able to reproduce the issue?

aaronliu0130 commented 3 months ago

WinGet-2024-06-26-20-20-35.235.log Last lines:

2024-06-26 20:20:40.859 [REPO] Creating checkpoint database directory: C:\Users\aaron\AppData\Local\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\Checkpoints\{4F6073BA-0989-4DD3-8DFC-E3769D31F6CC}
2024-06-26 20:20:40.860 [REPO] Creating new Checkpoint database with version [Latest] at 'C:\Users\aaron\AppData\Local\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\Checkpoints\{4F6073BA-0989-4DD3-8DFC-E3769D31F6CC}\checkpoints.db'
2024-06-26 20:20:40.873 [REPO] Adding checkpoint [automatic]
2024-06-26 20:20:40.877 [REPO] Setting checkpoint data [0]
2024-06-26 20:20:40.882 [REPO] Setting checkpoint data [1]
2024-06-26 20:20:40.886 [REPO] Setting checkpoint data [2]
2024-06-26 20:20:40.890 [REPO] Setting checkpoint data [2]
2024-06-26 20:20:40.894 [FAIL] C:\__w\1\s\external\pkg\src\AppInstallerCLICore\Argument.cpp(430)\WindowsPackageManager.dll!00007FF99FB7D0F6: (caller: 00007FF99FB7AA5A) Exception(1) tid(ac28) 8000FFFF Catastrophic failure

2024-06-26 20:20:40.896 [CLI ] Caught wil::ResultException: C:\__w\1\s\external\pkg\src\AppInstallerCLICore\Argument.cpp(430)\WindowsPackageManager.dll!00007FF99FB7D0F6: (caller: 00007FF99FB7AA5A) Exception(1) tid(ac28) 8000FFFF Catastrophic failure
aaronliu0130 commented 2 months ago

Maybe related to my experimental features:

Feature                  Status   Property             Link
-------------------------------------------------------------------------------------
Direct MSI Installation  Enabled  directMSI            https://aka.ms/winget-settings
Resume                   Enabled  resume               https://aka.ms/winget-settings
Configuration Schema 0.3 Disabled configuration03      https://aka.ms/winget-settings
Configure Self Elevation Disabled configureSelfElevate https://aka.ms/winget-settings
Configure Export         Disabled configureExport      https://aka.ms/winget-settings
Index V2                 Enabled  indexV2              https://aka.ms/winget-settings
soredake commented 2 months ago

@aaronliu0130 I think it's the "resume" feature causing this, disabling it makes winget work fine with --disable-interactivity

aaronliu0130 commented 2 months ago

@Trenly Is there some label or issue we should link?