Closed XinSSS closed 3 days ago
I think I have the same issue. When updating to UniGetUI today, I did see a screen popup to install something (...) with a lot of errors (red text). So I think something did not install correctly. In my new version I do not see any WinGet packages when I go to 'Installed on this system'.
These are the errors I see when I use this command: Install-Module Microsoft.WinGet.Client :
Cannot invoke method. Method invocation is supported only on core types in this language mode.
At C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\1.0.0.1\PSModule.psm1:7574 char:13
+ $wid=[System.Security.Principal.WindowsIdentity]::GetCurr ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [], RuntimeException
+ FullyQualifiedErrorId : MethodInvocationNotSupportedInConstrainedLanguage
new-object : Cannot create type. Only core types are supported in this language mode.
At C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\1.0.0.1\PSModule.psm1:7575 char:18
+ ... $prp=new-object System.Security.Principal.WindowsPrincipal($wi ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : PermissionDenied: (:) [New-Object], PSNotSupportedException
+ FullyQualifiedErrorId : CannotCreateTypeConstrainedLanguage,Microsoft.PowerShell.Commands.NewObjectCommand
You cannot call a method on a null-valued expression.
At C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\1.0.0.1\PSModule.psm1:7577 char:13
+ $script:IsRunningAsElevated = $prp.IsInRole($adm)
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [], RuntimeException
+ FullyQualifiedErrorId : InvokeMethodOnNull
Cannot invoke method. Method invocation is supported only on core types in this language mode.
At C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\1.0.0.1\PSModule.psm1:7455 char:8
+ if($Force -or $psCmdlet.ShouldContinue($shouldContinueQueryMessag ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [], RuntimeException
+ FullyQualifiedErrorId : MethodInvocationNotSupportedInConstrainedLanguage
New-Object : Cannot create type. Only core types are supported in this language mode.
At C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\1.0.0.1\PSModule.psm1:14734 char:18
+ $exception = New-Object $ExceptionName $ExceptionMessage;
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : PermissionDenied: (:) [New-Object], PSNotSupportedException
+ FullyQualifiedErrorId : CannotCreateTypeConstrainedLanguage,Microsoft.PowerShell.Commands.NewObjectCommand
New-Object : Cannot create type. Only core types are supported in this language mode.
At C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\1.0.0.1\PSModule.psm1:14735 char:20
+ ... rorRecord = New-Object System.Management.Automation.ErrorRecord $exce ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : PermissionDenied: (:) [New-Object], PSNotSupportedException
+ FullyQualifiedErrorId : CannotCreateTypeConstrainedLanguage,Microsoft.PowerShell.Commands.NewObjectCommand
Cannot invoke method. Method invocation is supported only on core types in this language mode.
At C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\1.0.0.1\PSModule.psm1:14736 char:5
+ $CallerPSCmdlet.ThrowTerminatingError($errorRecord)
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [], RuntimeException
+ FullyQualifiedErrorId : MethodInvocationNotSupportedInConstrainedLanguage
Cannot invoke method. Method invocation is supported only on core types in this language mode.
At C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\1.0.0.1\PSModule.psm1:1799 char:16
+ if($PSBoundParameters.ContainsKey("Repository"))
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [], RuntimeException
+ FullyQualifiedErrorId : MethodInvocationNotSupportedInConstrainedLanguage
PackageManagement\Install-Package : Unable to find module providers (PowerShellGet).
At C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\1.0.0.1\PSModule.psm1:1809 char:21
+ ... $null = PackageManagement\Install-Package @PSBoundParameters
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (Microsoft.Power....InstallPackage:InstallPackage) [Install-Package], E
xception
+ FullyQualifiedErrorId : UnknownProviders,Microsoft.PowerShell.PackageManagement.Cmdlets.InstallPackage
I think you have PowerShell misconfigured: https://devblogs.microsoft.com/powershell/powershell-constrained-language-mode/
In the settings, under 'package managers' -> WinGet, I used 'Reset Winget Sources'. There is a green check 'Winget is enabled and ready to go'. Winget Version: Naive Winget CLI version: v1.8.1791 Microsoft.WinGet.Client PSModule version: Using Native Winget helper (COM Api)
I think you have PowerShell misconfigured: https://devblogs.microsoft.com/powershell/powershell-constrained-language-mode/
I'll check that out! Thanks.
@XinSSS, your issue is caused by WinGet failing to connect to Catalogs, and I can't fix this from UniGetUI
@XinSSS, your issue is caused by WinGet failing to connect to Catalogs, and I can't fix this from UniGetUI
Is there any way to fix this? I can't get enough information from the above URL.
I don't know, I have never seen it. Perhaps you can open an issue at microsoft/winget-cli, they may be able to help you
I think I got it fiex. I had some restrcvited plicy serttings I needed to change. https://learn.microsoft.com/nl-nl/powershell/module/microsoft.powershell.security/set-executionpolicy?view=powershell-7.4 After that I was able to use Install-Module Microsoft.WinGet.Client and the I reset the Winget Source in the application settings. After a restart of UniGetUI the packages (and updates) showed up. Excellent!
@marticliment I can only roll back to version 3.0.2, which works fine. How do I disable the automatic software update installation 3.1.0? I have already disabled it in the settings.
This happened to me as well. In my case, it was because I had Cobalt installed and it offered conflicting Powershell commands.
Fix for me was to uninstall that and restart UniGetUI and let it grab the dependency again.
Similar problem, module is installed, but unigetui still can't find it.
you need to disable updates again in 3.0.2
This happened to me as well. In my case, it was because I had Cobalt installed and it offered conflicting Powershell commands.
Fix for me was to uninstall that and restart UniGetUI and let it grab the dependency again.
I only have PowerShell 7 and Oh My Posh. Not sure if my problem is related to this. I need to research it.
I had the same problem. Tried everything. In my case it helped to copy the module to the root module folder:
the folder: %Documents%\WindowsPowerShell\Modules\Microsoft.WinGet.Client\PowerShell\Modules\Microsoft.WinGet.Client\
copied to
c:\Program Files\WindowsPowerShell\Modules\
I am having this issue too. I clicked the reset button in the settings and it cannot properly add the source.
I had the same problem. Tried everything. In my case it helped to copy the module to the root module folder:
the folder: %Documents%\WindowsPowerShell\Modules\Microsoft.WinGet.Client\PowerShell\Modules\Microsoft.WinGet.Client\
copied to
c:\Program Files\WindowsPowerShell\Modules\
This is the result of installing Microsoft.WinGet.Client using wingetui. If you use administrator privileges, its installation location will be C:\Program Files\WindowsPowerShell\Modules.
Unfortunately for me, I tried all the locations but it didn't work. wingetui can install new software on my computer through winget, but it can't get the installed list. This is no problem in powershell.
Think I'm having the same issue. Winget just forced an update on me, then keeps telling me that the Powershell module is not installed. It appears to download and install it, but then after WinGet restarts it says the module needs to be installed and repeats the process.
Update: I got it working, it appears to have been blocked because the module is flagged as unsafe, assuming because it's new? If you open an admin PowerShell terminal, ensure you uninstall the current version: Uninstall-Module Microsoft.WinGet.Client
, then install the new version manually Install-Module Microsoft.WinGet.Client
you get a security warning saying it's not trusted. If you accept anyway, it installs and UniGet stops complaining it can't find it and it can find my packages now.
I don't know why, but I can only find Microsoft.WinGet.Client
in the Get-InstalledModule
command, and I can't find it in the other commands(like Get-Module
Get-Module -ListAvailable
).
Get-Module -ListAvailable
But now it is located in the directory C:\Program Files\WindowsPowerShell\Modules
I am also confused about the version numbers.
The winget version in use is v1.9.1792-preview
.
The installed Microsoft.WinGet.Client version is 1.8.1791
.
Is there anything wrong with this?
I am also confused about the version numbers. The winget version in use is
v1.9.1792-preview
. The installed Microsoft.WinGet.Client version is1.8.1791
. Is there anything wrong with this?
This should be fine
Were you able to uninstall it with the command Uninstall-Module Microsoft.WinGet.Client
?
Were you able to uninstall it with the command
Uninstall-Module Microsoft.WinGet.Client
?
I have uninstalled it in Windows PowerShell until an error message appears, and then tried to reinstall it.
And neither does it work?
And neither does it work?
The installation was also smooth after uninstall, but it just didn't take effect in wingetui, I don't know why.
I will investigate. Meanwhile, please downgrade to 3.0.2 and disable updates
I will investigate. Meanwhile, please downgrade to 3.0.2 and disable updates
FWIW I couldn't downgrade. WinGet 3.0.2 just kept crashing after I upgraded to 3.1. Assuming there was some config file I couldn't find somewhere that is not backwards compatible so just keep that in mind.
WinGet 3.0.2 just kept crashing after
Any crash logs?
WinGet 3.0.2 just kept crashing after
Any crash logs?
I didn't know where they were stored and I couldn't open WinGet to check tbh haha. I instead upgraded back to 3.1 and got the module working (what I posted above) so that 3.1 appears to be working as expected now (for me at least).
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.
@marticliment Thank you for the compatibility change. Now the list of installed software is displayed normally. The following is the log
[2024/7/6 11:09:50] __ __ _ ______ __ __ ______
/ / / /___ (_) ____/__ / /_/ / / / _/
/ / / / __ \/ / / __/ _ \/ __/ / / // /
/ /_/ / / / / / /_/ / __/ /_/ /_/ // /
\____/_/ /_/_/\____/\___/\__/\____/___/
Welcome to UniGetUI Version 3.11
[2024/7/6 11:09:50]
[2024/7/6 11:09:50] Version Code: 3.109
[2024/7/6 11:09:50] Encoding Code Page set to 936
[2024/7/6 11:09:50] Using bundled GSudo at C:\Program Files\WingetUI\Assets\Utilities\gsudo.exe
[2024/7/6 11:09:50] Loaded language locale: zh_CN
[2024/7/6 11:09:50] Randomly-generated background API auth token for the current session: xw944jf0oty5v6b5hdn43h1c2u6qpxm1fh06z7fcwy618g8a4biconcrmxlu751y
[2024/7/6 11:09:51] Api running on http://localhost:7058
[2024/7/6 11:09:51] Lang files were updated successfully from GitHub
[2024/7/6 11:09:51] Downloaded new icons and screenshots successfully!
[2024/7/6 11:09:51] ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
█▀▀▀▀▀▀▀▀▀▀▀▀▀ MANAGER LOADED ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
█ Name: .NET Tool
█ Enabled: False
█ THE MANAGER IS DISABLED
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
[2024/7/6 11:09:51] ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
█▀▀▀▀▀▀▀▀▀▀▀▀▀ MANAGER LOADED ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
█ Name: Pip
█ Enabled: False
█ THE MANAGER IS DISABLED
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
[2024/7/6 11:09:51] ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
█▀▀▀▀▀▀▀▀▀▀▀▀▀ MANAGER LOADED ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
█ Name: Winget
█ Enabled: True
█ Found: True
█ Fancye exe name: winget.exe
█ Executable path: C:\Users\Shao\AppData\Local\Microsoft\WindowsApps\winget.exe
█ Call arguments:
█ Version:
█ Native WinGet CLI Version: v1.9.1792-preview
█ Microsoft.WinGet.Client PSModule version:
█ Using Native WinGet helper (COM Api)
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
[2024/7/6 11:09:52] ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
█▀▀▀▀▀▀▀▀▀▀▀▀▀ MANAGER LOADED ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
█ Name: Npm
█ Enabled: False
█ THE MANAGER IS DISABLED
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
[2024/7/6 11:09:52] ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
█▀▀▀▀▀▀▀▀▀▀▀▀▀ MANAGER LOADED ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
█ Name: Chocolatey
█ Enabled: False
█ THE MANAGER IS DISABLED
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
[2024/7/6 11:09:52] ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
█▀▀▀▀▀▀▀▀▀▀▀▀▀ 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:
█ 716b6db3 chore(release): Bump to version 0.5.0 (#6035)
█
█ 'main' bucket:
█ 7e455fe35 trid: Update to version 2.24-24.07.05
█
█ 'extras' bucket:
█ 8fb8f35d1 sidekick-browser: Update to version 120.58.1.38488-aa4b5ae
█
█ 'dorado' bucket:
█ bd1f64a2 typos: Update to version 1.23.1
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
[2024/7/6 11:09:52] UniGetUI is up to date
[2024/7/6 11:09:53] ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
█▀▀▀▀▀▀▀▀▀▀▀▀▀ 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.2506
█ PSEdition Desktop
█ PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
█ BuildVersion 10.0.22621.2506
█ CLRVersion 4.0.30319.42000
█ WSManStackVersion 3.0
█ PSRemotingProtocolVersion 2.3
█ SerializationVersion 1.1.0.1
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
[2024/7/6 11:09:55] Dependency WinGet PowerShell Module for manager Winget is present
[2024/7/6 11:09:55] Found 5 installed packages from Scoop
[2024/7/6 11:09:55] Dependency Scoop-Search for manager Scoop is present
[2024/7/6 11:09:55] Dependency Git for manager Scoop is present
[2024/7/6 11:09:55] LoadComponentsAsync finished executing. All managers loaded. Proceeding to interface.
[2024/7/6 11:09:57] Found 4 installed packages from PowerShell
[2024/7/6 11:09:58] WinGet installed packages returned zero packages, attempting legacy...
[2024/7/6 11:09:58] WinGet updates returned zero packages, attempting legacy...
[2024/7/6 11:09:58] Found 0 available updates from PowerShell
[2024/7/6 11:10:01] Found 320 installed packages from Winget
[2024/7/6 11:10:01] Found 24 available updates from Winget
[2024/7/6 11:10:01] Backup saved to C:\Users\Shao\Documents\UniGetUI\SHAO-PC 已安装软件包列表 2024-07-06 11-10-01.json
[2024/7/6 11:10:02] Found 5 installed packages from Scoop
[2024/7/6 11:10:07] Found 2 available updates from Scoop
Package manager log
Manager Winget with version:
Native WinGet CLI Version: v1.9.1792-preview
Microsoft.WinGet.Client PSModule version:
Using Native WinGet helper (COM Api)
——————————————————————————————————————————
Logged native task on manager Winget. Task type is ListSources
Process start time: 2024/7/6 11:09:51
Process end time: 2024/7/6 11:09:51
-- Task information
...
The task reported success
——————————————————————————————————————————
Logged subprocess-based task on manager Winget. Task type is RefreshIndexes
Subprocess executable: "C:\Users\Shao\AppData\Local\Microsoft\WindowsApps\winget.exe"
Command-line arguments: " source update --disable-interactivity"
Process start time: 2024/7/6 11:09:53
Process end time: 2024/7/6 11:09:55
-- Process STDOUT
...
Return code: SUCCESS (0)
——————————————————————————————————————————
Logged subprocess-based task on manager Winget. Task type is ListPackages
Subprocess executable: "cmd.exe"
Command-line arguments: "/C C:\Windows\system32\windowspowershell\v1.0\powershell.exe -ExecutionPolicy Bypass -NoLogo -NoProfile"
Process start time: 2024/7/6 11:09:53
Process end time: 2024/7/6 11:09:58
-- Process STDIN
...
-- Process STDOUT
...
-- Process STDERR
Get-WinGetPackage : An error occurred while searching for packages: CatalogError
所在位置 行:1 字符: 1
+ Get-WinGetPackage | Print-WinGetPackage
+ ~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Get-WinGetPackage], FindPackagesException
+ FullyQualifiedErrorId : RuntimeException,Microsoft.WinGet.Client.Commands.GetPackageCmdlet
Return code: SUCCESS (0)
——————————————————————————————————————————
Logged native task on manager Winget. Task type is ListSources
Process start time: 2024/7/6 11:09:54
Process end time: 2024/7/6 11:09:54
-- Task information
...
The task reported success
——————————————————————————————————————————
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: 2024/7/6 11:09:55
Process end time: 2024/7/6 11:09:58
-- Process STDIN
...
-- Process STDOUT
...
-- Process STDERR
Get-WinGetPackage : An error occurred while searching for packages: CatalogError
所在位置 行:1 字符: 1
+ Get-WinGetPackage | Print-WinGetPackage
+ ~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Get-WinGetPackage], FindPackagesException
+ FullyQualifiedErrorId : RuntimeException,Microsoft.WinGet.Client.Commands.GetPackageCmdlet
Return code: SUCCESS (0)
——————————————————————————————————————————
Please confirm these before moving forward
UniGetUI Version
3.1.0
Windows version, edition and architecture
Windows 11 22H2 22621.3296
Describe your issue
I can't find winget package after update. I have run command
Install-Module Microsoft.WinGet.Client
in powershell.Steps to reproduce the issue
No response
UniGetUI Log
Package Managers Logs
Relevant information
No response
Screenshots and videos