Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] UniGetUI no longer sees any updates. #2444

Closed
4 tasks done
hspindel opened this issue Jul 6, 2024 · 13 comments
Closed
4 tasks done

[BUG] UniGetUI no longer sees any updates. #2444

hspindel opened this issue Jul 6, 2024 · 13 comments
Assignees
Labels
bug Something isn't working needs-author-answer

Comments

@hspindel
Copy link

hspindel commented Jul 6, 2024

Please confirm these before moving forward

  • I have searched for my issue and have not found a work-in-progress/duplicate/resolved issue.
  • I have tested that this issue has not been fixed in the latest (beta or stable) release.
  • I have checked the FAQ section for solutions.
  • This issue is about a bug (if it is not, please use the correct template).

UniGetUI Version

3.1.0

Windows version, edition, and architecture

Win 10

Describe your issue

WinGetUI updated to UniGetUI. Previously WinGetUI reported numerous updates available.

Package sources include .NET Tool, Chocolatey and PowerShell. Same as WinGetUI used to show.

Probably key log entry:

WinGetUI updated to UniGetUI. Previously WinGetUI reported numerous updates available.

Package sources include .NET Tool, Chocolatey and PowerShell. Same as WinGetUI used to show.

Steps to reproduce the issue

Run UniGetUI.

UniGetUI Log

WinGetUI updated to UniGetUI. Previously WinGetUI reported numerous updates available.

Probably key log entry:

[7/5/2024 5:12:03 PM] Could not initialize Package Manager Winget
[7/5/2024 5:12:03 PM] System.ComponentModel.Win32Exception (5): An error occurred trying to start process 'C:\Users\howard\AppData\Local\Microsoft\WindowsApps\winget.exe' with working directory 'D:\Program Files\UniGetUI'. Access is denied.
at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)
at UniGetUI.PackageEngine.Managers.WingetManager.WinGet.LoadManager() in C:\SomePrograms\WingetUI-Store\src\UniGetUI.PackageEngine.Managers.WinGet\WinGet.cs:line 495
at UniGetUI.PackageEngine.ManagerClasses.Manager.PackageManager.InitializeAsync() in C:\SomePrograms\WingetUI-Store\src\UniGetUI.PackageEngine.PackageManagerClasses\Manager\PackageManager.cs:line 76

Package Managers Logs

No data.

Relevant information

winget --info reports access denied.

Screenshots and videos

No response

@hspindel hspindel added the bug Something isn't working label Jul 6, 2024
@marticliment
Copy link
Owner

@EDM115
Copy link

EDM115 commented Jul 6, 2024

@marticliment on versions previous to 3.1, using system's WinGet was not recommended if the system language wasn't set to English (ex mine which is french)
I believe it's because you need to parse the outputs, but why does this changed for 3.1 ? I see that you re-bundle WinGet again on latest beta but I'm curious to see why you decided to remove this requirement in the first place

@marticliment
Copy link
Owner

marticliment commented Jul 6, 2024

The full WinGet on WingetUI story:

  1. To parse outputs, WinGet-Cli does not provide an "easily" parseable output, so the headers must be used to understand where each piece of information starts and where it ends. Then, until languages were introduced, System WinGet was used. (we are talking a long time ago, versions 0.X).
  2. However, when languages were introduced, I had to provide a stripped version of WinGet without languages (the bundled WinGet) so the output could be parsed. The issue is that WinGet is not really designed to have multiple versions running in parallel, and this led to issues with Database Corruption. (see MISSING PACKAGES #1721 and the related issues). Furthermore, WinGet would need to be updated with WingetUI manually. A parameter for WinGet to disable localization was asked for, but it is not a thing yet. (Add an argument to show output in english/disable localisation temporarily microsoft/winget-cli#3581).
    Furthermore, issues with long package names and ids being cut out also caused errors when it came to installing and uninstalling packages, and getting exact package details
  3. Then, Microsoft started developing the WinGet COM APIs. I got helped by someone from the WinGet
    team with integrating the COM APIs into WingetUI. Basically, you can connect to WinGet natively via COM (an inter-process comunication system on Windows). Using the COM APIs is more reliable (no parsing errors nor broken encodings) and faster (no need to analyze CLI output, a very cpu-intensive task) method of retrieving packages. They are, in fact, great. Searching packages is very fast, and retrieving package details is even faster. However, WinGet COM APIs are not yet polished enough to be used on certain parts of WingetUI/UniGetUI (see Issues with COM API and retrieving installed packages microsoft/winget-cli#4320 and WinRTAct.dll from Microsoft.WindowsPackageManager.ComInterop NuGet Package crashes with Access Violation when RegFreeWinRT is used microsoft/winget-cli#4377). Therefore, an alternative had to be found.
  4. Then, I attempted to implement those missing pieces that wouldn't work with the COM APIs (retrieving updates and installed packages) with the Microsoft.WinGet.Client PowerShell Module. The module is great, and with a little bit of PS scripting packages can be easily extracted and then parsed from C#. However, the PowerShell module needs to be installed on the user's system, and this can be sometimes an issue (company policies about Powershell scripting, broken/modified windows installs, PowerShell 5 and 7 interfiering with eachother, etc.).
  5. So I had to resort to reintroducing the less-reliable bundled WinGet as a last resort. The idea is to move towards a fully-COM integration, but meanwhile, PowerShell parsing will be the default method, and if it fails, the bundled WinGet will kick in.

@EDM115
Copy link

EDM115 commented Jul 6, 2024

thanks for these infos, really cool to see the thought process behind this ❤️
also good luck, this really doesn't seem easy

@hspindel
Copy link
Author

hspindel commented Jul 6, 2024

Please test this release: https://github.com/marticliment/UniGetUI/releases/tag/3.1.1-beta0

Thank you. The results are the same with that version as previously reported.

@marticliment
Copy link
Owner

@hspindel , please share package manager logs with the new version

@hspindel
Copy link
Author

hspindel commented Jul 7, 2024

UniGetUI log:

[7/6/2024 5:12:44 PM]    __  __      _ ______     __  __  ______
                        / / / /___  (_) ____/__  / /_/ / / /  _/
                       / / / / __ \/ / / __/ _ \/ __/ / / // /  
                      / /_/ / / / / / /_/ /  __/ /_/ /_/ // /   
                      \____/_/ /_/_/\____/\___/\__/\____/___/   
                          Welcome to UniGetUI Version 3.11
[7/6/2024 5:12:44 PM]
[7/6/2024 5:12:44 PM] Version Code:  3.109
[7/6/2024 5:12:45 PM] Encoding Code Page set to 437
[7/6/2024 5:12:45 PM] Using bundled GSudo at D:\Program Files\UniGetUI\Assets\Utilities\gsudo.exe
[7/6/2024 5:12:45 PM] Loaded language locale: en
[7/6/2024 5:12:46 PM] Randomly-generated background API auth token for the current session: oeexmai1ywx2somyhzirxpoiorg2ub9q7mllc3674ls7t9p5zolw1nu1znsur7k4
[7/6/2024 5:12:47 PM] Api running on http://localhost:7058
[7/6/2024 5:12:48 PM] Lang files were updated successfully from GitHub
[7/6/2024 5:12:48 PM] UniGetUI is up to date
[7/6/2024 5:12:48 PM] Downloaded new icons and screenshots successfully!
[7/6/2024 5:12:48 PM] Could not initialize Package Manager Winget
[7/6/2024 5:12:48 PM] System.ComponentModel.Win32Exception (5): An error occurred trying to start process 'C:\Users\howard\AppData\Local\Microsoft\WindowsApps\winget.exe' with working directory 'D:\Program Files\UniGetUI'. Access is denied.
                         at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)
                         at UniGetUI.PackageEngine.Managers.WingetManager.WinGet.LoadManager() in C:\SomePrograms\WingetUI-Store\src\UniGetUI.PackageEngine.Managers.WinGet\WinGet.cs:line 522
                         at UniGetUI.PackageEngine.ManagerClasses.Manager.PackageManager.InitializeAsync() in C:\SomePrograms\WingetUI-Store\src\UniGetUI.PackageEngine.PackageManagerClasses\Manager\PackageManager.cs:line 76
[7/6/2024 5:12:48 PM] Command npm was not found on the system
[7/6/2024 5:12:48 PM] ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
                      █▀▀▀▀▀▀▀▀▀▀▀▀▀ MANAGER LOADED ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
                      █ Name: Npm
                      █ Enabled: False
                      █ THE MANAGER IS DISABLED
                      ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
[7/6/2024 5:12:49 PM] ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
                      █▀▀▀▀▀▀▀▀▀▀▀▀▀ MANAGER LOADED ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
                      █ Name: Pip
                      █ Enabled: False
                      █ THE MANAGER IS DISABLED
                      ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
[7/6/2024 5:12:49 PM] Command scoop was not found on the system
[7/6/2024 5:12:49 PM] ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
                      █▀▀▀▀▀▀▀▀▀▀▀▀▀ MANAGER LOADED ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
                      █ Name: Scoop
                      █ Enabled: False
                      █ THE MANAGER IS DISABLED
                      ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
[7/6/2024 5:12:49 PM] ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
                      █▀▀▀▀▀▀▀▀▀▀▀▀▀ MANAGER LOADED ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
                      █ Name: .NET Tool
                      █ Enabled: True
                      █ Found: True
                      █ Fancye exe name: dotnet tool
                      █ Executable path: C:\Program Files\dotnet\dotnet.exe
                      █ Call arguments: tool
                      █ Version: 
                      █   8.0.302
                      ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
[7/6/2024 5:12:52 PM] ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
                      █▀▀▀▀▀▀▀▀▀▀▀▀▀ MANAGER LOADED ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
                      █ Name: Chocolatey
                      █ Enabled: True
                      █ Found: True
                      █ Fancye exe name: choco.exe
                      █ Executable path: C:\Users\howard\AppData\Local\UniGetUI\Chocolatey\choco.exe
                      █ Call arguments: 
                      █ Version: 
                      █   2.2.2
                      ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
[7/6/2024 5:12:52 PM] ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
                      █▀▀▀▀▀▀▀▀▀▀▀▀▀ MANAGER LOADED ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
                      █ Name: PowerShell
                      █ Enabled: True
                      █ Found: True
                      █ Fancye exe name: powershell.exe
                      █ Executable path: C:\WINDOWS\system32\windowspowershell\v1.0\powershell.exe
                      █ Call arguments:  -NoProfile -Command
                      █ Version: 
                      █   Name                           Value                                                                                   
                      █   ----                           -----                                                                                   
                      █   PSVersion                      5.1.19041.4522                                                                          
                      █   PSEdition                      Desktop                                                                                 
                      █   PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}                                                                 
                      █   BuildVersion                   10.0.19041.4522                                                                         
                      █   CLRVersion                     4.0.30319.42000                                                                         
                      █   WSManStackVersion              3.0                                                                                     
                      █   PSRemotingProtocolVersion      2.3                                                                                     
                      █   SerializationVersion           1.1.0.1
                      ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
[7/6/2024 5:12:54 PM] Dependency .NET Tools Outdated for manager .NET Tool is present
[7/6/2024 5:12:54 PM] LoadComponentsAsync finished executing. All managers loaded. Proceeding to interface.
[7/6/2024 5:12:55 PM] Found 1 installed packages from .NET Tool
[7/6/2024 5:12:56 PM] Found 0 available updates from .NET Tool
[7/6/2024 5:12:56 PM] Found 6 installed packages from Chocolatey
[7/6/2024 5:12:57 PM] Found 0 available updates from Chocolatey
[7/6/2024 5:12:57 PM] Found 1 installed packages from PowerShell
[7/6/2024 5:12:59 PM] Found 0 available updates from PowerShell

Package manager log:

`No content at all.`

@marticliment
Copy link
Owner

[7/6/2024 5:12:48 PM] System.ComponentModel.Win32Exception (5): An error occurred trying to start process 'C:\Users\howard\AppData\Local\Microsoft\WindowsApps\winget.exe' with working directory 'D:\Program Files\UniGetUI'. Access is denied.
at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)
at UniGetUI.PackageEngine.Managers.WingetManager.WinGet.LoadManager() in C:\SomePrograms\WingetUI-Store\src\UniGetUI.PackageEngine.Managers.WinGet\WinGet.cs:line 522
at UniGetUI.PackageEngine.ManagerClasses.Manager.PackageManager.InitializeAsync() in C:\SomePrograms\WingetUI-Store\src\UniGetUI.PackageEngine.PackageManagerClasses\Manager\PackageManager.cs:line 76

Hello @hspindel, do you have a running antivirus? The issue here id your system not allowing UniGetUI to execute WinGet. What happens if you run C:\Users\howard\AppData\Local\Microsoft\WindowsApps\winget.exe on a command prompt?

@hspindel
Copy link
Author

hspindel commented Jul 7, 2024

Hello @hspindel, do you have a running antivirus? The issue here id your system not allowing UniGetUI to execute WinGet. What happens if you run C:\Users\howard\AppData\Local\Microsoft\WindowsApps\winget.exe on a command prompt?

Thank you for the response. I do have a running antivirus - Norton. I tried disabling it and still get Access is Denied.

I tried running C:\Users\howard\AppData\Local\Microsoft\WindowsApps\winget.exe with the antivirus still disabled and still get Access is Denied.

@apoklyps3
Copy link

I'm getting 0 updates ever since I have updated to unigetui 3.1.0
no issues running winget in the said path

@hspindel
Copy link
Author

hspindel commented Jul 9, 2024

In the related thread on winget-cli, marticliment mentioned that the new UniGetUI uses a system version of winget instead of previously using a bundled winget.

Is there any way we can get a config option for UniGetUI to call the bundled winget it used to use? When I try that winget.exe from a command line, it successfully reports a version number instead of "access is denied" with the new version.

@marticliment
Copy link
Owner

I will improve forcing the usage of bundled WinGet

@hspindel
Copy link
Author

I will improve forcing the usage of bundled WinGet

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs-author-answer
Projects
None yet
Development

No branches or pull requests

4 participants