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.37k stars 1.45k forks source link

Can´t intall Windows Terminal via any way (store, winget, release page) - Fails with code 80070002 #3166

Open CdrBlair opened 1 year ago

CdrBlair commented 1 year ago

Brief description of your issue

I needed to reinstall WindowsTerminal. Independent of the distribution way (store, winget, msixbundle) it fails with code 80070002. I opened a Bug Report at the WindowsTerminal Team, they said it would be better of here. (https://github.com/microsoft/terminal/issues/15197)

Steps to reproduce

Try to install Windows Terminal from Windows Store, via Winget or via Package from Release Page on Github

Expected behavior

Terminal gets installed and runs on Windows 11

Actual behavior

When installing from Windows store, the store just says that an unexpected error occcured with error Code 0x80073CF9. grafik

The Event Logs for AppXDeployments/Operational states: "Fehler "0x80070002" beim AppX Deployment-Vorgang für Paket "". Der Fehlertext lautet: Deployment operation failed."

Trying the install via winget leads to same error code but with different text: "Installieren fehlgeschlagen mit Exitcode: 0x80070002 : Das System kann die angegebene Datei nicht finden." The verbose log shows:

2023-04-18 01:11:15.837 [CORE] Started applying motw to C:\Users\amv\AppData\Local\Temp\WinGet\Microsoft.WindowsTerminal.1.16.10261.0\ba6fc6854e713094b4009cf2021e8b4887cff737ab4b9c4f9390462dd2708298 with zone: 2
2023-04-18 01:11:15.838 [CORE] Finished applying motw
2023-04-18 01:11:15.838 [CLI ] Successfully renamed downloaded installer. Path: C:\Users\amv\AppData\Local\Temp\WinGet\Microsoft.WindowsTerminal.1.16.10261.0\Microsoft.WindowsTerminal_Win10_1.16.10261.0_8wekyb3d8bbwe.msix
2023-04-18 01:11:15.853 [CORE] Starting StagePackageAsync operation #0: C:\Users\amv\AppData\Local\Temp\WinGet\Microsoft.WindowsTerminal.1.16.10261.0\Microsoft.WindowsTerminal_Win10_1.16.10261.0_8wekyb3d8bbwe.msix
2023-04-18 01:11:15.853 [CORE] Begin waiting for operation #0
2023-04-18 01:11:15.853 [CORE] Begin blocking for operation #0
2023-04-18 01:11:16.003 [CORE] Deployment operation #0: Der Bereitstellungsvorgang "Stage" mit Zielvolume "C:" für das Paket "Microsoft.WindowsTerminal_3001.16.10261.0_neutral_~_8wekyb3d8bbwe" von " (Microsoft.WindowsTerminal_Win10_1.16.10261.0_8wekyb3d8bbwe.msix) " ist mit dem Fehler 0x80070002 fehlgeschlagen. Weitere Informationen zum Diagnostizieren von Problemen bei der Bereitstellung von Apps finden Sie unter "http://go.microsoft.com/fwlink/?LinkId=235160".
2023-04-18 01:11:16.003 [FAIL] D:\a\_work\1\s\external\pkg\src\AppInstallerCommonCore\Deployment.cpp(54)\WindowsPackageManager.dll!00007FFAE37C9064: (caller: 00007FFAE37C9F70) Exception(1) tid(4944) 80070002 Das System kann die angegebene Datei nicht finden.

    Msg:[Operation failed: Der Bereitstellungsvorgang "Stage" mit Zielvolume "C:" für das Paket "Microsoft.WindowsTerminal_3001.16.10261.0_neutral_~_8wekyb3d8bbwe" von " (Microsoft.WindowsTerminal_Win10_1.16.10261.0_8wekyb3d8bbwe.msix) " ist mit dem Fehler 0x80070002 fehlgeschlagen. Weitere Informationen zum Diagnostizieren von Problemen bei der Bereitstellung von Apps finden Sie unter "http://go.microsoft.com/fwlink/?LinkId=235160".] 

2023-04-18 01:11:16.003 [CORE] Starting RemovePackage operation #1: Microsoft.WindowsTerminal_3001.16.10261.0_neutral_~_8wekyb3d8bbwe
2023-04-18 01:11:16.008 [CORE] Begin waiting for operation #1
2023-04-18 01:11:16.008 [CORE] Begin blocking for operation #1
2023-04-18 01:11:16.023 [CORE] Deployment operation #1: Microsoft.WindowsTerminal_3001.16.10261.0_neutral_~_8wekyb3d8bbwe kann nicht entfernt werden, da der aktuelle Benutzer dieses Paket nicht installiert hat. Verwenden Sie Get-AppxPackage, um die Liste der installierten Pakete anzuzeigen.
2023-04-18 01:11:16.023 [FAIL] D:\a\_work\1\s\external\pkg\src\AppInstallerCommonCore\Deployment.cpp(54)\WindowsPackageManager.dll!00007FFAE37C9064: (caller: 00007FFAE37CA73C) Exception(2) tid(4944) 80073CF1 Das Paket wurde nicht gefunden.

    Msg:[Operation failed: Microsoft.WindowsTerminal_3001.16.10261.0_neutral_~_8wekyb3d8bbwe kann nicht entfernt werden, da der aktuelle Benutzer dieses Paket nicht installiert hat. Verwenden Sie Get-AppxPackage, um die Liste der installierten Pakete anzuzeigen.] 

2023-04-18 01:11:16.023 [FAIL] D:\a\_work\1\s\external\pkg\src\AppInstallerCommonCore\Deployment.cpp(126)\WindowsPackageManager.dll!00007FFAE394FFB1: (caller: 00007FFAE37CBA63) LogHr(1) tid(4944) 80073CF1 Das Paket wurde nicht gefunden.

    Msg:[D:\a\_work\1\s\external\pkg\src\AppInstallerCommonCore\Deployment.cpp(54)\WindowsPackageManager.dll!00007FFAE37C9064: (caller: 00007FFAE37CA73C) Exception(2) tid(4944) 80073CF1 Das Paket wurde nicht gefunden.

    Msg:[Operation failed: Microsoft.WindowsTerminal_3001.16.10261.0_neutral_~_8wekyb3d8bbwe kann nicht entfernt werden, da der aktuelle Benutzer dieses Paket nicht installiert hat. Verwenden Sie Get-AppxPackage, um die Liste der installierten Pakete anzuzeigen.] 
] 

2023-04-18 01:11:16.026 [CLI ] MSIX installer failed: 2147942402
2023-04-18 01:11:16.026 [CLI ] Terminating context: 0x80070002 at D:\a\_work\1\s\external\pkg\src\AppInstallerCLICore\Workflows\InstallFlow.cpp:1cb

Installing via msixbundle fails with: "Fehler bei der App-Installation. Fehlermeldung: Deployment operation failed. (0x80070002)" The Log here is much shorter:

2023-04-18 01:02:31.846 [CLI ] Get user entitlement. 2023-04-18 01:02:32.498 [CLI ] Get entitlement succeeded. Server error. ProductId: 9N0DX20HK701 2023-04-18 01:02:32.499 [CLI ] Terminating context: 0x8a15001e at D:\a\_work\1\s\external\pkg\src\AppInstallerCLICore\Workflows\MSStoreInstallerHandler.cpp:8c

Tried already to reset the store and load different versions, nothing helped. Any ideas on that?

Environment

Windows-Paket-Manager v1.4.10173
Windows: Windows.Desktop v10.0.22621.1555
Paket: Microsoft.DesktopAppInstaller v1.19.10173.0
denelon commented 1 year ago

@CdrBlair, I have seen a report like this recently, and we do have a couple of devices able to reproduce the error. We're looking to see if we can find the root cause.

denelon commented 1 year ago

Possibly related to:

ganguin commented 1 year ago

I get the same error as in https://github.com/microsoft/terminal/issues/16331

When I try to install Microsoft.UI.Xaml.2.8 manually (by downloading the appx), it tells me that it's already installed

So I tried to update the Terminal without the deps (as they seem already installed:

winget upgrade Microsoft.WindowsTerminal --skip-dependencies

This worked for me and Windows Terminal seems to work fine. Could it be a winget dependency checking issue (if I try winget upgrade Microsoft.UI.Xaml.2.8, it tells me it is not installed, but double-click on the appx file says already installed)

klimkjar commented 1 year ago

I am also seeing this error now. I think the issue might be that a newer version of Microsoft.UI.Xaml.2.8 is installed than what winget expects.

From the installer logs it is attempting to install
Microsoft.UI.Xaml.2.8_8.2306.22001.0_x64__8wekyb3d8bbwe
however (Get-AppxPackage).where({$_.name -match 'Microsoft.UI.Xaml'}) shows that version
Microsoft.UI.Xaml.2.8_8.2310.30001.0_x86__8wekyb3d8bbwe is installed.

D4nChen commented 1 year ago

Hi, I had the same issue here. I have tried to install Windows Terminal through winget. 1 2 However, I was able to do it via Microsoft Store.