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
11.93k stars 396 forks source link

[BUG] (Powershell module will not install) #2486

Closed zaphire36 closed 1 month ago

zaphire36 commented 1 month ago

Please confirm these before moving forward

UniGetUI Version

UniGetUI 3.1.1 beta 1

Windows version, edition, and architecture

Windows 11 Pro x64 22631.3951

Describe your issue

A Missing Dependancy window pops up after starting UniGetUI Attempting to install the Powershell module fails as shown

image

image

Steps to reproduce the issue

Start the program

Agree to install the WInGet Powershell Module

UniGetUI Log

[13/07/2024 8:38:36]    __  __      _ ______     __  __  ______
                       / / / /___  (_) ____/__  / /_/ / / /  _/
                      / / / / __ \/ / / __/ _ \/ __/ / / // /  
                     / /_/ / / / / / /_/ /  __/ /_/ /_/ // /   
                     \____/_/ /_/_/\____/\___/\__/\____/___/   
                         Welcome to UniGetUI Version 3.1.1-beta1
[13/07/2024 8:38:36]
[13/07/2024 8:38:36] Version Code:  3.1091
[13/07/2024 8:38:36] Encoding Code Page set to 65001
[13/07/2024 8:38:37] Using bundled GSudo at C:\Users\jfhom\AppData\Local\Programs\WingetUI\Assets\Utilities\gsudo.exe
[13/07/2024 8:38:37] Loaded language locale: en
[13/07/2024 8:38:37] Randomly-generated background API auth token for the current session: 3br3xzdi957e2qx7o6x4mxt2m1qcirsw6cp56vvlu8w3pbm27gwnxeeh66cq1l5x
[13/07/2024 8:38:38] Api running on http://localhost:7058
[13/07/2024 8:38:39] Lang files were updated successfully from GitHub
[13/07/2024 8:38:39] UniGetUI is up to date
[13/07/2024 8:38:39] Downloaded new icons and screenshots successfully!
[13/07/2024 8:38:39] Command npm was not found on the system
[13/07/2024 8:38:39] ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
                     █▀▀▀▀▀▀▀▀▀▀▀▀▀ MANAGER LOADED ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
                     █ Name: Npm
                     █ Enabled: False
                     █ THE MANAGER IS DISABLED
                     ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
[13/07/2024 8:38:40] ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
                     █▀▀▀▀▀▀▀▀▀▀▀▀▀ MANAGER LOADED ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
                     █ Name: .NET Tool
                     █ Enabled: False
                     █ THE MANAGER IS DISABLED
                     ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
[13/07/2024 8:38:40] ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
                     █▀▀▀▀▀▀▀▀▀▀▀▀▀ MANAGER LOADED ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
                     █ Name: Pip
                     █ Enabled: False
                     █ THE MANAGER IS DISABLED
                     ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
[13/07/2024 8:38:41] Running elevated, WinGet class registration is likely to fail
[13/07/2024 8:38:41] Cannot create native WinGet instance due to error: System.Runtime.InteropServices.COMException (0x80040154): Class not registered

                        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\NativeWinGetHelper.cs:line 30
                        at UniGetUI.PackageEngine.Managers.WingetManager.WinGet.<>c.<LoadManager>b__42_0() in C:\SomePrograms\WingetUI-Store\src\UniGetUI.PackageEngine.Managers.WinGet\WinGet.cs:line 374
                        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 374
[13/07/2024 8:38:41] WinGet will resort to using BundledWinGetHelper()
[13/07/2024 8:38:42] ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
                     █▀▀▀▀▀▀▀▀▀▀▀▀▀ MANAGER LOADED ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
                     █ Name: Winget
                     █ Enabled: True
                     █ Found: True
                     █ Fancye exe name: winget.exe
                     █ Executable path: C:\Users\jfhom\AppData\Local\Microsoft\WindowsApps\winget.exe
                     █ Call arguments: 
                     █ Version: 
                     █   Native WinGet CLI Version: v1.8.1911
                     █   Microsoft.WinGet.Client PSModule version: 
                     █   Using bundled WinGet helper (CLI parsing)
                     ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
[13/07/2024 8:38:43] ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
                     █▀▀▀▀▀▀▀▀▀▀▀▀▀ MANAGER LOADED ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
                     █ Name: Chocolatey
                     █ Enabled: True
                     █ Found: True
                     █ Fancye exe name: choco.exe
                     █ Executable path: C:\Users\jfhom\AppData\Local\UniGetUI\Chocolatey\choco.exe
                     █ Call arguments: 
                     █ Version: 
                     █   2.2.2
                     ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
[13/07/2024 8:38:45] Command scoop was not found on the system
[13/07/2024 8:38:45] ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
                     █▀▀▀▀▀▀▀▀▀▀▀▀▀ MANAGER LOADED ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
                     █ Name: Scoop
                     █ Enabled: False
                     █ THE MANAGER IS DISABLED
                     ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
[13/07/2024 8:38:45] ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
                     █▀▀▀▀▀▀▀▀▀▀▀▀▀ 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.22621.3951                                                                          
                     █   PSEdition                      Desktop                                                                                 
                     █   PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}                                                                 
                     █   BuildVersion                   10.0.22621.3951                                                                         
                     █   CLRVersion                     4.0.30319.42000                                                                         
                     █   WSManStackVersion              3.0                                                                                     
                     █   PSRemotingProtocolVersion      2.3                                                                                     
                     █   SerializationVersion           1.1.0.1
                     ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
[13/07/2024 8:38:48] Dependency WinGet PowerShell Module was not found for manager Winget, marking to prompt...
[13/07/2024 8:38:49] Found 0 available updates from Chocolatey
[13/07/2024 8:38:49] Found 0 installed packages from Chocolatey
[13/07/2024 8:38:52] Found 0 installed packages from PowerShell
[13/07/2024 8:38:52] Found 0 available updates from PowerShell
[13/07/2024 8:38:53] WinGet updates returned zero packages, attempting legacy...
[13/07/2024 8:38:56] WinGet installed packages returned zero packages, attempting legacy...
[13/07/2024 8:38:59] Found 4 available updates from Winget
[13/07/2024 8:39:00] Found 341 installed packages from Winget
[13/07/2024 8:44:11] LoadComponentsAsync finished executing. All managers loaded. Proceeding to interface.

Package Managers Logs

Manager Winget with version:
Native 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:\Users\jfhom\AppData\Local\Microsoft\WindowsApps\winget.exe"
Command-line arguments: " source list"
Process start time: 13/07/2024 8:38:41
Process end time:   13/07/2024 8:38:42

-- Process STDOUT
 ...

Return code: SUCCESS (0)

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

Logged subprocess-based task on manager Winget. Task type is RefreshIndexes
Subprocess executable: "C:\Users\jfhom\AppData\Local\Microsoft\WindowsApps\winget.exe"
Command-line arguments: " source update --disable-interactivity"
Process start time: 13/07/2024 8:38:45
Process end time:   13/07/2024 8:38:47

-- 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: 13/07/2024 8:38:45
Process end time:   13/07/2024 8:38:56

-- Process STDIN
 ...

-- Process STDOUT
 ...

-- Process STDERR
  Import-Module : The specified module 'Microsoft.WinGet.Client' was not loaded because no valid module file was found 
  in any module directory.
  At line:1 char:1
  + Import-Module Microsoft.WinGet.Client
  + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      + CategoryInfo          : ResourceUnavailable: (Microsoft.WinGet.Client:String) [Import-Module], FileNotFoundExcep 
     tion
      + FullyQualifiedErrorId : Modules_ModuleNotFound,Microsoft.PowerShell.Commands.ImportModuleCommand

  Get-WinGetPackage : The term 'Get-WinGetPackage' 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
  + Get-WinGetPackage | Print-WinGetPackage
  + ~~~~~~~~~~~~~~~~~
      + CategoryInfo          : ObjectNotFound: (Get-WinGetPackage:String) [], CommandNotFoundException
      + FullyQualifiedErrorId : CommandNotFoundException

Return code: SUCCESS (0)

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

Logged subprocess-based task on manager Winget. Task type is FindPackages
Subprocess executable: "C:\Users\jfhom\AppData\Local\Microsoft\WindowsApps\winget.exe"
Command-line arguments: " source list"
Process start time: 13/07/2024 8:38:46
Process end time:   13/07/2024 8:38:47

-- 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: 13/07/2024 8:38:47
Process end time:   13/07/2024 8:38:53

-- Process STDIN
 ...

-- Process STDOUT
 ...

-- Process STDERR
  Import-Module : The specified module 'Microsoft.WinGet.Client' was not loaded because no valid module file was found 
  in any module directory.
  At line:1 char:1
  + Import-Module Microsoft.WinGet.Client
  + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      + CategoryInfo          : ResourceUnavailable: (Microsoft.WinGet.Client:String) [Import-Module], FileNotFoundExcep 
     tion
      + FullyQualifiedErrorId : Modules_ModuleNotFound,Microsoft.PowerShell.Commands.ImportModuleCommand

  Get-WinGetPackage : The term 'Get-WinGetPackage' 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
  + Get-WinGetPackage | Print-WinGetPackage
  + ~~~~~~~~~~~~~~~~~
      + CategoryInfo          : ObjectNotFound: (Get-WinGetPackage:String) [], CommandNotFoundException
      + FullyQualifiedErrorId : CommandNotFoundException

Return code: SUCCESS (0)

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

Logged subprocess-based task on manager Winget. Task type is ListUpdates
Subprocess executable: "C:\Users\jfhom\AppData\Local\Programs\WingetUI\winget-cli_x64\winget.exe"
Command-line arguments: " update --include-unknown  --accept-source-agreements"
Process start time: 13/07/2024 8:38:53
Process end time:   13/07/2024 8:38:59

-- Process STDOUT
 ...

Return code: SUCCESS (0)

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

Logged subprocess-based task on manager Winget. Task type is ListInstalledPackages
Subprocess executable: "C:\Users\jfhom\AppData\Local\Programs\WingetUI\winget-cli_x64\winget.exe"
Command-line arguments: " list  --accept-source-agreements"
Process start time: 13/07/2024 8:38:56
Process end time:   13/07/2024 8:39:00

-- Process STDOUT
 ...

Return code: SUCCESS (0)

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

Relevant information

No response

Screenshots and videos

image

image

marticliment commented 1 month ago

Fixed by 0a86316fddc7a90102e77e6dda661b703f2308bc

zaphire36 commented 1 month ago

Hi Marti,

Unfortunately I do not understand this "Fixed by 0a86316 https://github.com/marticliment/UniGetUI/commit/0a86316fddc7a90102e77e6dda661b703f2308bc"

I have uninstalled UniGetUI 3.1.1 beta 1, rebooted and reinstalled it again.

The Powershell error still occurs.

Should I be installing a later beta version?

Regards,

zaphire36


------ Original Message ------ From "Martí Climent" @.> To "marticliment/UniGetUI" @.> Cc "zaphire36" @.>; "Author" @.> Date 15/07/2024 6:25:40 Subject Re: [marticliment/UniGetUI] [BUG] (Powershell module will not install) (Issue #2486)

Fixed by 0a86316 https://github.com/marticliment/UniGetUI/commit/0a86316fddc7a90102e77e6dda661b703f2308bc

— Reply to this email directly, view it on GitHub https://github.com/marticliment/UniGetUI/issues/2486#issuecomment-2227473927, or unsubscribe https://github.com/notifications/unsubscribe-auth/BDZLIXW6UNCHSSM2ZLHPFCTZMLNEJAVCNFSM6AAAAABKZV2NKOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMRXGQ3TGOJSG4. You are receiving this because you authored the thread.Message ID: @.***>

marticliment commented 1 month ago

The error has been fixed in code. The fix will be available on next release