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
12.06k stars 404 forks source link

[WINGET] Sometimes package update fails #878

Closed panther7 closed 1 year ago

panther7 commented 1 year ago

Describe the issue

WingetUI fail:

Powershell command wingetui, ok:

To Reproduce

Steps to reproduce the behaviour:

  1. Install old version SUbitleEdit: https://github.com/SubtitleEdit/subtitleedit/releases/download/3.6.11/SubtitleEdit-3.6.11-Setup.exe
  2. Run WIngetUI update

The Log

``` 🟢 Have permission to install, starting installation threads... [] ['C:\\Users\\filip\\AppData\\Local\\Programs\\WingetUI\\winget-cli\\winget.exe', 'upgrade', '-e', '--id', 'Nikse.SubtitleEdit', '--include-unknown', '--source', 'winget', '--accept-source-agreements', '--silent'] 🟢 winget installer assistant thread started for process -1978335189 ```

Additional context

Add any other context about the problem here.

N0rbert commented 1 year ago

Same here. Seen this while trying to upgrade RTools and RStudio. Also it happens when installing queue of packages.

I would recommend to control exit status of winget (or other backend), allow WingetUI to retry for example 3 times and only then show "fatal" error message to the user. Current behavior confuses user.

marticliment commented 1 year ago

hello guys, which version of winget are you running on your system?

N0rbert commented 1 year ago

Thanks! It happened with winget v1.4.10173 (aka 1.19.2301.17003 in file properties, on details tab).

panther7 commented 1 year ago

Yes, 1.4.10173

JAK1047 commented 1 year ago

So -1978335189 is APPINSTALLER_CLI_ERROR_UPDATE_NOT_APPLICABLE which makes sense considering the error message. I've seen this on a few other apps as well outside of Winget UI using just Winget. (EmEditor for example). In this particular case, on my system at least, following along with the testing steps for SubtitleEdit I see WinGet upgrade runs the first time and appears successful since 3.6.12.0 is installed, however Winget still shows it as available for update. Looks to me like the developers didn't make it a supersedence over the previous version, so instead it just installs it side by side.

image

Because of this Winget still sees the 3.6.11.0 version as available for an update when checking the local index.db, but comes back as not applicable because 3.6.12.0 is technically installed.

image

image

Even if I just use the --all switch to bypass checking and upgrade it after the success I still see it as available thanks to the installed older version.

image

@panther7 if you install .11 normally, hit update from WingetUI, then check normal Add or Remove Programs in Windows do you also have the 2 versions installed side by side?

P.S. That return code gets used by Winget for any reason at all that an upgrade isn't applicable (For example if the developers swapped from a MSI to an AppX or Exe), but doesn't explain why it's not applicable unless you run upgrade with the verbose logs switch and dig in. They could definitely due to improve communication to the end user there.

Maki711 commented 1 year ago

This is still happening. The package will be installed successfully but WingetUI will show it as failed: image

C:\Users\MJ711\AppData\Local\Programs\WingetUI\sudo\gsudo.exe
C:\Users\MJ711\AppData\Local\Programs\WingetUI\sudo
🟢 checkQueue Thread started!
🟢 Using cached lang file
🟡 Using bundled lang file (forced=True)
It took 0.00500178337097168 to load all language files
🔵 Language file up-to-date
🔵 Starting main application...
Scanning for instances...
Found lock file(s), reactivating...
 * Serving Flask app 'WingetUI backend'
 * Debug mode: off
🔵 Starting update check
🟢 Downloaded latest metadata to local file
🔵 Loaded metadata from local file
b''
None
updating winget
b''
None
🔵 Version URL: https://versions.marticliment.com/versions/wingetui.ver
🟢 Updates not found
Reactivation signal ignored: RaiseWindow_[1681768446.4365182]
{'wingetFound': False, 'scoopFound': False, 'chocoFound': False, 'sudoFound': False, 'wingetVersion': '', 'scoopVersion': 'Scoop is disabled', 'chocoVersion': '', 'sudoVersion': ''}
Reached main ui load milestone
🔵 Is Dark
Can't disconnect
🟢 Starting winget search, winget on C:\Users\MJ711\AppData\Local\Programs\WingetUI\winget-cli\winget.exe...
🔵 Starting choco search
🟢 Discover tab loaded
🟢 Found valid cache for chocolatey!
Can't disconnect
🟢 Starting winget search, winget on C:\Users\MJ711\AppData\Local\Programs\WingetUI\winget-cli\winget.exe...
🟢 Starting choco search, choco on C:\Users\MJ711\AppData\Local\Programs\WingetUI\choco-cli\choco.exe...
🟢 Upgrades tab loaded
Can't disconnect
🟢 Starting winget search, winget on C:\Users\MJ711\AppData\Local\Programs\WingetUI\winget-cli\winget.exe...
🟢 Starting choco search, choco on C:\Users\MJ711\AppData\Local\Programs\WingetUI\choco-cli\choco.exe...
🟢 Discover tab loaded
Das System kann den angegebenen Pfad nicht finden.
Can't disconnect
🟢 Settings tab loaded!
🟢 About tab loaded!
🟢 Main application loaded...
Win32Mica Error: win32 version 19045 is not supported
🟢 Chocolatey search finished
🟢 Chocolatey uninstallable packages search finished
🟢 Searching for string ""
🟢 Searching for string ""
🔵 Announcement URL: https://www.marticliment.com/resources/wingetui.announcement
🔵 Image URL: https://www.marticliment.com/resources/translate.png
Name                                        Id                                          Version          Available
🟡 package Update for  (KB2504637) failed parsing, going for method 2...
Update for  (KB2504637)                     {CFEF48A8-BFB8-3EAC-8BA5-DE4F8AA267CE}.KB25… 1 89
🟢 Winget uninstallable packages search finished
🟢 Searching for string ""
🟢 Searching for string ""
🟢 Total packages: 245
1
🟢 Starting winget search, winget on C:\Users\MJ711\AppData\Local\Programs\WingetUI\winget-cli\winget.exe...
Das System kann den angegebenen Pfad nicht finden.
None
Name                                        Id                                          Version          Available
Cisco.CiscoWebexMeetings was blackisted
Discord.Discord was blackisted
Google.Chrome was blackisted
DominikReichl.KeePass was blackisted
🟢 Winget search finished
Logitech.LGS was blackisted
Libretro.RetroArch was blackisted
DigitalExtremes.Warframe was blackisted
ShareX.ShareX was blackisted
TeamSpeakSystems.TeamSpeakClient was blackisted
Ubisoft.Connect was blackisted
Microsoft.VCRedist.2013.x64 was blackisted
DBBrowserForSQLite.DBBrowserForSQLite was blackisted
Microsoft.WindowsSDK was blackisted
Microsoft.WindowsSDK was blackisted
Microsoft.VCRedist.2015+.x64 was blackisted
Microsoft.PowerToys was blackisted
Microsoft.VCRedist.2015+.x86 was blackisted
1
🟢 Starting winget search, winget on C:\Users\MJ711\AppData\Local\Programs\WingetUI\winget-cli\winget.exe...
Microsoft.VisualStudioCode was blackisted
Logitech.OptionsPlus was blackisted
Nvidia.PhysXLegacy was blackisted
EpicGames.EpicGamesLauncher was blackisted
Mojang.MinecraftLauncher was blackisted
IDRIX.VeraCrypt was blackisted
Oracle.VirtualBox was blackisted
Microsoft.DotNet.Runtime.3_1 was blackisted
Microsoft.VCRedist.2013.x86 was blackisted
🟢 Searching for string ""
🟢 Searching for string ""
🟢 Total packages: 21
None
🟢 Winget search finished
🟢 Total packages: 13734
Win32Mica Error: win32 version 19045 is not supported
args
🟢 Waiting for install permission... title=Python 3.10.5 (64-bit), id=Python.Python.3.10, installId=1681768539.3755605
Win32Mica Error: win32 version 19045 is not supported
args
🟢 Waiting for install permission... title=Python 3.7.8 (64-bit), id=Python.Python.3.7, installId=1681768539.4135604
🔵 Current program set to 1681768539.3755605
🟢 Have permission to install, starting installation threads...
[]
['C:\\Users\\MJ711\\AppData\\Local\\Programs\\WingetUI\\winget-cli\\winget.exe', 'upgrade', '-e', '--id', 'Python.Python.3.10', '--include-unknown', '--source', 'winget', '--accept-source-agreements', '--silent', '--force']
🟢 winget installer assistant thread started for process <Popen: returncode: None args: ['C:\\Users\\MJ711\\AppData\\Local\\Programs\...>
1
🔵 Current program set to 1681768539.4135604
🟢 Have permission to install, starting installation threads...
Win32Mica Error: win32 version 19045 is not supported
[]
['C:\\Users\\MJ711\\AppData\\Local\\Programs\\WingetUI\\winget-cli\\winget.exe', 'upgrade', '-e', '--id', 'Python.Python.3.7', '--include-unknown', '--source', 'winget', '--accept-source-agreements', '--silent', '--force']
🟢 winget installer assistant thread started for process <Popen: returncode: None args: ['C:\\Users\\MJ711\\AppData\\Local\\Programs\...>
🔵 Copying log to the clipboard...
🟢 Log copied to the clipboard successfully!
🔵 Copying log to the clipboard...
marticliment commented 1 year ago

This issue has been fixed, and the fix will be released with the next version