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 finds any installed Winget packages on Windows Server 2019 #2410

Closed
4 tasks done
stevehoek opened this issue Jul 3, 2024 · 8 comments · Fixed by #2440
Closed
4 tasks done
Assignees
Labels
bug Something isn't working needs-author-answer

Comments

@stevehoek
Copy link

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

Windows Server 2019

Describe your issue

Winget on Windows Server is possible (see https://stackoverflow.com/questions/68100663/how-do-i-install-winget-on-windows-server-2019)

WinGetUI v2 and v3.0 could always find Winget and list the installed packages, but UniGetUI cannot.

Steps to reproduce the issue

Run UniGetUI and see if it detects Winget... I had to run as admin for it to find Winget
Once it finds Winget, it does not show any available or installed packages

UniGetUI Log

[7/3/2024 10:28:31 AM] 
                          __  __      _ ______     __  __  ______
                         / / / /___  (_) ____/__  / /_/ / / /  _/
                        / / / / __ \/ / / __/ _ \/ __/ / / // /  
                       / /_/ / / / / / /_/ /  __/ /_/ /_/ // /   
                       \____/_/ /_/_/\____/\___/\__/\____/___/   
                           Welcome to UniGetUI Version 3.1.0
[7/3/2024 10:28:31 AM]
[7/3/2024 10:28:31 AM] Version Code:  3.1
[7/3/2024 10:28:31 AM] Using bundled GSudo at C:\Program Files\UniGetUI\Assets\Utilities\gsudo.exe
[7/3/2024 10:28:31 AM] Loaded language locale: en
[7/3/2024 10:28:31 AM] Randomly-generated background API auth token for the current session: ob8oxtmfgfoby02nlu98qps81xttswlj5l2z8ypvyjqz5vmu780vcy2qf4p2afv2
[7/3/2024 10:28:32 AM] Api running on http://localhost:7058
[7/3/2024 10:28:32 AM] Lang files were updated successfully from GitHub
[7/3/2024 10:28:32 AM] UniGetUI is up to date
[7/3/2024 10:28:32 AM] Downloaded new icons and screenshots successfully!
[7/3/2024 10:28:32 AM] Command npm was not found on the system
[7/3/2024 10:28:32 AM] ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
                       █▀▀▀▀▀▀▀▀▀▀▀▀▀ MANAGER LOADED ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
                       █ Name: Npm
                       █ Enabled: False
                       █ THE MANAGER IS DISABLED
                       ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
[7/3/2024 10:28:32 AM] ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
                       █▀▀▀▀▀▀▀▀▀▀▀▀▀ MANAGER LOADED ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
                       █ Name: .NET Tool
                       █ Enabled: False
                       █ THE MANAGER IS DISABLED
                       ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
[7/3/2024 10:28:32 AM] ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
                       █▀▀▀▀▀▀▀▀▀▀▀▀▀ MANAGER LOADED ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
                       █ Name: PowerShell
                       █ Enabled: False
                       █ THE MANAGER IS DISABLED
                       ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
[7/3/2024 10:28:32 AM] Cannot create native WinGet instance due to error: System.Runtime.InteropServices.COMException (0x80040154): Class not registered (0x80040154 (REGDB_E_CLASSNOTREG))
                          at System.Runtime.InteropServices.Marshal.ThrowExceptionForHR(Int32 errorCode)
                          at WindowsPackageManager.Interop.WindowsPackageManagerStandardFactory.CreateInstance[T](Guid clsid, Guid iid) in C:\SomePrograms\WingetUI-Store\src\WindowsPackageManager.Interop\WindowsPackageManager\WindowsPackageManagerStandardFactory.cs:line 24
                          at WindowsPackageManager.Interop.WindowsPackageManagerFactory.CreateInstance[T]() in C:\SomePrograms\WingetUI-Store\src\WindowsPackageManager.Interop\WindowsPackageManager\WindowsPackageManagerFactory.cs:line 56
                          at WindowsPackageManager.Interop.WindowsPackageManagerFactory.CreatePackageManager() in C:\SomePrograms\WingetUI-Store\src\WindowsPackageManager.Interop\WindowsPackageManager\WindowsPackageManagerFactory.cs:line 33
                          at UniGetUI.PackageEngine.Managers.WingetManager.NativeWinGetHelper..ctor() in C:\SomePrograms\WingetUI-Store\src\UniGetUI.PackageEngine.Managers.WinGet\WinGetHelpers.cs:line 58
                          at UniGetUI.PackageEngine.Managers.WingetManager.WinGet.<>c.<LoadManager>b__41_0() in C:\SomePrograms\WingetUI-Store\src\UniGetUI.PackageEngine.Managers.WinGet\WinGet.cs:line 527
                          at System.Threading.Tasks.Task`1.InnerInvoke()
                          at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
                       --- End of stack trace from previous location ---
                          at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
                          at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)
                       --- End of stack trace from previous location ---
                          at UniGetUI.PackageEngine.Managers.WingetManager.WinGet.LoadManager() in C:\SomePrograms\WingetUI-Store\src\UniGetUI.PackageEngine.Managers.WinGet\WinGet.cs:line 527
[7/3/2024 10:28:32 AM] WinGet will resort to using BundledWinGetHelper()
[7/3/2024 10:28:32 AM] ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
                       █▀▀▀▀▀▀▀▀▀▀▀▀▀ MANAGER LOADED ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
                       █ Name: Winget
                       █ Enabled: True
                       █ Found: True
                       █ Fancye exe name: winget.exe
                       █ Executable path: C:\Users\Steve Hoek\AppData\Local\Microsoft\WindowsApps\winget.exe
                       █ Call arguments: 
                       █ Version: 
                       █   Naive WinGet CLI Version: v1.8.1791
                       █   Microsoft.WinGet.Client PSModule version: 
                       █   Using bundled WinGet helper (CLI parsing)
                       ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
[7/3/2024 10:28:32 AM] ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
                       █▀▀▀▀▀▀▀▀▀▀▀▀▀ MANAGER LOADED ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
                       █ Name: Pip
                       █ Enabled: False
                       █ THE MANAGER IS DISABLED
                       ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
[7/3/2024 10:28:32 AM] ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
                       █▀▀▀▀▀▀▀▀▀▀▀▀▀ MANAGER LOADED ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
                       █ Name: Chocolatey
                       █ Enabled: False
                       █ THE MANAGER IS DISABLED
                       ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
[7/3/2024 10:28:33 AM] Command scoop was not found on the system
[7/3/2024 10:28:33 AM] ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
                       █▀▀▀▀▀▀▀▀▀▀▀▀▀ MANAGER LOADED ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
                       █ Name: Scoop
                       █ Enabled: False
                       █ THE MANAGER IS DISABLED
                       ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
[7/3/2024 10:28:33 AM] Dependency WinGet PowerShell Module for manager Winget is present
[7/3/2024 10:28:33 AM] LoadComponentsAsync finished executing. All managers loaded. Proceeding to interface.
[7/3/2024 10:28:34 AM] Found 0 installed packages from Winget
[7/3/2024 10:28:34 AM] Backup saved to C:\Users\Steve Hoek\Documents\UniGetUI\OWL installed packages 2024-07-03 10-28-34.json
[7/3/2024 10:28:34 AM] Found 0 available updates from Winget
[7/3/2024 10:29:23 AM] Found 0 installed packages from Winget
[7/3/2024 10:29:29 AM] Found 0 available updates from Winget

Package Managers Logs

Logged subprocess-based task on manager Winget. Task type is ListUpdates
Subprocess executable: "C:\WINDOWS\system32\windowspowershell\v1.0\powershell.exe"
Command-line arguments: "-ExecutionPolicy Bypass -NoLogo -NoProfile"
Process start time: 7/3/2024 10:29:28 AM
Process end time:   7/3/2024 10:29:29 AM

-- Process STDIN
 ...

-- Process STDOUT
 ...

-- Process STDERR
  Write-Output : The term 'Write-Output' is not recognized as the name of a cmdlet, function, script file, or 
  operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try 
  again.
  At line:1 char:1
  + Write-Output (Get-Module -Name Microsoft.WinGet.Client).Version
  + ~~~~~~~~~~~~~~~
      + CategoryInfo          : ObjectNotFound: (Write-Output:String) [], CommandNotFoundException
      + FullyQualifiedErrorId : CommandNotFoundException
   
  Get-WinGetPackage : Retrieving the COM class factory for component with CLSID {526534B8-7E46-47C8-8416-B1685C327D37} 
  failed due to the following error: 80040154 Class not registered (Exception from HRESULT: 0x80040154 
  (REGDB_E_CLASSNOTREG)).
  At line:1 char:1
  + Get-WinGetPackage | Print-WinGetPackage
  + ~~~~~~~~~~~~~~~~~
      + CategoryInfo          : NotSpecified: (:) [Get-WinGetPackage], COMException
      + FullyQualifiedErrorId : System.Runtime.InteropServices.COMException,Microsoft.WinGet.Client.Commands.GetPackageC 
     mdlet
   

Return code: SUCCESS (0)

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

Relevant information

No response

Screenshots and videos

No response

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

Do you have WinGet installed on your machine?

@marticliment marticliment added this to the Bugs milestone Jul 3, 2024
@stevehoek
Copy link
Author

Do you have WinGet installed on your machine?

Yes, via DesktopAppInstaller but I'm not sure it is fully supported on Windows Server 2019. It works from the CLI.
Is there a way to use the bundled Winget version that UniGetUI comes with?

@marticliment
Copy link
Owner

No, only System WinGet can be used now, since bundled winget was unreliable.

Please try to run the command Repair-WinGetPackageManager on a powershell window, since the issue is that there are unregistered WinGet components

@stevehoek
Copy link
Author

Unfortunately that gives an error on WS 2019

Repair-WinGetPackageManager : Windows Package Manager returned an unexcepted result.
At line:1 char:1

  • Repair-WinGetPackageManager
  •   + CategoryInfo          : NotSpecified: (:) [Repair-WinGetPackageManager], WinGetIntegrityException
      + FullyQualifiedErrorId : RuntimeException,Microsoft.WinGet.Client.Commands.RepairWinGetPackageManagerCmdlet
    

@marticliment
Copy link
Owner

I am afraid it winGet is not compatible then.

You may want to downgrade to 3.0.2 and then disable updates

@marticliment
Copy link
Owner

Hello,

To all users facing issues with version 3.1.0, please try the new 3.1.1 beta, which aims to fix this issues.

UniGetUI 3.1.1-beta0 release: https://github.com/marticliment/UniGetUI/releases/tag/3.1.1-beta0
Direct installer URL: https://github.com/marticliment/UniGetUI/releases/download/3.1.1-beta0/UniGetUI.Installer.exe

Excuse me for the inconveniences.

@tay0thman
Copy link

The Beta Fixed the issue for me

@rumplin
Copy link
Contributor

rumplin commented Aug 2, 2024

FYI, was having this issue with all my installations on Windows Server 2022 since the change to UniGetUI and noticed updates were not being detected - it said that WinGet was not installed and I was getting errors trying to run it in Powershell. This was perfect on all machines until the recent UniGetUI updates, but after installing the latest msixbundle from https://github.com/microsoft/winget-cli/releases everything is working again. I did also update to the beta 3.1.1b1 before trying this but that itself made no difference as it still said WinGet was not installed.

P.S. please make WebView2 completely optional and preferably not enabled by default - I have zero need for anything Edge related on my servers and each install of the beta kept trying to put it back on. Thank-you.

This is a closed task. Open a new task if you want these things to get fixed.

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

Successfully merging a pull request may close this issue.

4 participants