microsoft / microsoft/winget-pkgs

[Package Issue]: Microsoft.AppInstaller: Cannot uninstall the previous version

Open
#129,422 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Issue-Bug Upgrade-Issue
Dominant language
No language data
Stars
11.1k
Forks
9.7k
Avg merge
1h 32m
Merged PRs (30d)
376

Description

Please confirm these before moving forward
  • I have searched for my issue and not found a work-in-progress/duplicate/resolved issue.
  • I have not been informed if the issue is resolved in a preview version of the winget client.
Category of the issue

Installation issue.

Brief description of your issue

Microsoft.AppInstaller cannot be upgraded, because its previous version cannot be uninstalled.

Steps to reproduce

1、install an earlier version of Microsoft.AppInstaller
2、use winget to upgrade it

Actual behavior

Its previous version cannot be uninstalled, and cannot be upgraded.

Expected behavior

Its previous version can be uninstalled before upgrading.

Environment
Windows: Windows.Server v10.0.20348.2113
Microsoft.AppInstaller 1.20.2201.0
Screenshots and Logs

`2023-12-06 12:07:14.141 [CORE] WinGet, version [1.6.3133], activity [{2F6ADB10-0C51-4562-B64C-0C7614CDF4D4}]
2023-12-06 12:07:14.142 [CORE] OS: Windows.Server v10.0.20348.2113
2023-12-06 12:07:14.142 [CORE] Command line Args: "C:\Users\user\scoop\apps\winget\current\winget.exe" uninstall Microsoft.AppInstaller
2023-12-06 12:07:14.142 [CORE] IsCOMCall:0; Caller: winget-cli
2023-12-06 12:07:14.145 [CLI ] WinGet invoked with arguments: 'uninstall' 'Microsoft.AppInstaller'
2023-12-06 12:07:14.145 [CLI ] Found subcommand: uninstall
2023-12-06 12:07:14.145 [CLI ] Leaf command to execute: root:uninstall
2023-12-06 12:07:14.146 [CLI ] Executing command: uninstall
2023-12-06 12:07:14.148 [REPO] Source named 'msstore' is already defined at origin User. The source from origin Default is dropped.
2023-12-06 12:07:14.148 [REPO] Default source requested, only 1 source available, using the only source: winget
2023-12-06 12:07:14.150 [REPO] Source named 'msstore' is already defined at origin User. The source from origin Default is dropped.
2023-12-06 12:07:14.150 [REPO] Named source requested, found: winget
2023-12-06 12:07:14.151 [CORE] Started trust validation of msix at: C:\Users\user\AppData\Local\Microsoft/WinGet\State\defaultState\Microsoft.PreIndexed.Package\Microsoft.Winget.Source_8wekyb3d8bbwe\source.msix
2023-12-06 12:07:14.197 [CORE] Result for certificate chain validation of Microsoft origin: 0
2023-12-06 12:07:14.237 [CORE] Result for trust info validation of the msix: 0
2023-12-06 12:07:14.275 [CORE] Started trust validation of msix at: C:\Users\user\AppData\Local\Microsoft/WinGet\State\defaultState\Microsoft.PreIndexed.Package\Microsoft.Winget.Source_8wekyb3d8bbwe\source.msix
2023-12-06 12:07:14.309 [CORE] Result for certificate chain validation of Microsoft origin: 0
2023-12-06 12:07:14.343 [CORE] Result for trust info validation of the msix: 0
2023-12-06 12:07:14.594 [REPO] Opening SQLite Index for ImmutableRead at 'C:\Users\user\AppData\Local\Temp\WinGet\defaultState{5F531EBD-B5FC-413D-A749-BAF9B74AC61F}'
2023-12-06 12:07:14.594 [SQL ] Opening SQLite connection #1: 'C:\Users\user\AppData\Local\Temp\WinGet\defaultState{5F531EBD-B5FC-413D-A749-BAF9B74AC61F}' [1, 40]
2023-12-06 12:07:14.595 [REPO] Opened SQLite Index with version [1.7], last write [2023-12-06 07:49:41.000]
2023-12-06 12:07:14.634 [REPO] Source named 'msstore' is already defined at origin User. The source from origin Default is dropped.
2023-12-06 12:07:14.636 [REPO] Creating new SQLite Index with version [Latest] at ':memory:'
2023-12-06 12:07:14.636 [SQL ] Opening SQLite connection #2: ':memory:' [6, 0]
2023-12-06 12:07:14.640 [REPO] Reading MSI UpgradeCodes
2023-12-06 12:07:14.656 [REPO] Reading MSI UpgradeCodes
2023-12-06 12:07:14.669 [SQL ] Opening SQLite connection #3: ':memory:' [6, 0]
2023-12-06 12:07:14.747 [REPO] Opening SQLite Index for ReadWrite at 'C:\Users\user\AppData\Local\Microsoft/WinGet\State\defaultState\Microsoft.Winget.Source_8wekyb3d8bbwe\installed.db'
2023-12-06 12:07:14.747 [SQL ] Opening SQLite connection #4: 'C:\Users\user\AppData\Local\Microsoft/WinGet\State\defaultState\Microsoft.Winget.Source_8wekyb3d8bbwe\installed.db' [2, 0]
2023-12-06 12:07:14.748 [REPO] Opened SQLite Index with version [1.6], last write [2023-12-05 11:16:35.000]
2023-12-06 12:07:14.763 [REPO] Finding installed package from available package using system reference search: Query:[none] Include:PackageFamilyName='microsoft.desktopappinstaller_8wekyb3d8bbwe'[Exact] Include:NormalizedNameAndPublisher='appinstaller'+'microsoft'[Exact]
2023-12-06 12:07:14.764 [REPO] Opening pinning index
2023-12-06 12:07:14.764 [REPO] Opening existing pinning index
2023-12-06 12:07:14.764 [REPO] Opening SQLite Index for ReadWrite at 'C:\Users\user\AppData\Local\Microsoft/WinGet\State\defaultState\pinning.db'
2023-12-06 12:07:14.764 [SQL ] Opening SQLite connection #5: 'C:\Users\user\AppData\Local\Microsoft/WinGet\State\defaultState\pinning.db' [2, 0]
2023-12-06 12:07:14.765 [REPO] Opened Pinning Index with version [1.0], last write [2023-11-08 17:56:55.000]
2023-12-06 12:07:14.765 [CLI ] Found one app. App id: Microsoft.AppInstaller App name: App Installer
2023-12-06 12:07:14.768 [CLI ] Removing MSIX package: Microsoft.DesktopAppInstaller_1.20.2201.0_x64__8wekyb3d8bbwe
2023-12-06 12:07:14.768 [CORE] Starting RemovePackage operation #0: Microsoft.DesktopAppInstaller_1.20.2201.0_x64__8wekyb3d8bbwe
2023-12-06 12:07:14.772 [CORE] Begin waiting for operation #0
2023-12-06 12:07:14.772 [CORE] Begin blocking for operation #0
2023-12-06 12:07:14.793 [CORE] Deployment operation #0: error 0x80070032: AppX Deployment Remove operation on package Microsoft.DesktopAppInstaller_1.20.2201.0_x64__8wekyb3d8bbwe from: C:\Program Files\WindowsApps\Microsoft.DesktopAppInstaller_1.20.2201.0_x64__8wekyb3d8bbwe failed. This app is part of Windows and cannot be uninstalled on a per-user basis. An administrator can attempt to remove the app from the computer using Turn Windows Features on or off. However, it may not be possible to uninstall the app.
2023-12-06 12:07:14.793 [FAIL] C:__w\1\s\external\pkg\src\AppInstallerCommonCore\Deployment.cpp(54)\WindowsPackageManager.dll!00007FFEBB3F0840: (caller: 00007FFEBB3F1E4C) Exception(1) tid(a5c) 80070032 The request is not supported.

Msg:[Operation failed: error 0x80070032: AppX Deployment Remove operation on package Microsoft.DesktopAppInstaller_1.20.2201.0_x64__8wekyb3d8bbwe from: C:\Program Files\WindowsApps\Microsoft.DesktopAppInstaller_1.20.2201.0_x64__8wekyb3d8bbwe failed. This app is part of Windows and cannot be uninstalled on a per-user basis. An administrator can attempt to remove the app from the computer using Turn Windows Features on or off. However, it may not be possible to uninstall the app.]

2023-12-06 12:07:14.870 [CLI ] MSIXUninstall uninstaller failed: 2147942450
2023-12-06 12:07:14.871 [CLI ] Terminating context: 0x80070032 at C:__w\1\s\external\pkg\src\AppInstallerCLICore\Workflows\UninstallFlow.cpp:16a`

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the reported winget upgrade or winget uninstall Microsoft.AppInstaller behavior on the stated Windows Server environment, then read external/pkg/src/AppInstallerCLICore/Workflows/UninstallFlow.cpp and the logged deployment failure. Done means the previous Microsoft.AppInstaller version can be removed as part of an upgrade without the reported 0x80070032 failure.

Written by the indexing model from the issue text.

Assessment

Domain
cli, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.