microsoft / winget-pkgs

The Microsoft community Windows Package Manager manifest repository
MIT License
8.47k stars 4.36k forks source link

[Package Issue]: Microsoft.VisualStudio.2022.Enterprise fails with "0x8000ffff : Catastrophic failure" #155303

Open exoosh opened 3 months ago

exoosh commented 3 months ago

Please confirm these before moving forward

Category of the issue

Installation issue.

Brief description of your issue

It is shown as an upgrade being available:

C:\>winget upgrade
Name                                             Id                                     Version    Available Source
-------------------------------------------------------------------------------------------------------------------
Visual Studio Enterprise 2022                    Microsoft.VisualStudio.2022.Enterprise 17.9.7     17.10.0   winget

Steps to reproduce

  1. Have an older version of it installed
  2. Trigger upgrade with winget upgrade -e --id Microsoft.VisualStudio.2022.Enterprise

Actual behavior

C:\>winget upgrade -e --id Microsoft.VisualStudio.2022.Enterprise
Found Visual Studio Enterprise 2022 [Microsoft.VisualStudio.2022.Enterprise] Version 17.10.0
This application is licensed to you by its owner.
Microsoft is not responsible for, nor does it grant any licenses to, third-party packages.
Downloading https://download.visualstudio.microsoft.com/download/pr/4bc0c2da-4e6d-4a88-9eaa-0748022737fb/e2d4815727b268cc32a38f962edf4eb246fe7753a31b3bcd6d48df871508ff7a/vs_Enterprise.exe
  ██████████████████████████████  3.82 MB / 3.82 MB
Successfully verified installer hash
Starting package install...
An unexpected error occurred while executing the command:
0x8000ffff : Catastrophic failure

Expected behavior

I expected it to succeed upgrading to the latest version.

Environment

C:\>winget --info
Windows Package Manager v1.7.11261
Copyright (c) Microsoft Corporation. All rights reserved.

Windows: Windows.Desktop v10.0.19045.4412
System Architecture: X64
Package: Microsoft.DesktopAppInstaller v1.22.11261.0

Winget Directories
-------------------------------------------------------------------------------------------------------------------------------
Logs                               %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\DiagOutputDir
User Settings                      %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\settings.json
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           Enabled

Screenshots and Logs

2024-05-27 15:12:16.343 [CORE] WinGet, version [1.7.11261], activity [{4780578B-E9FA-445A-B34D-18C402577849}]
2024-05-27 15:12:16.343 [CORE] OS: Windows.Desktop v10.0.19045.4412
2024-05-27 15:12:16.343 [CORE] Command line Args: winget  upgrade -e --id Microsoft.VisualStudio.2022.Enterprise
2024-05-27 15:12:16.343 [CORE] Package: Microsoft.DesktopAppInstaller v1.22.11261.0
2024-05-27 15:12:16.343 [CORE] IsCOMCall:0; Caller: winget-cli
2024-05-27 15:12:16.372 [CLI ] WinGet invoked with arguments: 'upgrade' '-e' '--id' 'Microsoft.VisualStudio.2022.Enterprise'
2024-05-27 15:12:16.372 [CLI ] Found subcommand: upgrade
2024-05-27 15:12:16.372 [CLI ] Leaf command to execute: root:upgrade
2024-05-27 15:12:16.377 [CLI ] Executing command: upgrade
2024-05-27 15:12:16.378 [REPO] Default source requested, multiple sources available, adding all to source references.
2024-05-27 15:12:16.378 [REPO] Adding to source references msstore
2024-05-27 15:12:16.378 [REPO] Adding to source references winget
2024-05-27 15:12:16.378 [CLI ] Created authentication arguments. Mode: silentPreferred, Account: 
2024-05-27 15:12:16.387 [CORE] Examining extension: PFN = Microsoft.Winget.Source_8wekyb3d8bbwe, ID = IndexDB
2024-05-27 15:12:16.387 [CORE] Found matching extension.
2024-05-27 15:12:16.390 [REPO] Multiple sources available, creating aggregated source.
2024-05-27 15:12:16.390 [REPO] Adding to aggregated source: msstore
2024-05-27 15:12:16.390 [REPO] Sending http GET request to: https://storeedgefd.dsx.mp.microsoft.com/v9.0/information
2024-05-27 15:12:16.461 [REPO] Response status: 200
2024-05-27 15:12:16.461 [REPO] Authentication node not found. Assuming authentication type none.
2024-05-27 15:12:16.461 [REPO] Sending http GET request to: https://storeedgefd.dsx.mp.microsoft.com/v9.0/information
2024-05-27 15:12:16.480 [REPO] Response status: 200
2024-05-27 15:12:16.480 [REPO] Authentication node not found. Assuming authentication type none.
2024-05-27 15:12:16.480 [REPO] Adding to aggregated source: winget
2024-05-27 15:12:16.485 [CORE] Examining extension: PFN = Microsoft.Winget.Source_8wekyb3d8bbwe, ID = IndexDB
2024-05-27 15:12:16.485 [CORE] Found matching extension.
2024-05-27 15:12:16.526 [REPO] Opening database for ImmutableRead at 'C:\Program Files\WindowsApps\Microsoft.Winget.Source_2024.527.1026.626_neutral__8wekyb3d8bbwe\Public\index.db'
2024-05-27 15:12:16.527 [REPO] Opened SQLite Index with version [1.7], last write [2024-05-27 11:26:32.000]
2024-05-27 15:12:16.752 [REPO] Creating new SQLite Index with version [Latest] at ':memory:'
2024-05-27 15:12:16.756 [REPO] Reading MSI UpgradeCodes
2024-05-27 15:12:16.962 [REPO] Reading MSI UpgradeCodes
2024-05-27 15:12:17.027 [FAIL] C:\__w\1\s\external\pkg\src\AppInstallerRepositoryCore\Microsoft\Schema\1_0\Interface_1_0.cpp(197)\WindowsPackageManager.dll!00007FFC69E074CC: (caller: 00007FFC69E0E129) Exception(1) tid(4b00) 800700B7 Cannot create a file when that file already exists.

2024-05-27 15:12:17.028 [FAIL] C:\__w\1\s\external\pkg\src\AppInstallerRepositoryCore\Microsoft\Schema\1_0\Interface_1_0.cpp(197)\WindowsPackageManager.dll!00007FFC69E074CC: (caller: 00007FFC69E0E129) Exception(2) tid(4b00) 800700B7 Cannot create a file when that file already exists.

2024-05-27 15:12:17.031 [FAIL] C:\__w\1\s\external\pkg\src\AppInstallerRepositoryCore\Microsoft\Schema\1_0\Interface_1_0.cpp(197)\WindowsPackageManager.dll!00007FFC69E074CC: (caller: 00007FFC69E0E129) Exception(3) tid(4b00) 800700B7 Cannot create a file when that file already exists.

2024-05-27 15:12:17.040 [FAIL] C:\__w\1\s\external\pkg\src\AppInstallerRepositoryCore\Microsoft\Schema\1_0\Interface_1_0.cpp(197)\WindowsPackageManager.dll!00007FFC69E074CC: (caller: 00007FFC69E0E129) Exception(4) tid(4b00) 800700B7 Cannot create a file when that file already exists.

2024-05-27 15:12:17.043 [FAIL] C:\__w\1\s\external\pkg\src\AppInstallerRepositoryCore\Microsoft\Schema\1_0\Interface_1_0.cpp(197)\WindowsPackageManager.dll!00007FFC69E074CC: (caller: 00007FFC69E0E129) Exception(5) tid(4b00) 800700B7 Cannot create a file when that file already exists.

2024-05-27 15:12:17.046 [FAIL] C:\__w\1\s\external\pkg\src\AppInstallerRepositoryCore\Microsoft\Schema\1_0\Interface_1_0.cpp(197)\WindowsPackageManager.dll!00007FFC69E074CC: (caller: 00007FFC69E0E129) Exception(6) tid(4b00) 800700B7 Cannot create a file when that file already exists.

2024-05-27 15:12:17.051 [FAIL] C:\__w\1\s\external\pkg\src\AppInstallerRepositoryCore\Microsoft\Schema\1_0\Interface_1_0.cpp(197)\WindowsPackageManager.dll!00007FFC69E074CC: (caller: 00007FFC69E0E129) Exception(7) tid(4b00) 800700B7 Cannot create a file when that file already exists.

2024-05-27 15:12:17.052 [FAIL] C:\__w\1\s\external\pkg\src\AppInstallerRepositoryCore\Microsoft\Schema\1_0\Interface_1_0.cpp(197)\WindowsPackageManager.dll!00007FFC69E074CC: (caller: 00007FFC69E0E129) Exception(8) tid(4b00) 800700B7 Cannot create a file when that file already exists.

2024-05-27 15:12:17.053 [FAIL] C:\__w\1\s\external\pkg\src\AppInstallerRepositoryCore\Microsoft\Schema\1_0\Interface_1_0.cpp(197)\WindowsPackageManager.dll!00007FFC69E074CC: (caller: 00007FFC69E0E129) Exception(9) tid(4b00) 800700B7 Cannot create a file when that file already exists.

2024-05-27 15:12:17.056 [FAIL] C:\__w\1\s\external\pkg\src\AppInstallerRepositoryCore\Microsoft\Schema\1_0\Interface_1_0.cpp(197)\WindowsPackageManager.dll!00007FFC69E074CC: (caller: 00007FFC69E0E129) Exception(10) tid(4b00) 800700B7 Cannot create a file when that file already exists.

2024-05-27 15:12:17.059 [FAIL] C:\__w\1\s\external\pkg\src\AppInstallerRepositoryCore\Microsoft\Schema\1_0\Interface_1_0.cpp(197)\WindowsPackageManager.dll!00007FFC69E074CC: (caller: 00007FFC69E0E129) Exception(11) tid(4b00) 800700B7 Cannot create a file when that file already exists.

2024-05-27 15:12:17.069 [FAIL] C:\__w\1\s\external\pkg\src\AppInstallerRepositoryCore\Microsoft\Schema\1_0\Interface_1_0.cpp(197)\WindowsPackageManager.dll!00007FFC69E074CC: (caller: 00007FFC69E0E129) Exception(12) tid(4b00) 800700B7 Cannot create a file when that file already exists.

2024-05-27 15:12:17.074 [FAIL] C:\__w\1\s\external\pkg\src\AppInstallerRepositoryCore\Microsoft\Schema\1_0\Interface_1_0.cpp(197)\WindowsPackageManager.dll!00007FFC69E074CC: (caller: 00007FFC69E0E129) Exception(13) tid(4b00) 800700B7 Cannot create a file when that file already exists.

2024-05-27 15:12:17.087 [FAIL] C:\__w\1\s\external\pkg\src\AppInstallerRepositoryCore\Microsoft\Schema\1_0\Interface_1_0.cpp(197)\WindowsPackageManager.dll!00007FFC69E074CC: (caller: 00007FFC69E0E129) Exception(14) tid(4b00) 800700B7 Cannot create a file when that file already exists.

2024-05-27 15:12:17.096 [FAIL] C:\__w\1\s\external\pkg\src\AppInstallerRepositoryCore\Microsoft\Schema\1_0\Interface_1_0.cpp(197)\WindowsPackageManager.dll!00007FFC69E074CC: (caller: 00007FFC69E0E129) Exception(15) tid(4b00) 800700B7 Cannot create a file when that file already exists.

2024-05-27 15:12:17.099 [FAIL] C:\__w\1\s\external\pkg\src\AppInstallerRepositoryCore\Microsoft\Schema\1_0\Interface_1_0.cpp(197)\WindowsPackageManager.dll!00007FFC69E074CC: (caller: 00007FFC69E0E129) Exception(16) tid(4b00) 800700B7 Cannot create a file when that file already exists.

2024-05-27 15:12:17.399 [REPO] Opening database for ReadWrite at 'C:\Users\username\AppData\Local\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\StoreEdgeFD\installed.db'
2024-05-27 15:12:17.399 [REPO] Opened SQLite Index with version [1.3], last write [2022-08-02 13:40:08.000]
2024-05-27 15:12:17.401 [REPO] Sending http GET request to: https://storeedgefd.dsx.mp.microsoft.com/v9.0/packageManifests/Microsoft.VisualStudio.2022.Enterprise?Market=DE
2024-05-27 15:12:17.431 [REPO] Response status: 200
2024-05-27 15:12:17.457 [REPO] Opening database for ReadWrite at 'C:\Users\username\AppData\Local\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\Microsoft.Winget.Source_8wekyb3d8bbwe\installed.db'
2024-05-27 15:12:17.457 [REPO] Opened SQLite Index with version [1.3], last write [2024-05-27 11:06:33.000]
2024-05-27 15:12:17.461 [REPO] Finding installed package from tracking package using system reference search: Query:[none] Include:ProductCode='3ea3f535'[Exact] Include:NormalizedNameAndPublisher='visualstudioenterprise2022'+'microsoft'[Exact]
2024-05-27 15:12:17.482 [CLI ] Found one app. App id: Microsoft.VisualStudio.2022.Enterprise App name: Visual Studio Enterprise 2022
2024-05-27 15:12:17.508 [REPO] Attempting to open pinning database: C:\Users\username\AppData\Local\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\pinning.db
2024-05-27 15:12:17.508 [REPO] ... opening existing pinning database
2024-05-27 15:12:17.509 [REPO] Opening database for Read at 'C:\Users\username\AppData\Local\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\pinning.db'
2024-05-27 15:12:17.509 [REPO] Opened Pinning Index with version [1.0], last write [2023-07-12 16:48:22.000]
2024-05-27 15:12:17.512 [REPO] Downloading manifest
2024-05-27 15:12:17.512 [CORE] WinINet downloading from url: https://cdn.winget.microsoft.com/cache/manifests/m/Microsoft/VisualStudio/2022/Enterprise/17.10.0/fb58
2024-05-27 15:12:17.555 [CORE] Download hash: 1b1dbd012377b054008d8f3249eac330483718841b6c2d751ef1bcb9659ea011
2024-05-27 15:12:17.555 [CORE] Download completed.
2024-05-27 15:12:17.556 [CLI ] Manifest fields: Name [Visual Studio Enterprise 2022], Version [17.10.0]
2024-05-27 15:12:17.570 [CLI ] Generated temp download path: C:\Users\username\AppData\Local\Temp\WinGet\Microsoft.VisualStudio.2022.Enterprise.17.10.0\e2d4815727b268cc32a38f962edf4eb246fe7753a31b3bcd6d48df871508ff7a
2024-05-27 15:12:17.570 [CORE] Downloading to path: C:\Users\username\AppData\Local\Temp\WinGet\Microsoft.VisualStudio.2022.Enterprise.17.10.0\e2d4815727b268cc32a38f962edf4eb246fe7753a31b3bcd6d48df871508ff7a
2024-05-27 15:12:17.570 [CORE] DeliveryOptimization downloading from url: https://download.visualstudio.microsoft.com/download/pr/4bc0c2da-4e6d-4a88-9eaa-0748022737fb/e2d4815727b268cc32a38f962edf4eb246fe7753a31b3bcd6d48df871508ff7a/vs_Enterprise.exe
2024-05-27 15:12:18.480 [CORE] Download completed.
2024-05-27 15:12:18.561 [CORE] Started applying motw to C:\Users\username\AppData\Local\Temp\WinGet\Microsoft.VisualStudio.2022.Enterprise.17.10.0\e2d4815727b268cc32a38f962edf4eb246fe7753a31b3bcd6d48df871508ff7a with zone: 3
2024-05-27 15:12:18.563 [CORE] Finished applying motw
2024-05-27 15:12:18.563 [CLI ] Installer hash verified
2024-05-27 15:12:18.563 [CORE] Started applying motw to C:\Users\username\AppData\Local\Temp\WinGet\Microsoft.VisualStudio.2022.Enterprise.17.10.0\e2d4815727b268cc32a38f962edf4eb246fe7753a31b3bcd6d48df871508ff7a with zone: 2
2024-05-27 15:12:18.567 [CORE] Finished applying motw
2024-05-27 15:12:18.568 [CLI ] Successfully renamed downloaded installer. Path: C:\Users\username\AppData\Local\Temp\WinGet\Microsoft.VisualStudio.2022.Enterprise.17.10.0\vs_Enterprise.exe
2024-05-27 15:12:18.568 [REPO] Creating new SQLite Index with version [Latest] at ':memory:'
2024-05-27 15:12:18.572 [REPO] Reading MSI UpgradeCodes
2024-05-27 15:12:18.781 [REPO] Reading MSI UpgradeCodes
2024-05-27 15:12:18.983 [CLI ] Installer args: --passive --wait update
2024-05-27 15:12:18.983 [CLI ] Starting: 'C:\Users\username\AppData\Local\Temp\WinGet\Microsoft.VisualStudio.2022.Enterprise.17.10.0\vs_Enterprise.exe' with arguments '--passive --wait update'
2024-05-27 15:12:55.753 [FAIL] C:\__w\1\s\external\pkg\src\AppInstallerCLICore\Workflows\InstallFlow.cpp(149)\WindowsPackageManager.dll!00007FFC69CD1C6B: (caller: 00007FFC69CCE797) Exception(17) tid(4b00) 8000FFFF Catastrophic failure

2024-05-27 15:12:55.753 [CLI ] Caught wil::ResultException: C:\__w\1\s\external\pkg\src\AppInstallerCLICore\Workflows\InstallFlow.cpp(149)\WindowsPackageManager.dll!00007FFC69CD1C6B: (caller: 00007FFC69CCE797) Exception(17) tid(4b00) 8000FFFF Catastrophic failure
exoosh commented 3 months ago

I think I found the cause: VS developer prompt running in Windows Terminal. After closing that, the VS Installer gets launched properly and runs.

Leaving it open so that it gets seen by the project members. Please close at your own discretion.

stephengillie commented 3 months ago

If I'm understanding correctly, the upgrade failed because the application was open. Is this correct?

exoosh commented 3 months ago

If I'm understanding correctly, the upgrade failed because the application was open. Is this correct?

Essentially yes. Not Visual Studio itself, but the developer prompt (some DLL from within the installation directory of VS that is used as PowerShell module).