PowerShellGetv2 icon indicating copy to clipboard operation
PowerShellGetv2 copied to clipboard

PackageProvider issues

Open rafakil opened this issue 3 years ago • 8 comments

Hello, Do you have any idea about this error please: WARNING: Unable to download from URI 'https://go.microsoft.com/fwlink/?LinkID=627338&clcid=0x409' to ''. WARNING: Unable to download the list of available providers. Check your internet connection. Install-PackageProvider : No match was found for the specified search criteria for the provider 'NuGet'. The package provider requires 'PackageManagement' and 'Provider' tags. Please check if the specified package has the tags.

Regards

rafakil avatar Jan 27 '21 11:01 rafakil

Thanks @FullStackRafik what is the output of Invoke-WebRequest https://onegetcdn.azureedge.net/providers/providers.masterList.feed.swidtag ?

SydneyhSmith avatar Jan 28 '21 19:01 SydneyhSmith

Hello @SydneyhSmith Thanks your comment. Actually, I had no errors when I've used the wifi!! So some sources are blocked using Ethernet!!

rafakil avatar Jan 30 '21 10:01 rafakil

If I run what @SydneyhSmith asked above (getting this same error running this on Powershell V7), I get this. PS C:\Windows\System32> Invoke-WebRequest https://onegetcdn.azureedge.net/providers/providers.masterList.feed.swidtag

StatusCode : 200 StatusDescription : OK Content :  <SoftwareIdentity xmlns="http://standards.iso.org/iso/19770/-2/2015/schema.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:discovery="http://p… RawContent : HTTP/1.1 200 OK Accept-Ranges: bytes Age: 190280 Date: Thu, 22 Jul 2021 19:14:22 GMT ETag: 0x8D6B86A3211513D Server: ECAcc Server: (sec/9770) Vary: Accept-Encoding X-Cache: HIT x-ms-blob-type… Headers : {[Accept-Ranges, System.String[]], [Age, System.String[]], [Date, System.String[]], [ETag, System.String[]]…} Images : {} InputFields : {} Links : {} RawContentLength : 1847 RelationLink : {}

@sdwheeler suggests it could be a firewall thing. Is there a way to test for that? I also can't check for updates because the package wasn't installed, but was already there. If I try to install it, I get the above.

rconiv avatar Jul 22 '21 19:07 rconiv

@rconiv thanks for reaching out! Are you getting the exact same error message as the original poster? If so could you please provide the full error output/stack trace?

Could you please also run: gmo "PowerShellGet", "PackageManagement" -ListAvailable

This may be related to some TLS issues which were resolved in later PowerShellGet versions so as long as you have a version >= 2.2.4.1 that should be resolved.

anamnavi avatar Jul 22 '21 21:07 anamnavi

I don't get the warnings, but the rest is the same.

PS C:\Windows\System32> Install-PackageProvider -Name NuGet -Force Install-PackageProvider: No match was found for the specified search criteria for the provider 'NuGet'. The package provider requires 'PackageManagement' and 'Provider' tags. Please check if the specified package has the tags.

PS C:\Windows\System32> gmo "PowerShellGet", "PackageManagement" -ListAvailable

Directory: C:\Users\jonm\OneDrive - ULS\Documents\PowerShell\Modules

ModuleType Version PreRelease Name PSEdition ExportedCommands


Script 2.2.5 PowerShellGet Desk {Find-Command, Find-DSCResource, Find-M…

Directory: C:\program files\powershell\7\Modules

ModuleType Version PreRelease Name PSEdition ExportedCommands


Script 1.4.7 PackageManagement Desk {Find-Package, Get-Package, Get-Package… Script 2.2.5 PowerShellGet Desk {Find-Command, Find-DSCResource, Find-M…

Directory: C:\Program Files\WindowsPowerShell\Modules

ModuleType Version PreRelease Name PSEdition ExportedCommands


Script 1.4.7 PackageManagement Desk {Find-Package, Get-Package, Get-Package… Binary 1.0.0.1 PackageManagement Desk {Find-Package, Get-Package, Get-Package… Script 2.2.5 PowerShellGet Desk {Find-Command, Find-DSCResource, Find-M… Script 1.0.0.1 PowerShellGet Desk {Install-Module, Find-Module, Save-Modu…

rconiv avatar Jul 22 '21 21:07 rconiv

I think the problem is with caused by OneDrive. I have seen all kinds of strange errors when the Modules folder (under Documents) has been redirected to OneDrive. Try removing your Documents folder from OneDrive sync.

sdwheeler avatar Jul 22 '21 21:07 sdwheeler

I was wondering that myself. Interesting they decided to put the modules folder in the documents folder. Would think that this issue would show up fairly often, unless most people don't have their documents backing up to onedrive.

I turned off Documents from OneDrive sync, and copied the powershell folder in to it (by default the files stay on the onedrive folder it seems), and when I run gmo "PowerShellGet", "PackageManagement" -ListAvailable it still shows it looking for it in the onedrive folder. Is there something I have to do, to get it to look at the local documents folder, and not the onedrive one?

rconiv avatar Jul 22 '21 22:07 rconiv

Be sure to start a new PowerShell session after you disabled OneDrive and restored the Documents folder.

sdwheeler avatar Jul 23 '21 01:07 sdwheeler