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
10.42k stars 338 forks source link

[BUG] Missing WinGet PS module dependency install loop in version 3.1.0 #2415

Closed Reeceeboii closed 5 days ago

Reeceeboii commented 5 days ago

Please confirm these before moving forward

UniGetUI Version

3.1.0

Windows version, edition, and architecture

Windows 11 Education 23H2 x64 (OS Build 22631.3810)

Describe your issue

After the most recent update that changed WingetUI to UniGetUI, I seem to be stuck in a loop on application startup that attempts to install the WinGet PowerShell module over and over again without acknowledging that the previous install had succeeded.

  1. Open UniGetUI after 3.1.0 update, prompted to install module: Screenshot 2024-07-03 220606

  2. Install module, PowerShell opens, installs, then closes on key press: Screenshot 2024-07-03 220529 Screenshot 2024-07-03 220538

  3. UniGetUI asks to restart, say yes: Screenshot 2024-07-03 220551

  4. On next startup, the prompt reappears: Screenshot 2024-07-03 220508

Steps to reproduce the issue

See description.

UniGetUI Log

[03/07/2024 22:05:56] 
                         __  __      _ ______     __  __  ______
                        / / / /___  (_) ____/__  / /_/ / / /  _/
                       / / / / __ \/ / / __/ _ \/ __/ / / // /  
                      / /_/ / / / / / /_/ /  __/ /_/ /_/ // /   
                      \____/_/ /_/_/\____/\___/\__/\____/___/   
                          Welcome to UniGetUI Version 3.1.0
[03/07/2024 22:05:56]
[03/07/2024 22:05:56] Version Code:  3.1
[03/07/2024 22:05:56] Using bundled GSudo at C:\Users\Reece Mercer\AppData\Local\Programs\UniGetUI\Assets\Utilities\gsudo.exe
[03/07/2024 22:05:57] Loaded language locale: en
[03/07/2024 22:05:57] Randomly-generated background API auth token for the current session: mc7727xlvl5769n63nrqg65v4e0vhsrzg6p1e3ptcp77m48o9llbiddjaq1jzmjn
[03/07/2024 22:05:57] Api running on http://localhost:7058
[03/07/2024 22:05:57] Begin "which" search for command winget.exe
[03/07/2024 22:05:57] Begin "which" search for command npm
[03/07/2024 22:05:57] Begin "which" search for command python.exe
[03/07/2024 22:05:57] Begin "which" search for command dotnet.exe
[03/07/2024 22:05:57] Lang files were updated successfully from GitHub
[03/07/2024 22:05:57] The restored geometry did not have exactly 5 items (found length was 1)
[03/07/2024 22:05:57] Downloaded new icons and screenshots successfully!
[03/07/2024 22:05:57] Command winget.exe was found on C:\Users\Reece Mercer\AppData\Local\Microsoft\WindowsApps\winget.exe
[03/07/2024 22:05:57] Command npm was found on C:\Users\Reece Mercer\scoop\apps\nodejs-lts\current\npm
[03/07/2024 22:05:57] Command dotnet.exe was found on C:\Program Files\dotnet\dotnet.exe
[03/07/2024 22:05:57] Command python.exe was found on C:\Users\Reece Mercer\scoop\apps\python\current\python.exe
[03/07/2024 22:05:58] ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
                      █▀▀▀▀▀▀▀▀▀▀▀▀▀ 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.300
                      ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
[03/07/2024 22:05:58] ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
                      █▀▀▀▀▀▀▀▀▀▀▀▀▀ MANAGER LOADED ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
                      █ Name: Npm
                      █ Enabled: True
                      █ Found: True
                      █ Fancye exe name: npm
                      █ Executable path: C:\WINDOWS\system32\windowspowershell\v1.0\powershell.exe
                      █ Call arguments:  -NoProfile -ExecutionPolicy Bypass -Command npm
                      █ Version: 
                      █   10.7.0
                      ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
[03/07/2024 22:05:58] Loaded 2 sources for manager Winget
[03/07/2024 22:05:58] ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
                      █▀▀▀▀▀▀▀▀▀▀▀▀▀ MANAGER LOADED ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
                      █ Name: Winget
                      █ Enabled: True
                      █ Found: True
                      █ Fancye exe name: winget.exe
                      █ Executable path: C:\Users\Reece Mercer\AppData\Local\Microsoft\WindowsApps\winget.exe
                      █ Call arguments: 
                      █ Version: 
                      █   Naive WinGet CLI Version: v1.8.1791
                      █   Microsoft.WinGet.Client PSModule version: 
                      █   Using Native WinGet helper (COM Api)
                      ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
[03/07/2024 22:05:58] Begin "which" search for command scoop
[03/07/2024 22:05:58] ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
                      █▀▀▀▀▀▀▀▀▀▀▀▀▀ MANAGER LOADED ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
                      █ Name: Pip
                      █ Enabled: True
                      █ Found: True
                      █ Fancye exe name: pip
                      █ Executable path: C:\Users\Reece Mercer\scoop\apps\python\current\python.exe
                      █ Call arguments:  -m pip
                      █ Version: 
                      █   pip 23.2.1 from C:\Users\Reece Mercer\scoop\apps\python\current\Lib\site-packages\pip (python 3.12)
                      ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
[03/07/2024 22:05:58] Command scoop was found on C:\Users\Reece Mercer\scoop\shims\scoop
[03/07/2024 22:05:58] Starting scoop cleanup...
[03/07/2024 22:05:59] Loaded 6 sources for manager Scoop
[03/07/2024 22:05:59] ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
                      █▀▀▀▀▀▀▀▀▀▀▀▀▀ MANAGER LOADED ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
                      █ Name: Scoop
                      █ Enabled: True
                      █ Found: True
                      █ Fancye exe name: scoop
                      █ Executable path: C:\WINDOWS\system32\windowspowershell\v1.0\powershell.exe
                      █ Call arguments:  -NoProfile -ExecutionPolicy Bypass -Command scoop
                      █ Version: 
                      █   Current Scoop version:
                      █   d337bb1f chore(release): Bump to version 0.4.2 (#5964)
                      █   
                      █   'main' bucket:
                      █   7d31ad518 simplex-chat: Update to version 5.8.2
                      █   
                      █   'extras' bucket:
                      █   17337d2fb mpc-hc-fork: Update to version 2.3.2.1 (#13560)
                      █   
                      █   'sysinternals' bucket:
                      █   56aa57d sysinternals-suite: Update to version 2024.06.20
                      █   
                      █   'nerd-fonts' bucket:
                      █   d16f2562 SarasaGothic: Update to version 1.0.15
                      █   
                      █   'java' bucket:
                      █   fdb41b89 temurin17-nightly-jre: Update to version 17.0.12-6.0.ea
                      █   
                      █   'games' bucket:
                      █   663a1d350 dolphin-dev: Update to version 2407-7
                      ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
[03/07/2024 22:05:59] Loaded 1 sources for manager Chocolatey
[03/07/2024 22:05:59] ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
                      █▀▀▀▀▀▀▀▀▀▀▀▀▀ MANAGER LOADED ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
                      █ Name: Chocolatey
                      █ Enabled: True
                      █ Found: True
                      █ Fancye exe name: choco.exe
                      █ Executable path: C:\Users\Reece Mercer\AppData\Local\UniGetUI\Chocolatey\choco.exe
                      █ Call arguments: 
                      █ Version: 
                      █   2.2.2
                      ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
[03/07/2024 22:05:59] Loaded 1 sources for manager PowerShell
[03/07/2024 22:05:59] ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
                      █▀▀▀▀▀▀▀▀▀▀▀▀▀ 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.3810                                                                          
                      █   PSEdition                      Desktop                                                                                 
                      █   PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}                                                                 
                      █   BuildVersion                   10.0.22621.3810                                                                         
                      █   CLRVersion                     4.0.30319.42000                                                                         
                      █   WSManStackVersion              3.0                                                                                     
                      █   PSRemotingProtocolVersion      2.3                                                                                     
                      █   SerializationVersion           1.1.0.1
                      ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
[03/07/2024 22:05:59] Manager Chocolatey has not implemented RefreshPackageIndexes
[03/07/2024 22:05:59] Manager Npm has not implemented RefreshPackageIndexes
[03/07/2024 22:05:59] Manager Pip has not implemented RefreshPackageIndexes
[03/07/2024 22:05:59] Manager .NET Tool has not implemented RefreshPackageIndexes
[03/07/2024 22:05:59] Begin "which" search for command dotnet-tools-outdated.exe
[03/07/2024 22:05:59] Manager PowerShell has not implemented RefreshPackageIndexes
[03/07/2024 22:05:59] Resetting administrator rights cache for process id 25644
[03/07/2024 22:05:59] Command dotnet-tools-outdated.exe was found on C:\Users\Reece Mercer\.dotnet\tools\dotnet-tools-outdated.exe
[03/07/2024 22:05:59] Scoop cleanup finished!
[03/07/2024 22:05:59] Loaded 2 sources for manager Winget
[03/07/2024 22:05:59] Found 0 installed packages from Winget
[03/07/2024 22:06:00] Found 2 installed packages from .NET Tool
[03/07/2024 22:06:00] Dependency WinGet PowerShell Module was not found for manager Winget, marking to prompt...
[03/07/2024 22:06:00] Begin "which" search for command scoop-search.exe
[03/07/2024 22:06:00] Command scoop-search.exe was found on C:\Users\Reece Mercer\scoop\shims\scoop-search.exe
[03/07/2024 22:06:00] Dependency Scoop-Search for manager Scoop is present
[03/07/2024 22:06:00] Begin "which" search for command git.exe
[03/07/2024 22:06:00] Command git.exe was found on C:\Users\Reece Mercer\scoop\shims\git.exe
[03/07/2024 22:06:00] Dependency Git for manager Scoop is present
[03/07/2024 22:06:00] Begin "which" search for command dotnet-tools-outdated.exe
[03/07/2024 22:06:00] Found 40 installed packages from Scoop
[03/07/2024 22:06:00] Command dotnet-tools-outdated.exe was found on C:\Users\Reece Mercer\.dotnet\tools\dotnet-tools-outdated.exe
[03/07/2024 22:06:00] Dependency .NET Tools Outdated for manager .NET Tool is present
[03/07/2024 22:06:00] Found 0 installed packages from Chocolatey
[03/07/2024 22:06:00] Found 0 available updates from Winget
[03/07/2024 22:06:00] Found 0 available updates from Chocolatey
[03/07/2024 22:06:00] Found 1 installed packages from Pip
[03/07/2024 22:06:00] Found 0 available updates from .NET Tool
[03/07/2024 22:06:01] Loaded 1 sources for manager Chocolatey
[03/07/2024 22:06:01] Loaded 6 sources for manager Scoop
[03/07/2024 22:06:01] Found 1 available updates from Pip
[03/07/2024 22:06:01] Found 0 available updates from Npm
[03/07/2024 22:06:01] Found 0 installed packages from Npm
[03/07/2024 22:06:01] Found 1 installed packages from PowerShell
[03/07/2024 22:06:01] Starting package backup
[03/07/2024 22:06:01] Creating new instance of InstallationOptions for package UniGetUI.PackageEngine.PackageClasses.Package, as no instance was found in cache
[03/07/2024 22:06:01] Creating new instance of InstallationOptions for package UniGetUI.PackageEngine.PackageClasses.Package, as no instance was found in cache
[03/07/2024 22:06:01] Creating new instance of InstallationOptions for package UniGetUI.PackageEngine.PackageClasses.Package, as no instance was found in cache
[03/07/2024 22:06:01] Creating new instance of InstallationOptions for package UniGetUI.PackageEngine.PackageClasses.Package, as no instance was found in cache
[03/07/2024 22:06:01] Creating new instance of InstallationOptions for package UniGetUI.PackageEngine.PackageClasses.Package, as no instance was found in cache
[03/07/2024 22:06:01] Creating new instance of InstallationOptions for package UniGetUI.PackageEngine.PackageClasses.Package, as no instance was found in cache
[03/07/2024 22:06:01] Creating new instance of InstallationOptions for package UniGetUI.PackageEngine.PackageClasses.Package, as no instance was found in cache
[03/07/2024 22:06:01] Creating new instance of InstallationOptions for package UniGetUI.PackageEngine.PackageClasses.Package, as no instance was found in cache
[03/07/2024 22:06:01] Creating new instance of InstallationOptions for package UniGetUI.PackageEngine.PackageClasses.Package, as no instance was found in cache
[03/07/2024 22:06:01] Creating new instance of InstallationOptions for package UniGetUI.PackageEngine.PackageClasses.Package, as no instance was found in cache
[03/07/2024 22:06:01] Creating new instance of InstallationOptions for package UniGetUI.PackageEngine.PackageClasses.Package, as no instance was found in cache
[03/07/2024 22:06:01] Creating new instance of InstallationOptions for package UniGetUI.PackageEngine.PackageClasses.Package, as no instance was found in cache
[03/07/2024 22:06:01] Creating new instance of InstallationOptions for package UniGetUI.PackageEngine.PackageClasses.Package, as no instance was found in cache
[03/07/2024 22:06:01] Creating new instance of InstallationOptions for package UniGetUI.PackageEngine.PackageClasses.Package, as no instance was found in cache
[03/07/2024 22:06:01] Creating new instance of InstallationOptions for package UniGetUI.PackageEngine.PackageClasses.Package, as no instance was found in cache
[03/07/2024 22:06:01] Creating new instance of InstallationOptions for package UniGetUI.PackageEngine.PackageClasses.Package, as no instance was found in cache
[03/07/2024 22:06:01] Creating new instance of InstallationOptions for package UniGetUI.PackageEngine.PackageClasses.Package, as no instance was found in cache
[03/07/2024 22:06:01] Creating new instance of InstallationOptions for package UniGetUI.PackageEngine.PackageClasses.Package, as no instance was found in cache
[03/07/2024 22:06:01] Creating new instance of InstallationOptions for package UniGetUI.PackageEngine.PackageClasses.Package, as no instance was found in cache
[03/07/2024 22:06:01] Creating new instance of InstallationOptions for package UniGetUI.PackageEngine.PackageClasses.Package, as no instance was found in cache
[03/07/2024 22:06:01] Creating new instance of InstallationOptions for package UniGetUI.PackageEngine.PackageClasses.Package, as no instance was found in cache
[03/07/2024 22:06:01] Creating new instance of InstallationOptions for package UniGetUI.PackageEngine.PackageClasses.Package, as no instance was found in cache
[03/07/2024 22:06:01] Creating new instance of InstallationOptions for package UniGetUI.PackageEngine.PackageClasses.Package, as no instance was found in cache
[03/07/2024 22:06:01] Creating new instance of InstallationOptions for package UniGetUI.PackageEngine.PackageClasses.Package, as no instance was found in cache
[03/07/2024 22:06:01] Creating new instance of InstallationOptions for package UniGetUI.PackageEngine.PackageClasses.Package, as no instance was found in cache
[03/07/2024 22:06:01] Creating new instance of InstallationOptions for package UniGetUI.PackageEngine.PackageClasses.Package, as no instance was found in cache
[03/07/2024 22:06:01] Creating new instance of InstallationOptions for package UniGetUI.PackageEngine.PackageClasses.Package, as no instance was found in cache
[03/07/2024 22:06:01] Creating new instance of InstallationOptions for package UniGetUI.PackageEngine.PackageClasses.Package, as no instance was found in cache
[03/07/2024 22:06:01] Creating new instance of InstallationOptions for package UniGetUI.PackageEngine.PackageClasses.Package, as no instance was found in cache
[03/07/2024 22:06:01] Creating new instance of InstallationOptions for package UniGetUI.PackageEngine.PackageClasses.Package, as no instance was found in cache
[03/07/2024 22:06:01] Creating new instance of InstallationOptions for package UniGetUI.PackageEngine.PackageClasses.Package, as no instance was found in cache
[03/07/2024 22:06:01] Creating new instance of InstallationOptions for package UniGetUI.PackageEngine.PackageClasses.Package, as no instance was found in cache
[03/07/2024 22:06:01] Creating new instance of InstallationOptions for package UniGetUI.PackageEngine.PackageClasses.Package, as no instance was found in cache
[03/07/2024 22:06:01] Creating new instance of InstallationOptions for package UniGetUI.PackageEngine.PackageClasses.Package, as no instance was found in cache
[03/07/2024 22:06:01] Creating new instance of InstallationOptions for package UniGetUI.PackageEngine.PackageClasses.Package, as no instance was found in cache
[03/07/2024 22:06:01] Creating new instance of InstallationOptions for package UniGetUI.PackageEngine.PackageClasses.Package, as no instance was found in cache
[03/07/2024 22:06:01] Creating new instance of InstallationOptions for package UniGetUI.PackageEngine.PackageClasses.Package, as no instance was found in cache
[03/07/2024 22:06:01] Creating new instance of InstallationOptions for package UniGetUI.PackageEngine.PackageClasses.Package, as no instance was found in cache
[03/07/2024 22:06:01] Creating new instance of InstallationOptions for package UniGetUI.PackageEngine.PackageClasses.Package, as no instance was found in cache
[03/07/2024 22:06:01] Creating new instance of InstallationOptions for package UniGetUI.PackageEngine.PackageClasses.Package, as no instance was found in cache
[03/07/2024 22:06:01] Creating new instance of InstallationOptions for package UniGetUI.PackageEngine.PackageClasses.Package, as no instance was found in cache
[03/07/2024 22:06:01] Creating new instance of InstallationOptions for package UniGetUI.PackageEngine.PackageClasses.Package, as no instance was found in cache
[03/07/2024 22:06:01] Creating new instance of InstallationOptions for package UniGetUI.PackageEngine.PackageClasses.Package, as no instance was found in cache
[03/07/2024 22:06:01] Creating new instance of InstallationOptions for package UniGetUI.PackageEngine.PackageClasses.Package, as no instance was found in cache
[03/07/2024 22:06:01] Finished loading serializable objects. Serializing with format JSON
[03/07/2024 22:06:01] Serialization finished successfully
[03/07/2024 22:06:01] Backup saved to C:\Users\Reece Mercer\OneDrive\Documents\UniGetUI\REECE-DESKTOP installed packages 2024-07-03 22-06-01.json
[03/07/2024 22:06:01] Loaded 1 sources for manager PowerShell
[03/07/2024 22:06:02] Found 0 available updates from PowerShell
[03/07/2024 22:06:12] Found 40 installed packages from Scoop
[03/07/2024 22:06:14] LoadComponentsAsync finished executing. All managers loaded. Proceeding to interface.
[03/07/2024 22:06:24] Found 4 available updates from Scoop
[03/07/2024 22:06:24] Starting check for updates wait interval with waitTime=14400

Package Managers Logs

Manager Winget with version:
Naive WinGet CLI Version: v1.8.1791
Microsoft.WinGet.Client PSModule version: 
Using Native WinGet helper (COM Api)

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

Logged native task on manager Winget. Task type is ListSources
Process start time: 03/07/2024 22:05:58
Process end time:   03/07/2024 22:05:58

-- Task information
 ...

The task reported success

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

Logged subprocess-based task on manager Winget. Task type is RefreshIndexes
Subprocess executable: "C:\Users\Reece Mercer\AppData\Local\Microsoft\WindowsApps\winget.exe"
Command-line arguments: " source update --disable-interactivity"
Process start time: 03/07/2024 22:05:59
Process end time:   03/07/2024 22:06:00

-- Process STDOUT
 ...

Return code: SUCCESS (0)

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

Logged subprocess-based task on manager Winget. Task type is ListPackages
Subprocess executable: "C:\WINDOWS\system32\windowspowershell\v1.0\powershell.exe"
Command-line arguments: "-ExecutionPolicy Bypass -NoLogo -NoProfile"
Process start time: 03/07/2024 22:05:59
Process end time:   03/07/2024 22:05:59

-- 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

  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 native task on manager Winget. Task type is ListSources
Process start time: 03/07/2024 22:05:59
Process end time:   03/07/2024 22:05:59

-- Task information
 ...

The task reported success

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

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: 03/07/2024 22:06:00
Process end time:   03/07/2024 22:06:00

-- 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

  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)

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

Relevant information

Package Managers Logs seem to show some PowerShell errors.

I have both PowerShell 7.4.3 (installed via WinGet) and 5.1.22621.3810 (bundled with Windows) on my system.

It also still seems to suggest that the module is installed, but fails to show a version:

image

Screenshots and videos

See description.

marticliment commented 5 days ago

Try to:

  1. Run the command Uninstall-Module Microsoft.WinGet.Client repeatedly until it complains the module is not installed. Run this command in PowerShell 5.1.
  2. run the command Install-Module Microsoft.WinGet.Client and see what happens
Reeceeboii commented 5 days ago

Yep that fixed it, thanks :) I will note that as above, the Expand version option still shows no version for the PSModule.

image

image

image

image

image

PyroDevil commented 4 days ago

I could not figure out how to fix it. The fix described here doesn't seem to work for me.

This is the error I get when Uniget is trying to install the extension:

PackageManagement\Install-Package : The following commands are already available on this system:'Find-WinGetPackage,Get
-WinGetPackage,Get-WinGetSource,Install-WinGetPackage,Uninstall-WinGetPackage,Update-WinGetPackage'. This module
'Microsoft.WinGet.Client' may override the existing commands. If you still want to install this module
'Microsoft.WinGet.Client', use -AllowClobber parameter.
At C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\1.0.0.1\PSModule.psm1:1809 char:21
+ ...          $null = PackageManagement\Install-Package @PSBoundParameters
+                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (Microsoft.Power....InstallPackage:InstallPackage) [Install-Package],
   Exception
    + FullyQualifiedErrorId : CommandAlreadyAvailable,Validate-ModuleCommandAlreadyAvailable,Microsoft.PowerShell.Pack
   ageManagement.Cmdlets.InstallPackage

Press Enter to continue...:

This is the error when trying to uninstall it:

Power shell: C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe, which is the one that UniGetUI seems to use:

Copyright (C) Microsoft Corporation. All rights reserved.

Install the latest PowerShell for new features and improvements! https://aka.ms/PSWindows

PS C:\Windows\System32\WindowsPowerShell\v1.0> Uninstall-Module Microsoft.WinGet.Client
PackageManagement\Uninstall-Package : No match was found for the specified search criteria and module names
'Microsoft.WinGet.Client'.
At C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\1.0.0.1\PSModule.psm1:2194 char:21
+ ...        $null = PackageManagement\Uninstall-Package @PSBoundParameters
+                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (Microsoft.Power...ninstallPackage:UninstallPackage) [Uninstall-Package]
   , Exception
    + FullyQualifiedErrorId : NoMatchFound,Microsoft.PowerShell.PackageManagement.Cmdlets.UninstallPackage

PS C:\Windows\System32\WindowsPowerShell\v1.0>

(same as admin)

The Module doesn't seem to be installed:

PS C:\WINDOWS\system32> Get-Module

ModuleType Version    Name                                ExportedCommands
---------- -------    ----                                ----------------
Manifest   3.1.0.0    Microsoft.PowerShell.Management     {Add-Computer, Add-Content, Checkpoint-Computer, Clear-Content...}
Script     2.0.0      PSReadLine                          {Get-PSReadLineKeyHandler, Get-PSReadLineOption, Remove-PSReadLineKeyHandler, Set-PSReadLineKeyHandler...}

PS C:\WINDOWS\system32> Install-Module Microsoft.WinGet.Client

Untrusted repository
You are installing the modules from an untrusted repository. If you trust this repository, change its InstallationPolicy value by running the Set-PSRepository cmdlet. Are you sure you want to install the modules from 'PSGallery'?
[Y] Yes  [A] Yes to All  [N] No  [L] No to All  [S] Suspend  [?] Help (default is "N"): Y
PackageManagement\Install-Package : The following commands are already available on this system:'Find-WinGetPackage,Get-WinGetPackage,Get-WinGetSource,Install-WinGetPackage,Uninstall-WinGetPackage,Update-WinGetPackage'. This module
'Microsoft.WinGet.Client' may override the existing commands. If you still want to install this module 'Microsoft.WinGet.Client', use -AllowClobber parameter.
At C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\1.0.0.1\PSModule.psm1:1809 char:21
+ ...          $null = PackageManagement\Install-Package @PSBoundParameters
+                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (Microsoft.Power....InstallPackage:InstallPackage) [Install-Package], Exception
    + FullyQualifiedErrorId : CommandAlreadyAvailable,Validate-ModuleCommandAlreadyAvailable,Microsoft.PowerShell.PackageManagement.Cmdlets.InstallPackage
marticliment commented 4 days ago

Please run the command with an extra parameter, as said in the Error message: Install-Module Microsoft.WinGet.Client -AllowClobber

PyroDevil commented 4 days ago

Thanks! This seemed to have worked:

Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.

Install the latest PowerShell for new features and improvements! https://aka.ms/PSWindows

Loading personal and system profiles took 599ms.
PS C:\Users\user> Install-Module Microsoft.WinGet.Client -AllowClobber
Install-Module : Administrator rights are required to install modules in 'C:\Program Files\WindowsPowerShell\Modules'.
Log on to the computer with an account that has Administrator rights, and then try again, or install
'C:\Users\user\Documents\WindowsPowerShell\Modules' by adding "-Scope CurrentUser" to your command. You can also try
running the Windows PowerShell session with elevated rights (Run as Administrator).
At line:1 char:1
+ Install-Module Microsoft.WinGet.Client -AllowClobber
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidArgument: (:) [Install-Module], ArgumentException
    + FullyQualifiedErrorId : InstallModuleNeedsCurrentUserScopeParameterForNonAdminUser,Install-Module

PS C:\Users\user> Install-Module Microsoft.WinGet.Client -AllowClobber -Scope CurrentUser

Untrusted repository
You are installing the modules from an untrusted repository. If you trust this repository, change its
InstallationPolicy value by running the Set-PSRepository cmdlet. Are you sure you want to install the modules from
'PSGallery'?
[Y] Yes  [A] Yes to All  [N] No  [L] No to All  [S] Suspend  [?] Help (default is "N"): Y
PS C:\Users\user>
HoffmannTom commented 1 day ago

Isn't it dangerous if another module exports the same commandlets? The new module might hide the existing commands.

marticliment commented 1 day ago

Yes, but I can't do much about it