Open Jaykul opened 1 year ago
Thanks @Jaykul for testing and reporting--we are looking into it, to confirm what APIVersion did you set the repo to (looked like in the other issue it was v2)?
Yeah, I tried switching to v3 to try to fix the other problem, but it didn't seem to help, so I'm hitting the v2 API
You can see in debug logs on the Install call since the first request to find the package isn't returning the name, the URL to install is coming up as: https://<host>/nuget/PowerShell/package//{semver}
This is using v1.0.0 of the PSResource module.
Yep. I'm seeing that same thing.
In 1.0.1 Find-PSResource
finds the module (and also produces an error that says it can't find it in any registered repository, since it couldn't find it in PSGallery)...
But when I try to install, it finds it, then forgets the name (prompts for confirmation) and fails to install it:
Install-PSResource LDGitOps -Verbose -Debug
VERBOSE: Attempting to search for packages in 'DevOpsPowerShell'
DEBUG: In InstallHelper::InstallPackages()
DEBUG: In InstallHelper::InstallPackage()
DEBUG: In V2ServerAPICalls::FindName()
DEBUG: In V2ServerAPICalls::HttpRequestCall()
DEBUG: Request url is 'https://nuget.loandepot.com/nuget/PowerShell/FindPackagesById()?id='LDGitOps'&$inlinecount=allpages&$filter=IsLatestVersion and Id eq 'LDGitOps''
Confirm
Are you sure you want to perform this action?
Performing the operation "Install-PSResource" on target "Package to install: '', version: '1.0.0'".
[Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "Y"): Y
DEBUG: In V2ServerAPICalls::InstallVersion()
DEBUG: In V2ServerAPICalls::HttpRequestCallForContent()
DEBUG: Request url is 'https://nuget.loandepot.com/nuget/PowerShell/package//1.0.0'
DEBUG: Response is empty
VERBOSE: Attempting to delete 'C:\Users\joelbennett\AppData\Local\Temp\409f4769-1452-4242-9040-e61812622536'
VERBOSE: Successfully deleted 'C:\Users\joelbennett\AppData\Local\Temp\409f4769-1452-4242-9040-e61812622536'
Install-PSResource: Object reference not set to an instance of an object.
Hi all, I'm also hit by this one.
I did some more debugging, and I find that the issue might well be on ProGet's side, with an additional fix that could solve the issue on your side. ProGet's response to the FindPackagesById includes both a title
and a `m:properties/d:Title tag (where d is xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices") - but the properties/Title tag is empty.
I'm surprised, as looking at the code I would have thought that second empty title would be ignored. I'm using 1.0.3 at the moment, FYI. Here is an anonymized sample output:
<?xml version="1.0" encoding="utf-8"?>
<feed xml:base="https://proget.example.org/nuget/FeedName/" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns="http://www.w3.org/2005/Atom">
<title type="text">Packages</title>
<id>https://proget.example.org/nuget/FeedName/FindPackagesById()/</id>
<updated>2024-03-15T14:35:09Z</updated>
<link rel="self" title="FindPackagesById" href="FindPackagesById" />
<m:count>1
</m:count>
<entry>
<id>https://proget.example.org/nuget/FeedName/Packages(Id='PackageName',Version='1.2.3')</id>
<title type="text">PackageName</title>
<summary type="text"></summary>
<updated>2024-02-06T22:38:37Z</updated>
<author>
<name>Author LTD</name>
</author>
<link rel="edit-media" title="Package" href="Packages(Id='PackageName',Version='1.2.3')/$value" />
<link rel="edit" title="Package" href="Packages(Id='PackageName',Version='1.2.3')" />
<category term="NuGet.Server.DataServices.Package" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" />
<content type="application/zip" src="https://proget.example.org/nuget/FeedName/package/PackageName/1.2.3" />
<m:properties xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata">
<d:Version>1.2.3</d:Version>
<d:Title></d:Title>
<!-- Other fields omitted -->
</m:properties>
</entry>
</feed>
I'll go ahead and report this to Inedo.
Prerequisites
Steps to reproduce
Using Find-PSResource against our ProGet repository returns modules with the Name not populated, and if the module isn't also available in another feed, produces an error claiming it didn't find anything (even though it showed me the version and everything else).
Using Install-PSResource fails, because the name is blank when it tries to install, so it says something like:
Expected behavior
Actual behavior
Error details
When calling install:
Visuals