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] PowerShellGet 1.x (Update-Module) has no -Scope parameter (Microsoft.WinGet.Client can't be updated) #2814

Closed
4 tasks done
Mertsch opened this issue Oct 4, 2024 · 15 comments
Assignees
Labels
bug Something isn't working ready-to-go
Milestone

Comments

@Mertsch
Copy link
Contributor

Mertsch commented Oct 4, 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.2.beta3

Windows version, edition, and architecture

Windows 10

Describe your issue

I am not making sure all my PowerShell 5.x modules are up to date. So apparently I "only" have PowerShellGet 1.x and get the following error

Starting package update operation for package id=Microsoft.WinGet.Client with Manager name=PowerShell
Given installation options are <InstallationOptions: SkipHashCheck=False;InteractiveInstallation=False;RunAsAdministrator=False;Version=;Architecture=;InstallationScope=;InstallationScope=;CustomParameters=;RemoveDataOnUninstall=False>
Process Executable     : C:\WINDOWS\system32\windowspowershell\v1.0\powershell.exe
Process Call Arguments :  -NoProfile -Command Update-Module -Name Microsoft.WinGet.Client -Confirm:$false -Force -Scope CurrentUser
Working Directory      : C:\Users\Mertsch
Process Start Time     : 04.10.2024 10:35:32
Update-Module : A parameter cannot be found that matches parameter name 'Scope'.
At line:1 char:68
+ ... e -Name Microsoft.WinGet.Client -Confirm:$false -Force -Scope Current ...
+                                                            ~~~~~~
+ CategoryInfo          : InvalidArgument: (:) [Update-Module], ParameterBindingException
+ FullyQualifiedErrorId : NamedParameterNotFound,Update-Module
Process Exit Code      : 1
Process End Time       : 04.10.2024 10:35:33

https://learn.microsoft.com/en-us/powershell/module/powershellget/update-module?view=powershellget-1.x
Has noscope (pun intended)
While
https://learn.microsoft.com/en-us/powershell/module/powershellget/update-module?view=powershellget-2.x
or 3.x has

Can UniGet update "PowerShellGet", too?!
Or at least check if 2.x+ is installed?!

Steps to reproduce the issue

No response

UniGetUI Log

[04.10.2024 09:55:48]    __  __      _ ______     __  __  ______
                        / / / /___  (_) ____/__  / /_/ / / /  _/
                       / / / / __ \/ / / __/ _ \/ __/ / / // /
                      / /_/ / / / / / /_/ /  __/ /_/ /_/ // /
                      \____/_/ /_/_/\____/\___/\__/\____/___/
                          Welcome to UniGetUI Version 3.1.2-beta3
[04.10.2024 09:55:48]
[04.10.2024 09:55:48] Version Code:  3,1193
[04.10.2024 09:55:48] Encoding Code Page set to 437
[04.10.2024 09:55:48] Using bundled GSudo at C:\Program Files\UniGetUI\Assets\Utilities\gsudo.exe
[04.10.2024 09:55:49] Loaded language locale: en
[04.10.2024 09:55:49] Starting update check
[04.10.2024 09:55:49] Could not download updated translations from GitHub
[04.10.2024 09:55:50] System.Net.Http.HttpRequestException: The SSL connection could not be established, see inner exception.
                       ---> System.IO.IOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host..
                       ---> System.Net.Sockets.SocketException (10054): An existing connection was forcibly closed by the remote host.
                         --- End of inner exception stack trace ---
                         at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.ThrowException(SocketError error, CancellationToken cancellationToken)
                         at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.System.Threading.Tasks.Sources.IValueTaskSource<System.Int32>.GetResult(Int16 token)
                         at System.Net.Security.SslStream.EnsureFullTlsFrameAsync[TIOAdapter](CancellationToken cancellationToken, Int32 estimatedSize)
                         at System.Runtime.CompilerServices.PoolingAsyncValueTaskMethodBuilder`1.StateMachineBox`1.System.Threading.Tasks.Sources.IValueTaskSource<TResult>.GetResult(Int16 token)
                         at System.Net.Security.SslStream.ReceiveHandshakeFrameAsync[TIOAdapter](CancellationToken cancellationToken)
                         at System.Net.Security.SslStream.ForceAuthenticationAsync[TIOAdapter](Boolean receiveFirst, Byte[] reAuthenticationData, CancellationToken cancellationToken)
                         at System.Net.Http.ConnectHelper.EstablishSslConnectionAsync(SslClientAuthenticationOptions sslOptions, HttpRequestMessage request, Boolean async, Stream stream, CancellationToken cancellationToken)
                         --- End of inner exception stack trace ---
                         at System.Net.Http.ConnectHelper.EstablishSslConnectionAsync(SslClientAuthenticationOptions sslOptions, HttpRequestMessage request, Boolean async, Stream stream, CancellationToken cancellationToken)
                         at System.Net.Http.HttpConnectionPool.ConnectAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
                         at System.Net.Http.HttpConnectionPool.CreateHttp11ConnectionAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
                         at System.Net.Http.HttpConnectionPool.AddHttp11ConnectionAsync(QueueItem queueItem)
                         at System.Threading.Tasks.TaskCompletionSourceWithCancellation`1.WaitWithCancellationAsync(CancellationToken cancellationToken)
                         at System.Net.Http.HttpConnectionPool.SendWithVersionDetectionAndRetryAsync(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken)
                         at System.Net.Http.RedirectHandler.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
                         at System.Net.Http.DecompressionHandler.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
                         at System.Net.Http.HttpClient.GetStringAsyncCore(HttpRequestMessage request, CancellationToken cancellationToken)
                         at UniGetUI.Core.Language.LanguageEngine.DownloadUpdatedLanguageFile(String LangKey) in C:\SomePrograms\WingetUI-Store\src\UniGetUI.Core.LanguageEngine\LanguageEngine.cs:line 137
[04.10.2024 09:55:50] Failed to download icons and screenshots
[04.10.2024 09:55:50] System.Net.Http.HttpRequestException: The SSL connection could not be established, see inner exception.
                       ---> System.IO.IOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host..
                       ---> System.Net.Sockets.SocketException (10054): An existing connection was forcibly closed by the remote host.
                         --- End of inner exception stack trace ---
                         at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.ThrowException(SocketError error, CancellationToken cancellationToken)
                         at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.System.Threading.Tasks.Sources.IValueTaskSource<System.Int32>.GetResult(Int16 token)
                         at System.Net.Security.SslStream.EnsureFullTlsFrameAsync[TIOAdapter](CancellationToken cancellationToken, Int32 estimatedSize)
                         at System.Runtime.CompilerServices.PoolingAsyncValueTaskMethodBuilder`1.StateMachineBox`1.System.Threading.Tasks.Sources.IValueTaskSource<TResult>.GetResult(Int16 token)
                         at System.Net.Security.SslStream.ReceiveHandshakeFrameAsync[TIOAdapter](CancellationToken cancellationToken)
                         at System.Net.Security.SslStream.ForceAuthenticationAsync[TIOAdapter](Boolean receiveFirst, Byte[] reAuthenticationData, CancellationToken cancellationToken)
                         at System.Net.Http.ConnectHelper.EstablishSslConnectionAsync(SslClientAuthenticationOptions sslOptions, HttpRequestMessage request, Boolean async, Stream stream, CancellationToken cancellationToken)
                         --- End of inner exception stack trace ---
                         at System.Net.Http.ConnectHelper.EstablishSslConnectionAsync(SslClientAuthenticationOptions sslOptions, HttpRequestMessage request, Boolean async, Stream stream, CancellationToken cancellationToken)
                         at System.Net.Http.HttpConnectionPool.ConnectAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
                         at System.Net.Http.HttpConnectionPool.CreateHttp11ConnectionAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
                         at System.Net.Http.HttpConnectionPool.AddHttp11ConnectionAsync(QueueItem queueItem)
                         at System.Threading.Tasks.TaskCompletionSourceWithCancellation`1.WaitWithCancellationAsync(CancellationToken cancellationToken)
                         at System.Net.Http.HttpConnectionPool.SendWithVersionDetectionAndRetryAsync(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken)
                         at System.Net.Http.RedirectHandler.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
                         at System.Net.Http.DecompressionHandler.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
                         at System.Net.Http.HttpClient.GetStringAsyncCore(HttpRequestMessage request, CancellationToken cancellationToken)
                         at UniGetUI.Core.IconEngine.IconDatabase.LoadIconAndScreenshotsDatabaseAsync() in C:\SomePrograms\WingetUI-Store\src\UniGetUI.Core.IconStore\IconDatabase.cs:line 70
[04.10.2024 09:55:50] Old chocolatey path does not exist, not migrating Chocolatey
[04.10.2024 09:55:50] ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
                      █▀▀▀▀▀▀▀▀▀▀▀▀▀ MANAGER LOADED ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
                      █ Name: Chocolatey
                      █ Enabled: False
                      █ THE MANAGER IS DISABLED
                      ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
[04.10.2024 09:55:50] Begin "which" search for command npm
[04.10.2024 09:55:50] Begin "which" search for command pwsh.exe
[04.10.2024 09:55:50] Begin "which" search for command python.exe
[04.10.2024 09:55:50] Begin "which" search for command cargo
[04.10.2024 09:55:50] Begin "which" search for command dotnet.exe
[04.10.2024 09:55:50] Begin "which" search for command winget.exe
[04.10.2024 09:55:50] UniGetUI is up to date
[04.10.2024 09:55:50] Command npm was found on C:\Program Files\nodejs\npm
[04.10.2024 09:55:50] Command cargo was not found on the system
[04.10.2024 09:55:50] ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
                      █▀▀▀▀▀▀▀▀▀▀▀▀▀ MANAGER LOADED ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
                      █ Name: Cargo
                      █ Enabled: True
                      █ Found: False
                      █ THE MANAGER WAS NOT FOUND. PERHAPS IT IS NOT 
                      █ INSTALLED OR IT HAS BEEN MISCONFIGURED 
                      ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
[04.10.2024 09:55:50] Command dotnet.exe was found on C:\Program Files\dotnet\dotnet.exe
[04.10.2024 09:55:50] Command python.exe was found on C:\Users\XXX\AppData\Local\Microsoft\WindowsApps\python.exe
[04.10.2024 09:55:50] Command pwsh.exe was found on C:\Users\XXX\AppData\Local\Microsoft\WindowsApps\pwsh.exe
[04.10.2024 09:55:50] Command winget.exe was found on C:\Users\XXX\AppData\Local\Microsoft\WindowsApps\winget.exe
[04.10.2024 09:55:50] ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
                      █▀▀▀▀▀▀▀▀▀▀▀▀▀ MANAGER LOADED ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
                      █ Name: Pip
                      █ Enabled: False
                      █ THE MANAGER IS DISABLED
                      ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
[04.10.2024 09:55:50] Begin "which" search for command scoop
[04.10.2024 09:55:50] ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
                      █▀▀▀▀▀▀▀▀▀▀▀▀▀ MANAGER LOADED ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
                      █ Name: .NET Tool
                      █ Enabled: True
                      █ Found: True
                      █ Fancy exe name: dotnet tool
                      █ Executable path: C:\Program Files\dotnet\dotnet.exe
                      █ Call arguments: tool
                      █ Version: 
                      █   8.0.402
                      ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
[04.10.2024 09:55:50] Command scoop was not found on the system
[04.10.2024 09:55:50] ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
                      █▀▀▀▀▀▀▀▀▀▀▀▀▀ MANAGER LOADED ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
                      █ Name: Scoop
                      █ Enabled: False
                      █ THE MANAGER IS DISABLED
                      ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
[04.10.2024 09:55:50] Loaded 2 sources for manager Winget
[04.10.2024 09:55:50] ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
                      █▀▀▀▀▀▀▀▀▀▀▀▀▀ MANAGER LOADED ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
                      █ Name: Winget
                      █ Enabled: True
                      █ Found: True
                      █ Fancy exe name: winget.exe
                      █ Executable path: C:\Users\XXX\AppData\Local\Microsoft\WindowsApps\winget.exe
                      █ Call arguments: 
                      █ Version: 
                      █   System WinGet CLI Version: v1.8.1911
                      █   Using Native WinGet helper (COM Api)
                      ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
[04.10.2024 09:55:50] ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
                      █▀▀▀▀▀▀▀▀▀▀▀▀▀ MANAGER LOADED ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
                      █ Name: Npm
                      █ Enabled: True
                      █ Found: True
                      █ Fancy exe name: npm
                      █ Executable path: C:\WINDOWS\system32\windowspowershell\v1.0\powershell.exe
                      █ Call arguments:  -NoProfile -ExecutionPolicy Bypass -Command npm
                      █ Version: 
                      █   10.9.0
                      ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
[04.10.2024 09:55:53] Loaded 1 sources for manager PowerShell7
[04.10.2024 09:55:53] ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
                      █▀▀▀▀▀▀▀▀▀▀▀▀▀ MANAGER LOADED ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
                      █ Name: PowerShell7
                      █ Enabled: True
                      █ Found: True
                      █ Fancy exe name: pwsh.exe
                      █ Executable path: C:\Users\XXX\AppData\Local\Microsoft\WindowsApps\pwsh.exe
                      █ Call arguments:  -NoProfile -Command
                      █ Version: 
                      █   PowerShell 7.4.5
                      ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
[04.10.2024 09:55:53] Loaded 1 sources for manager PowerShell
[04.10.2024 09:55:53] ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
                      █▀▀▀▀▀▀▀▀▀▀▀▀▀ MANAGER LOADED ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
                      █ Name: PowerShell
                      █ Enabled: True
                      █ Found: True
                      █ Fancy 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.4957                                                                          
                      █   PSEdition                      Desktop                                                                                 
                      █   PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}                                                                 
                      █   BuildVersion                   10.0.19041.4957                                                                         
                      █   CLRVersion                     4.0.30319.42000                                                                         
                      █   WSManStackVersion              3.0                                                                                     
                      █   PSRemotingProtocolVersion      2.3                                                                                     
                      █   SerializationVersion           1.1.0.1
                      ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
[04.10.2024 09:55:53] LoadComponentsAsync finished executing. All managers loaded. Proceeding to interface.
[04.10.2024 09:55:53] Manager Npm has not implemented RefreshPackageIndexes
[04.10.2024 09:55:53] Manager .NET Tool has not implemented RefreshPackageIndexes
[04.10.2024 09:55:53] Manager PowerShell has not implemented RefreshPackageIndexes
[04.10.2024 09:55:53] Manager PowerShell7 has not implemented RefreshPackageIndexes
[04.10.2024 09:55:53] Begin "which" search for command dotnet-tools-outdated.exe
[04.10.2024 09:55:53] Command dotnet-tools-outdated.exe was found on C:\Users\XXX\.dotnet\tools\dotnet-tools-outdated.exe
[04.10.2024 09:55:53] Loaded 2 sources for manager Winget
[04.10.2024 09:55:53] Begin "which" search for command dotnet-tools-outdated.exe
[04.10.2024 09:55:53] Found 3 installed packages from .NET Tool
[04.10.2024 09:55:53] Command dotnet-tools-outdated.exe was found on C:\Users\XXX\.dotnet\tools\dotnet-tools-outdated.exe
[04.10.2024 09:55:53] Dependency .NET Tools Outdated for manager .NET Tool is present
[04.10.2024 09:55:54] Ignored updates database was never loaded, so it is going to be loaded now
[04.10.2024 09:55:54] Found 0 available updates from .NET Tool
[04.10.2024 09:55:55] Found 1 installed packages from Npm
[04.10.2024 09:55:55] Found 2 installed packages from PowerShell7
[04.10.2024 09:55:55] Loaded 1 sources for manager PowerShell7
[04.10.2024 09:55:55] Found 0 available updates from Npm
[04.10.2024 09:55:56] Loaded 1 sources for manager PowerShell
[04.10.2024 09:55:56] Found 3 installed packages from PowerShell
[04.10.2024 09:55:58] Found 1 available updates from PowerShell
[04.10.2024 09:56:01] Found 0 available updates from PowerShell7
[04.10.2024 09:56:01] Found 4 available updates from Winget
[04.10.2024 09:56:01] Found 279 installed packages from Winget
[04.10.2024 09:56:01] Invalid value for UpdatesCheckInterval, using default value of 3600 seconds
[04.10.2024 10:35:32] Creating new instance of InstallationOptions for package UniGetUI.PackageEngine.PackageClasses.Package, as no instance was found in cache
[04.10.2024 10:35:32] Loaded operation parameters for package id=Microsoft.WinGet.Client on manager PowerShell and operation Update: Update-Module -Name Microsoft.WinGet.Client -Confirm:$false -Force -Scope CurrentUser
[04.10.2024 10:35:32] No Icon URL could be parsed on the manifest Url=https://www.powershellgallery.com/api/v2/Packages(Id='Microsoft.WinGet.Client',Version='1.8.1911')
[04.10.2024 10:35:32] Manager PowerShell did not find a native icon for Microsoft.WinGet.Client
[04.10.2024 10:35:32] Icon id for package=Microsoft.WinGet.Client is microsoft.winget.client
[04.10.2024 10:35:32] Icon for package Microsoft.WinGet.Client was not found, returning default icon
[04.10.2024 10:35:32] Icon for package Microsoft.WinGet.Client was loaded from ms-appx:///Assets/Images/package_color.png
[04.10.2024 10:37:27] Manager PowerShell has not implemented RefreshPackageIndexes
[04.10.2024 10:37:27] Manager .NET Tool has not implemented RefreshPackageIndexes
[04.10.2024 10:37:27] Manager PowerShell7 has not implemented RefreshPackageIndexes
[04.10.2024 10:37:27] Manager Npm has not implemented RefreshPackageIndexes
[04.10.2024 10:37:27] Begin "which" search for command dotnet-tools-outdated.exe
[04.10.2024 10:37:27] Command dotnet-tools-outdated.exe was found on C:\Users\XXX\.dotnet\tools\dotnet-tools-outdated.exe
[04.10.2024 10:37:27] Found 0 available updates from .NET Tool
[04.10.2024 10:37:28] Found 0 available updates from Npm
[04.10.2024 10:37:31] Found 0 available updates from PowerShell
[04.10.2024 10:37:32] Found 8 available updates from Winget
[04.10.2024 10:37:33] Found 0 available updates from PowerShell7
[04.10.2024 10:37:33] Invalid value for UpdatesCheckInterval, using default value of 3600 seconds

Package Managers Logs

Manager WinGet with version:
System WinGet CLI Version: v1.8.1911
Using Native WinGet helper (COM Api)

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


Logged native task on manager Winget. Task type is ListSources
Process start time: 04.10.2024 09:55:50
Process end time:   04.10.2024 09:55:50

-- Task information
 ...

The task reported success

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

Logged subprocess-based task on manager Winget. Task type is RefreshIndexes
Subprocess executable: "C:\Users\Mertsch\AppData\Local\Microsoft\WindowsApps\winget.exe"
Command-line arguments: " source update --disable-interactivity"
Process start time: 04.10.2024 09:55:53
Process end time:   04.10.2024 09:55:56

-- Process STDOUT
 ...

Return code: SUCCESS (0)

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

Logged native task on manager Winget. Task type is ListInstalledPackages
Process start time: 04.10.2024 09:55:53
Process end time:   04.10.2024 09:56:01

-- Task information
 ...

The task reported success

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

Logged native task on manager Winget. Task type is ListSources
Process start time: 04.10.2024 09:55:53
Process end time:   04.10.2024 09:55:53

-- Task information
 ...

The task reported success

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

Logged native task on manager Winget. Task type is ListUpdates
Process start time: 04.10.2024 09:55:56
Process end time:   04.10.2024 09:56:01

-- Task information
 ...

The task reported success

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

Logged subprocess-based task on manager Winget. Task type is RefreshIndexes
Subprocess executable: "C:\Users\Mertsch\AppData\Local\Microsoft\WindowsApps\winget.exe"
Command-line arguments: " source update --disable-interactivity"
Process start time: 04.10.2024 10:37:27
Process end time:   04.10.2024 10:37:28

-- Process STDOUT
 ...

Return code: SUCCESS (0)

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

Logged native task on manager Winget. Task type is ListUpdates
Process start time: 04.10.2024 10:37:28
Process end time:   04.10.2024 10:37:32

-- Task information
 ...

The task reported success

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

Relevant information

No response

Screenshots and videos

No response

@Mertsch Mertsch added the bug Something isn't working label Oct 4, 2024
@Mertsch
Copy link
Contributor Author

Mertsch commented Oct 4, 2024

PS> update-Module PowerShellGet
update-Module : Module 'PowerShellGet' (installed at'C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\1.6.0')
cannot be updated because Administrator rights are required to change that directory. Log on to the computer with an
account that has Administrator rights, and then try again. You can also try running the Windows PowerShell session
with elevated rights (Run as Administrator).

Apparently 1.6.0 is so old it can't update itself anymore

PS> update-Module PowerShellGet
PackageManagement\Install-Package : Unable to find repository 'https://www.powershellgallery.com/api/v2/'. Use
Get-PSRepository to see all available repositories.
At C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\1.6.0\PSModule.psm1:2349 char:20
+ ...           $sid = PackageManagement\Install-Package @PSBoundParameters
+                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (Microsoft.Power....InstallPackage:InstallPackage) [Install-Package], Ex
   ception
    + FullyQualifiedErrorId : SourceNotFound,Microsoft.PowerShell.PackageManagement.Cmdlets.InstallPackage

After running Install-Module -Name PowerShellGet -RequiredVersion 2.2.5 -Force it works again.

Note: My Win10 is an upgraded Win7 from 2009.

Apparently it stopped 2017
2024-10-04 11-06-43 WinMergeU

@marticliment
Copy link
Owner

I will investigate, but Windows 10/11 is supposed to come with PowerShellGet v2 by default, perhaps the fact that your pc is a Win7 upgrade could explain why this issue is happening

@marticliment marticliment added this to the Bugs milestone Oct 4, 2024
@Kiina
Copy link

Kiina commented Oct 13, 2024

Noticed I had the same issue, so I came here.

Tried updating it:

update-Module PowerShellGet
Update-Module: Module 'PowerShellGet' was not installed by using Install-Module, so it cannot be updated

Looking at the folder listed above it seems I have version 1.0.0.1. Get-InstalledModule shows absolutely nothing.

After running Install-Module -Name PowerShellGet -RequiredVersion 2.2.5 -Force it works again.

Tried it.

WARNING: The version '1.4.8.1' of module 'PackageManagement' is currently in use. Retry the operation after closing the applications.

Had to remove the folder by hand. Then I noticed uniget was running in a completly different powershell. The one from C:\Windows\System32\WindowsPowerShell\v1.0 that gets called

$PSVersionTable.PSVersion

Major  Minor  Build  Revision
-----  -----  -----  --------
5      1      22621  4249

While the regular powershell I use:

$PSVersionTable.PSVersion

Major  Minor  Patch  PreReleaseLabel BuildLabel
-----  -----  -----  --------------- ----------
7      4      5

So I had to rerun the same command in the older powershell that gets used by uniget. No idea why they seem to not share packages.....

@Mertsch
Copy link
Contributor Author

Mertsch commented Oct 14, 2024

PowerShell 5.1 is the one inside of Windows which will remain as-is, because Microsoft doesn't want to break existing users (and leverage Windows-only-features)
PowerShell 6.x -> 7.x are the "new" PowerShell, as in the "new" Outlook, and are updated regularly with a much shorter support cycle (the one from Windows is decades).
Just like .NET vs .NET Framework.

So UniGet supports both, but apparently 5.1 can be broken (by something).

@jmclaren7
Copy link

jmclaren7 commented Oct 29, 2024

Same thing here. I'm on a Windows 11 install that was a clean install at the time. I had powershellget 1.0.0.1 and no matter what I tried I couldn't get to to upgrade. The only thing that worked was replacing PowerShellGet and PackageManagement in program files with manually downloaded versions.

Looking back in the console of all the things I tried, i just noticed I missed this error about the -AllowClobber parameter so no idea if it would have helped:

PS C:\> Install-Module -Name PowerShellGet -Force
PackageManagement\Install-Package : The following commands are already available on this
system:'Find-Package,Install-Package,Uninstall-Package'. This module 'PackageManagement' may override the existing
commands. If you still want to install this module 'PackageManagement', use -AllowClobber parameter.
At C:\Program Files (x86)\WindowsPowerShell\Modules\PowerShellGet\1.0.0.1\PSModule.psm1:1809 char:21

So maybe something like this would have helped:

Install-Module -Name PowerShellGet -RequiredVersion 2.2.5 -Force -AllowClobber

I'm available to do more testing or try to reproduce this more if it would help.

@Mertsch
Copy link
Contributor Author

Mertsch commented Oct 29, 2024

Indeed, I have installed Win 11 24H2, as new as it gets, and it has version 1.0.0.1. Really weird.

@Mertsch
Copy link
Contributor Author

Mertsch commented Oct 29, 2024

And also interesting, it seems to be on purpose
PS> update-module powershellget update-module : Module 'powershellget' was not installed by using Install-Module, so it cannot be updated.

@Mertsch
Copy link
Contributor Author

Mertsch commented Oct 29, 2024

And 3rd update 😄 The -Scope is present, so it seems that MS wants to lock down this module (sadly with version 1.x) and we can't really make good decisions based on the version number.

It would require some mechanism of detecting a "Locked down version 1" and keep it. Or notify about an outdated "installable" version.
OR
Maybe just use "Get-Help" to see if -NoScope is a thing. I dunno 😶‍🌫️

PS> get-help update-module

NAME
    Update-Module

SYNTAX
    Update-Module [[-Name] <string[]>] [-RequiredVersion <string>] [-MaximumVersion <string>] [-Credential
    <pscredential>] [-Scope {CurrentUser | AllUsers}] [-Proxy <uri>] [-ProxyCredential <pscredential>] [-Force]
    [-AllowPrerelease] [-AcceptLicense] [-PassThru] [-WhatIf] [-Confirm] [<CommonParameters>]

@CodeNeedsCoffee
Copy link

For anyone looking for a temporary workaround, you can go into the installation options and add an additional parameter similar to the following:
> nul || "C:\Windows\system32\windowspowershell\v1.0\powershell.exe" -NoProfile -Command Write-Output "Updated"
Which then allows the update to complete successfully due to the suppression of errors plus the piping allows the command to be ran separately from the scope since the scope is appended at the end:
image

Alternatively, you could remove the null suppression so any errors do bubble up:
|| "C:\Windows\system32\windowspowershell\v1.0\powershell.exe" -NoProfile -Command Write-Output "Updated"

@marticliment marticliment changed the title [BUG] PowerShellGet 1.x (Update-Module) has no -Scope parameter [BUG] PowerShellGet 1.x (Update-Module) has no -Scope parameter (Microsoft.WinGet.Client can't be updated) Nov 2, 2024
@tulving
Copy link

tulving commented Nov 5, 2024

For anyone looking for a temporary workaround, you can go into the installation options and add an additional parameter similar to the following: > nul || "C:\Windows\system32\windowspowershell\v1.0\powershell.exe" -NoProfile -Command Write-Output "Updated" Which then allows the update to complete successfully due to the suppression of errors plus the piping allows the command to be ran separately from the scope since the scope is appended at the end: image

Alternatively, you could remove the null suppression so any errors do bubble up: || "C:\Windows\system32\windowspowershell\v1.0\powershell.exe" -NoProfile -Command Write-Output "Updated"

Thanks, it worked for me!

@paulxjz
Copy link

paulxjz commented Nov 13, 2024

> nul || "C:\Windows\system32\windowspowershell\v1.0\powershell.exe" -NoProfile -Command Write-Output "Updated" image

|| "C:\Windows\system32\windowspowershell\v1.0\powershell.exe" -NoProfile -Command Write-Output "Updated"

Is this where you enter the additional parameter

> nul || "C:\Windows\system32\windowspowershell\v1.0\powershell.exe"  -NoProfile -Command Write-Output "Updated"

or

 || "C:\Windows\system32\windowspowershell\v1.0\powershell.exe"  -NoProfile -Command Write-Output "Updated"

Why do I keep getting prompted for Launching subprocess.--
Quicker_20241113_120814

@marticliment
Copy link
Owner

I have fixed the issue. Please wait for the next beta release and test if the issue gets resolved for you. I will let you know when a new beta release is available.

@Paul051962
Copy link

Für alle, die nach einer vorübergehenden Problemumgehung suchen, können Sie in die Installationsoptionen gehen und einen zusätzlichen Parameter hinzufügen, der dem folgenden ähnelt: Dadurch kann das Update aufgrund der Unterdrückung von Fehlern erfolgreich abgeschlossen werden, und das Piping ermöglicht es, den Befehl getrennt vom Bereich auszuführen, da der Bereich am Ende angehängt wird: > nul || "C:\Windows\system32\windowspowershell\v1.0\powershell.exe" -NoProfile -Command Write-Output "Updated"Bild
Alternativ können Sie die Nullunterdrückung entfernen, damit Fehler auftreten: || "C:\Windows\system32\windowspowershell\v1.0\powershell.exe" -NoProfile -Command Write-Output "Updated"

Danke, es hat bei mir funktioniert!

Danke, auch bei mir wurde das Problem behoben.

@marticliment
Copy link
Owner

Please try this new release: https://github.com/marticliment/UniGetUI/releases/tag/3.1.4-beta1

@kirashi3
Copy link

Please try this new release: https://github.com/marticliment/UniGetUI/releases/tag/3.1.4-beta1

  • I was experiencing what I believe to be the same issue described by @Mertsch when using UniGetUI 3.1.3
  • Updating package "Microsoft.WinGet.Client" completed successfully after installing UniGetUI 3.1.4-beta1. 👍

Also, I have enabled the install prerelease versions of UniGetUI Setting so I'll keep an eye out for future bugs.

Starting package update operation for package id=Microsoft.WinGet.Client with Manager name=PowerShell
Given installation options are <InstallationOptions: SkipHashCheck=False;InteractiveInstallation=False;RunAsAdministrator=False;Version=;Architecture=;InstallationScope=;InstallationScope=;CustomParameters=;RemoveDataOnUninstall=False>
Process Executable     : C:\Windows\system32\windowspowershell\v1.0\powershell.exe
Process Call Arguments :  -NoProfile -Command Update-Module -Name Microsoft.WinGet.Client -Confirm:$false -Force
Working Directory      : C:\Users\KiRaShi
Process Start Time     : 2024-11-22 22:05:30
Process Exit Code      : 0
Process End Time       : 2024-11-22 22:05:39

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

No branches or pull requests

9 participants