marticliment / UniGetUI

UniGetUI: The Graphical Interface for your package managers. Could be terribly described as a package manager manager to manage your package managers
https://www.marticliment.com/unigetui/
MIT License
13.1k stars 450 forks source link

[BUG] Updating packages always results in Process Exit Code: -1978335231 #2750

Closed peter-altherr closed 1 month ago

peter-altherr commented 1 month ago

Please confirm these before moving forward

UniGetUI Version

3.1.1

Windows version, edition, and architecture

Windows 11 Enterprise 24H2

Describe your issue

Since updating UniGetUI from 3.1.0 to 3.1.1 i always get the error message update failed when a package is getting updated, no matter what package. Following an example of the Logitech.GHUB package.

Steps to reproduce the issue

Starting package update operation for package id=Logitech.GHUB with Manager name=Winget Given installation options are <InstallationOptions: SkipHashCheck=False;InteractiveInstallation=False;RunAsAdministrator=False;Version=;Architecture=;InstallationScope=;InstallationScope=;CustomParameters=;RemoveDataOnUninstall=False> Process Executable : C:\Program Files\UniGetUI\winget-cli_x64\winget.exe Process Call Arguments : update --id "Logitech.GHUB" --exact --source winget --accept-source-agreements --disable-interactivity --silent --include-unknown --accept-package-agreements --force Working Directory : C:\Users\peter Process Start Time : 18.09.2024 12:51:39 **Process Exit Code : -1978335231** Process End Time : 18.09.2024 12:51:39

Taking a look at the package details page shows:

`Package ID: Logitech.GHUB Manifest: https://github.com/microsoft/winget-pkgs/tree/master/manifests/l/Logitech/GHUB Installed Version 2024.5.586677 - Update to 2024.6.476 available

Installer Type: Not available Installer URL: Not available Installer SHA256: Not available Installer not available

Last updated: Not available Release notes: Not available Release notes URL: Not available`

UniGetUI Log

[18.09.2024 14:07:25]    __  __      _ ______     __  __  ______
                        / / / /___  (_) ____/__  / /_/ / / /  _/
                       / / / / __ \/ / / __/ _ \/ __/ / / // /
                      / /_/ / / / / / /_/ /  __/ /_/ /_/ // /
                      \____/_/ /_/_/\____/\___/\__/\____/___/
                          Welcome to UniGetUI Version 3.1.2-beta2
[18.09.2024 14:07:25]
[18.09.2024 14:07:25] Version Code:  3,1192
[18.09.2024 14:07:25] Encoding Code Page set to 850
[18.09.2024 14:07:25] Using bundled GSudo at C:\Program Files\UniGetUI\Assets\Utilities\gsudo.exe
[18.09.2024 14:07:26] Loaded language locale: de
[18.09.2024 14:07:26] Starting update check
[18.09.2024 14:07:26] Randomly-generated background API auth token for the current session: tn0eb8chjl7sobe07or5sj6gnnp3cawmiu4byfwk308myr0j3eo6lex2hs8ntuzx
[18.09.2024 14:07:27] Api running on http://localhost:7058
[18.09.2024 14:07:27] Begin "which" search for command winget.exe
[18.09.2024 14:07:27] Old chocolatey path does not exist, not migrating Chocolatey
[18.09.2024 14:07:27] Begin "which" search for command npm
[18.09.2024 14:07:27] Begin "which" search for command python.exe
[18.09.2024 14:07:27] Begin "which" search for command cargo
[18.09.2024 14:07:27] Begin "which" search for command dotnet.exe
[18.09.2024 14:07:27] Begin "which" search for command pwsh.exe
[18.09.2024 14:07:27] Lang files were updated successfully from GitHub
[18.09.2024 14:07:27] UniGetUI is up to date
[18.09.2024 14:07:27] Command winget.exe was not found on the system
[18.09.2024 14:07:27] User does not have WinGet installed
[18.09.2024 14:07:27] The restored geometry did not have exactly 5 items (found length was 1)
[18.09.2024 14:07:27] Command cargo was not found on the system
[18.09.2024 14:07:27] Could not initialize Package Manager Cargo
[18.09.2024 14:07:27] System.InvalidOperationException: Cannot start process because a file name has not been provided.
                         at System.Diagnostics.Process.Start()
                         at UniGetUI.PackageEngine.Managers.CargoManager.Cargo.LoadManager() in C:\SomePrograms\WingetUI-Store\src\UniGetUI.PackageEngine.Managers.Cargo\Cargo.cs:line 131
                         at UniGetUI.PackageEngine.ManagerClasses.Manager.PackageManager.InitializeAsync() in C:\SomePrograms\WingetUI-Store\src\UniGetUI.PackageEngine.PackageManagerClasses\Manager\PackageManager.cs:line 88
[18.09.2024 14:07:27] Command python.exe was not found on the system
[18.09.2024 14:07:27] ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
                      █▀▀▀▀▀▀▀▀▀▀▀▀▀ MANAGER LOADED ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
                      █ Name: Pip
                      █ Enabled: True
                      █ Found: False
                      █ THE MANAGER WAS NOT FOUND. PERHAPS IT IS NOT 
                      █ INSTALLED OR IT HAS BEEN MISCONFIGURED 
                      ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
[18.09.2024 14:07:27] Downloaded new icons and screenshots successfully!
[18.09.2024 14:07:27] Command npm was not found on the system
[18.09.2024 14:07:27] ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
                      █▀▀▀▀▀▀▀▀▀▀▀▀▀ MANAGER LOADED ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
                      █ Name: Npm
                      █ Enabled: True
                      █ Found: False
                      █ THE MANAGER WAS NOT FOUND. PERHAPS IT IS NOT 
                      █ INSTALLED OR IT HAS BEEN MISCONFIGURED 
                      ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
[18.09.2024 14:07:27] Command dotnet.exe was not found on the system
[18.09.2024 14:07:27] ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
                      █▀▀▀▀▀▀▀▀▀▀▀▀▀ MANAGER LOADED ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
                      █ Name: .NET Tool
                      █ Enabled: True
                      █ Found: False
                      █ THE MANAGER WAS NOT FOUND. PERHAPS IT IS NOT 
                      █ INSTALLED OR IT HAS BEEN MISCONFIGURED 
                      ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
[18.09.2024 14:07:27] Command pwsh.exe was not found on the system
[18.09.2024 14:07:27] ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
                      █▀▀▀▀▀▀▀▀▀▀▀▀▀ MANAGER LOADED ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
                      █ Name: PowerShell7
                      █ Enabled: True
                      █ Found: False
                      █ THE MANAGER WAS NOT FOUND. PERHAPS IT IS NOT 
                      █ INSTALLED OR IT HAS BEEN MISCONFIGURED 
                      ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
[18.09.2024 14:07:29] Cannot create native WinGet instance due to error: Bundled WinGet was forced by the user!
[18.09.2024 14:07:29] System.InvalidOperationException: Bundled WinGet was forced by the user!
                         at UniGetUI.PackageEngine.Managers.WingetManager.WinGet.LoadManager() in C:\SomePrograms\WingetUI-Store\src\UniGetUI.PackageEngine.Managers.WinGet\WinGet.cs:line 263
[18.09.2024 14:07:29] WinGet will resort to using BundledWinGetHelper()
[18.09.2024 14:07:29] Loaded 2 sources for manager Winget
[18.09.2024 14:07:29] ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
                      █▀▀▀▀▀▀▀▀▀▀▀▀▀ MANAGER LOADED ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
                      █ Name: Winget
                      █ Enabled: True
                      █ Found: True
                      █ Fancy exe name: winget.exe
                      █ Executable path: C:\Program Files\UniGetUI\winget-cli_x64\winget.exe
                      █ Call arguments: 
                      █ Version: 
                      █   Bundled WinGet CLI Version: v1.8.1911
                      █   Microsoft.WinGet.Client PSModule version: ""
                      █   Using bundled WinGet helper (CLI parsing)
                      ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
[18.09.2024 14:07:30] Begin "which" search for command scoop
[18.09.2024 14:07:30] Command scoop was not found on the system
[18.09.2024 14:07:30] ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
                      █▀▀▀▀▀▀▀▀▀▀▀▀▀ MANAGER LOADED ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
                      █ Name: Scoop
                      █ Enabled: True
                      █ Found: False
                      █ THE MANAGER WAS NOT FOUND. PERHAPS IT IS NOT 
                      █ INSTALLED OR IT HAS BEEN MISCONFIGURED 
                      ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
[18.09.2024 14:07:31] Saving window geometry -8,-8,1936,1096,1
[18.09.2024 14:07:32] Loaded 1 sources for manager Chocolatey
[18.09.2024 14:07:32] ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
                      █▀▀▀▀▀▀▀▀▀▀▀▀▀ MANAGER LOADED ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
                      █ Name: Chocolatey
                      █ Enabled: True
                      █ Found: True
                      █ Fancy exe name: choco.exe
                      █ Executable path: C:\Users\peter\AppData\Local\UniGetUI\Chocolatey\choco.exe
                      █ Call arguments: 
                      █ Version: 
                      █   2.2.2
                      ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
[18.09.2024 14:07:33] Loaded 1 sources for manager PowerShell
[18.09.2024 14:07:33] ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
                      █▀▀▀▀▀▀▀▀▀▀▀▀▀ MANAGER LOADED ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
                      █ Name: PowerShell
                      █ Enabled: True
                      █ Found: True
                      █ Fancy exe name: powershell.exe
                      █ Executable path: C:\WINDOWS\system32\windowspowershell\v1.0\powershell.exe
                      █ Call arguments:  -NoProfile -Command
                      █ Version: 
                      █   Name                           Value                                                                                   
                      █   ----                           -----                                                                                   
                      █   PSVersion                      5.1.26100.1591                                                                          
                      █   PSEdition                      Desktop                                                                                 
                      █   PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}                                                                 
                      █   BuildVersion                   10.0.26100.1591                                                                         
                      █   CLRVersion                     4.0.30319.42000                                                                         
                      █   WSManStackVersion              3.0                                                                                     
                      █   PSRemotingProtocolVersion      2.3                                                                                     
                      █   SerializationVersion           1.1.0.1
                      ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
[18.09.2024 14:07:33] Manager Chocolatey has not implemented RefreshPackageIndexes
[18.09.2024 14:07:33] Manager PowerShell has not implemented RefreshPackageIndexes
[18.09.2024 14:07:33] LoadComponentsAsync finished executing. All managers loaded. Proceeding to interface.
[18.09.2024 14:07:34] Microsoft.Powershell.Client detection has been forcefully skipped as the module is not required on the current context
[18.09.2024 14:07:34] Dependency WinGet PowerShell Module for manager Winget is present
[18.09.2024 14:07:37] Loaded 2 sources for manager Winget
[18.09.2024 14:07:38] Found 0 available updates from Chocolatey
[18.09.2024 14:07:38] Found 0 installed packages from Chocolatey
[18.09.2024 14:07:39] Loaded 1 sources for manager Chocolatey
[18.09.2024 14:07:45] Loaded 1 sources for manager PowerShell
[18.09.2024 14:07:49] Found 58 installed packages from PowerShell
[18.09.2024 14:07:57] Found 321 installed packages from Winget
[18.09.2024 14:08:02] Found 5 available updates from Winget
[18.09.2024 14:08:33] Error finding updates on manager PowerShell
[18.09.2024 14:08:33] System.TimeoutException: The operation has timed out.
                         at UniGetUI.PackageEngine.ManagerClasses.Manager.PackageManager.GetAvailableUpdates() in C:\SomePrograms\WingetUI-Store\src\UniGetUI.PackageEngine.PackageManagerClasses\Manager\PackageManager.cs:line 194
[18.09.2024 14:08:33] Invalid value for UpdatesCheckInterval, using default value of 3600 seconds
[18.09.2024 14:09:41] Creating new instance of InstallationOptions for package UniGetUI.PackageEngine.PackageClasses.Package, as no instance was found in cache
[18.09.2024 14:09:41] Non-MSStore WinGet Native Icons have been forcefully disabled on code
[18.09.2024 14:09:41] Manager Winget did not find a native icon for Logitech.GHUB
[18.09.2024 14:09:41] Loaded icon with URL=UniGetUI.Core.IconEngine.CacheableIcon for package Id=Logitech.GHUB
[18.09.2024 14:09:41] Icon for package Logitech.GHUB on manager Winget with Uri=https://i.imgur.com/xkIS90o.png has been determined to be VALID through verification method PackageVersion
[18.09.2024 14:09:41] Icon for package Logitech.GHUB stored on C:\Users\peter\AppData\Local\UniGetUI\CachedMedia\Winget\Logitech.GHUB.png
[18.09.2024 14:09:41] Icon for package Logitech.GHUB was loaded from file:///C:/Users/peter/AppData/Local/UniGetUI/CachedMedia/Winget/Logitech.GHUB.png
[18.09.2024 14:09:41] Loaded operation parameters for package id=Logitech.GHUB on manager Winget and operation Update: update --id "Logitech.GHUB" --exact --source winget --accept-source-agreements --disable-interactivity --silent --include-unknown --accept-package-agreements --force

Package Managers Logs

Manager WinGet with version:
Bundled WinGet CLI Version: v1.8.1911
Microsoft.WinGet.Client PSModule version: ""
Using bundled WinGet helper (CLI parsing)

——————————————————————————————————————————

Logged subprocess-based task on manager Winget. Task type is FindPackages
Subprocess executable: "C:\Program Files\UniGetUI\winget-cli_x64\winget.exe"
Command-line arguments: " source list"
Process start time: 18.09.2024 14:07:29
Process end time:   18.09.2024 14:07:29

-- Process STDOUT
 ...

Return code: SUCCESS (0)

——————————————————————————————————————————

Logged subprocess-based task on manager Winget. Task type is RefreshIndexes
Subprocess executable: "C:\Program Files\UniGetUI\winget-cli_x64\winget.exe"
Command-line arguments: " source update --disable-interactivity"
Process start time: 18.09.2024 14:07:33
Process end time:   18.09.2024 14:07:43

-- Process STDOUT
 ...

Return code: SUCCESS (0)

——————————————————————————————————————————

Logged subprocess-based task on manager Winget. Task type is ListInstalledPackages
Subprocess executable: "cmd.exe"
Command-line arguments: "/C C:\WINDOWS\system32\windowspowershell\v1.0\powershell.exe -ExecutionPolicy Bypass -NoLogo -NoProfile"
Process start time: 18.09.2024 14:07:33
Process end time:   18.09.2024 14:07:57

-- Process STDIN
 ...

-- Process STDOUT
 ...

Return code: SUCCESS (0)

——————————————————————————————————————————

Logged subprocess-based task on manager Winget. Task type is FindPackages
Subprocess executable: "C:\Program Files\UniGetUI\winget-cli_x64\winget.exe"
Command-line arguments: " source list"
Process start time: 18.09.2024 14:07:34
Process end time:   18.09.2024 14:07:37

-- Process STDOUT
 ...

Return code: SUCCESS (0)

——————————————————————————————————————————

Logged subprocess-based task on manager Winget. Task type is ListUpdates
Subprocess executable: "cmd.exe"
Command-line arguments: "/C C:\WINDOWS\system32\windowspowershell\v1.0\powershell.exe -ExecutionPolicy Bypass -NoLogo -NoProfile"
Process start time: 18.09.2024 14:07:43
Process end time:   18.09.2024 14:08:02

-- Process STDIN
 ...

-- Process STDOUT
 ...

Return code: SUCCESS (0)

——————————————————————————————————————————

Relevant information

A quick web search for the process exit code brought some hits related to winget but it is not a winget issue at least not only. When i copy/paste the following command line

winget.exe update --id "Logitech.GHUB" --exact --source winget --accept-source-agreements --disable-interactivity --silent --include-unknown --accept-package-agreements --force

into a user (non-admin) powershell window the package download and installation works fine including UAC admin popup so it does for every other failed package update. Please note: if you copy the above line in your powershell it does not work for this particular Logitech.GHUB package as this package does not pass the hash check. This is a package problem while the issue in general is a UniGetUI issue.

Screenshots and videos

No response

marticliment commented 1 month ago

Please go to UniGetUI settings -> WinGet -> Disable Use bundled WinGet instead of System WinGet

peter-altherr commented 1 month ago

Thank you very much for this super fast reply :-) Please see the screenshot of my current settings. 2024-09-18 14_45_51-Shell Handwriting Canvas

marticliment commented 1 month ago

Looking at your logs, it looks like you don't have WinGet installed.

What happens when you call winget.exe on a command-prompt window?

peter-altherr commented 1 month ago

I called winget.exe --version within the PowerShell that came with Windows 11 as well as in the PowerShell 7.4.5 and finally in a cmd.exe-window. Please find below the output.

Windows builtin PowerShell `Windows PowerShell Copyright (C) Microsoft Corporation. Alle Rechte vorbehalten.

Installieren Sie die neueste PowerShell für neue Funktionen und Verbesserungen! https://aka.ms/PSWindows

PS C:\Users\peter> winget.exe --version v1.8.1911 PS C:\Users\peter>_`

Powershell 7.4.5 `PowerShell 7.4.5

Loading personal and system profiles took 653ms.

PS C:\Users\peter> winget.exe --version

v1.8.1911

PS C:\Users\peter>_`

cmd.exe `Microsoft Windows [Version 10.0.26100.1742] (c) Microsoft Corporation. Alle Rechte vorbehalten.

C:\Users\peter>winget.exe --version v1.8.1911

C:\Users\peter>_`

As i wrote in my first post when i copy/paste the install command from the UniGetUIs package detail window in a PowerShell 7.4.5 the installation goes through without any error including UAC popup.

marticliment commented 1 month ago

Huh, this is weird. winget.exe is not being detected by UniGetUI. I will investigate

peter-altherr commented 1 month ago

Thank you. If I can serve you by providing any additional information and logs or by doing some tests, just let me know. In the meantime I will use UniGetUI on this machine for getting informed about pending package updates. The update itself I will do by manually copy/paste the install command into a PowerShell.

sjansen1 commented 1 month ago

Same issue on all of my Windows 11 Enterprise 24H2 machines. All installation or upgrade attempts lead to Exit Code: -1978335231. No difference with build in winget or without. Winget itself works fine on command line.

marticliment commented 1 month ago

I am afraid the error you are receiving here is APPINSTALLER_CLI_ERROR_INTERNAL_ERROR, and I can't help with that if neither bundled or system WinGet works

peter-altherr commented 1 month ago

So this sounds like a winget issue to be investigated/adressed by the winget team?

marticliment commented 1 month ago

Yep

peter-altherr commented 3 weeks ago

This is fixed by 3.1.2 Beta 4. Thanks a lot 👍🏼

sjansen1 commented 3 weeks ago

I can confirm 3.1.2 Beta 4 fixed the issue on all my machines, thank you! :)