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] Can't find Winget package #2402

Closed
4 tasks done
XinSSS opened this issue Jul 3, 2024 · 30 comments · Fixed by #2440
Closed
4 tasks done

[BUG] Can't find Winget package #2402

XinSSS opened this issue Jul 3, 2024 · 30 comments · Fixed by #2440
Assignees
Labels
bug Something isn't working ready-to-go

Comments

@XinSSS
Copy link

XinSSS commented Jul 3, 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.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

[2024/7/3 18:13:09] 
                       __  __      _ ______     __  __  ______
                      / / / /___  (_) ____/__  / /_/ / / /  _/
                     / / / / __ \/ / / __/ _ \/ __/ / / // /  
                    / /_/ / / / / / /_/ /  __/ /_/ /_/ // /   
                    \____/_/ /_/_/\____/\___/\__/\____/___/   
                        Welcome to UniGetUI Version 3.1.0
[2024/7/3 18:13:09]
[2024/7/3 18:13:09] Version Code:  3.1
[2024/7/3 18:13:09] Using bundled GSudo at C:\Program Files\WingetUI\Assets\Utilities\gsudo.exe
[2024/7/3 18:13:09] Loaded language locale: zh_CN
[2024/7/3 18:13:10] Randomly-generated background API auth token for the current session: 5fqxotkxtam7iziqzfjp7iz1uwrnnwb50dtfgtdjy90zd2imruhm9eau2arhhi6l
[2024/7/3 18:13:10] Api running on http://localhost:7058
[2024/7/3 18:13:10] Downloaded new icons and screenshots successfully!
[2024/7/3 18:13:10] ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
                    █▀▀▀▀▀▀▀▀▀▀▀▀▀ MANAGER LOADED ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
                    █ Name: .NET Tool
                    █ Enabled: False
                    █ THE MANAGER IS DISABLED
                    ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
[2024/7/3 18:13:10] ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
                    █▀▀▀▀▀▀▀▀▀▀▀▀▀ MANAGER LOADED ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
                    █ Name: Pip
                    █ Enabled: False
                    █ THE MANAGER IS DISABLED
                    ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
[2024/7/3 18:13:11] UniGetUI is up to date
[2024/7/3 18:13:11] Lang files were updated successfully from GitHub
[2024/7/3 18:13:11] ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
                    █▀▀▀▀▀▀▀▀▀▀▀▀▀ MANAGER LOADED ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
                    █ Name: Npm
                    █ Enabled: False
                    █ THE MANAGER IS DISABLED
                    ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
[2024/7/3 18:13:11] ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
                    █▀▀▀▀▀▀▀▀▀▀▀▀▀ 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: 
                    █   Naive WinGet CLI Version: v1.9.1792-preview
                    █   Microsoft.WinGet.Client PSModule version: 
                    █   Using Native WinGet helper (COM Api)
                    ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
[2024/7/3 18:13:11] ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
                    █▀▀▀▀▀▀▀▀▀▀▀▀▀ MANAGER LOADED ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
                    █ Name: Chocolatey
                    █ Enabled: False
                    █ THE MANAGER IS DISABLED
                    ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
[2024/7/3 18:13:12] ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
                    █▀▀▀▀▀▀▀▀▀▀▀▀▀ 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:
                    █   5246366cf uv: Update to version 0.2.21
                    █   
                    █   'extras' bucket:
                    █   0fb73b4e3 sidekick-browser: Update to version 120.58.1.38488-aa4b5ae
                    █   
                    █   'dorado' bucket:
                    █   7a3725fb swift-nightly: Update to version 20240702.3
                    ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
[2024/7/3 18:13:13] ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
                    █▀▀▀▀▀▀▀▀▀▀▀▀▀ 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/3 18:13:14] Dependency WinGet PowerShell Module for manager Winget is present
[2024/7/3 18:13:14] Found 5 installed packages from Scoop
[2024/7/3 18:13:14] Dependency Scoop-Search for manager Scoop is present
[2024/7/3 18:13:14] Dependency Git for manager Scoop is present
[2024/7/3 18:13:14] LoadComponentsAsync finished executing. All managers loaded. Proceeding to interface.
[2024/7/3 18:13:16] Found 4 installed packages from PowerShell
[2024/7/3 18:13:17] Found 0 installed packages from Winget
[2024/7/3 18:13:17] Backup saved to C:\Users\Shao\Documents\UniGetUI\SHAO-PC 已安装软件包列表 2024-07-03 18-13-17.json
[2024/7/3 18:13:18] Found 0 available updates from Winget
[2024/7/3 18:13:18] Found 0 available updates from PowerShell
[2024/7/3 18:13:20] Found 5 installed packages from Scoop
[2024/7/3 18:13:25] Found 2 available updates from Scoop

Package Managers Logs

Manager Winget with version:
Naive 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/3 18:13:11
Process end time:   2024/7/3 18:13:11

-- 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/3 18:13:13
Process end time:   2024/7/3 18:13:14

-- 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: 2024/7/3 18:13:13
Process end time:   2024/7/3 18:13:17

-- Process STDIN
 ...

-- Process STDOUT
 ...

-- Process STDERR
  Write-Output : �޷�����Write-Output����ʶ��Ϊ cmdlet���������ű��ļ�������г�������ơ��������Ƶ�ƴд���������·��
  ����ȷ��·����ȷ��Ȼ������һ�Ρ�
  ����λ�� ��:1 �ַ�: 1
  + Write-Output (Get-Module -Name Microsoft.WinGet.Client).Version
  + ~~~~~~~~~~~~~
      + CategoryInfo          : ObjectNotFound: (Write-Output:String) [], CommandNotFoundException
      + FullyQualifiedErrorId : CommandNotFoundException
   
  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/3 18:13:13
Process end time:   2024/7/3 18:13:13

-- 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: 2024/7/3 18:13:14
Process end time:   2024/7/3 18:13:18

-- Process STDIN
 ...

-- Process STDOUT
 ...

-- Process STDERR
  Write-Output : �޷�����Write-Output����ʶ��Ϊ cmdlet���������ű��ļ�������г�������ơ��������Ƶ�ƴд���������·��
  ����ȷ��·����ȷ��Ȼ������һ�Ρ�
  ����λ�� ��:1 �ַ�: 1
  + Write-Output (Get-Module -Name Microsoft.WinGet.Client).Version
  + ~~~~~~~~~~~~~
      + CategoryInfo          : ObjectNotFound: (Write-Output:String) [], CommandNotFoundException
      + FullyQualifiedErrorId : CommandNotFoundException
   
  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)

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

Relevant information

No response

Screenshots and videos

Snipaste_2024-07-03_18-16-02

@XinSSS XinSSS added the bug Something isn't working label Jul 3, 2024
@jjnxpct
Copy link

jjnxpct commented Jul 3, 2024

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

@marticliment
Copy link
Owner

I think you have PowerShell misconfigured:
https://devblogs.microsoft.com/powershell/powershell-constrained-language-mode/

@jjnxpct
Copy link

jjnxpct commented Jul 3, 2024

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)

@jjnxpct
Copy link

jjnxpct commented Jul 3, 2024

I think you have PowerShell misconfigured: https://devblogs.microsoft.com/powershell/powershell-constrained-language-mode/

I'll check that out! Thanks.

@marticliment
Copy link
Owner

@XinSSS, your issue is caused by WinGet failing to connect to Catalogs, and I can't fix this from UniGetUI

@XinSSS
Copy link
Author

XinSSS commented Jul 3, 2024

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

@marticliment
Copy link
Owner

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

@jjnxpct
Copy link

jjnxpct commented Jul 3, 2024

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!

@XinSSS
Copy link
Author

XinSSS commented Jul 3, 2024

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

Snipaste_2024-07-03_19-38-04

Snipaste_2024-07-03_19-38-21

@MrCSharp22
Copy link

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.

@soredake
Copy link

soredake commented Jul 3, 2024

Similar problem, module is installed, but unigetui still can't find it.

@marticliment
Copy link
Owner

you need to disable updates again in 3.0.2

@XinSSS
Copy link
Author

XinSSS commented Jul 3, 2024

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.

@oroehrer
Copy link

oroehrer commented Jul 3, 2024

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\

@kir-kir
Copy link

kir-kir commented Jul 3, 2024

I am having this issue too. I clicked the reset button in the settings and it cannot properly add the source.
image

@XinSSS
Copy link
Author

XinSSS commented Jul 3, 2024

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.

Snipaste_2024-07-03_22-32-07

Snipaste_2024-07-03_22-02-38

Snipaste_2024-07-03_22-27-05

@marty0678
Copy link

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.

@marty0678
Copy link

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.

@XinSSS
Copy link
Author

XinSSS commented Jul 4, 2024

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

Snipaste_2024-07-04_08-44-55

Get-Module -ListAvailable
Snipaste_2024-07-04_08-46-02

But now it is located in the directory C:\Program Files\WindowsPowerShell\Modules
Snipaste_2024-07-04_08-50-40

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?

@marticliment
Copy link
Owner

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?

This should be fine

@marticliment
Copy link
Owner

Were you able to uninstall it with the command Uninstall-Module Microsoft.WinGet.Client?

@XinSSS
Copy link
Author

XinSSS commented Jul 4, 2024

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.

@marticliment
Copy link
Owner

And neither does it work?

@XinSSS
Copy link
Author

XinSSS commented Jul 4, 2024

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.

@marticliment
Copy link
Owner

I will investigate. Meanwhile, please downgrade to 3.0.2 and disable updates

@marticliment marticliment added this to the Bugs milestone Jul 4, 2024
@marty0678
Copy link

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.

@marticliment
Copy link
Owner

WinGet 3.0.2 just kept crashing after

Any crash logs?

@marty0678
Copy link

marty0678 commented Jul 4, 2024

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

@marticliment
Copy link
Owner

Hello,

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

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

Excuse me for the inconveniences.

@XinSSS
Copy link
Author

XinSSS commented Jul 6, 2024

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

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

@marticliment marticliment removed this from the Bugs milestone Jul 29, 2024
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

Successfully merging a pull request may close this issue.

8 participants