[RTFACT-9344] Incorrect NuGet server API implementation: incorrect results for "Search()" Created: 17/Feb/16  Updated: 14/Nov/17  Resolved: 29/Sep/16

Status: Resolved
Project: Artifactory Binary Repository
Component/s: NuGet
Affects Version/s: 4.3.3, 4.6.0, 4.7.1, 4.7.6, 4.8.2, 4.11.2
Fix Version/s: 4.13.1

Type: Bug Priority: Blocker
Reporter: Sergei Dorogin Assignee: Shay Yaakov (Inactive)
Resolution: Fixed Votes: 8
Labels: None

Issue Links:
is related to RTFACT-12357 Nuget feed set "IsAbsoluteLatestVersi... Open
is related to RTFACT-9275 Incorrect NuGet server API implementa... Resolved
is related to RTFACT-9647 Paged output on NuGet search Resolved
is related to RTFACT-12379 NuGet skip logic is omitting results ... Resolved
is related to RTFACT-12311 Wrong URL in Nuget feed for "next" link Resolved


I already reported an issue with incorrect NuGet server implementation - see RTFACT-9275.
This is another one. Now Artifactory doesn't return expected packages for requests from NuGet client when we're browsing a repo in NuGet Package Manager in Visual Studio.

I have a repo with 3175 packages most of which are pre-release.
Some users started complaining that they can't find fresh packages. I checked the repo via WebApp (https://myserver/webapp/) and I did see the package. Then I opened VS's dialog "Manage NuGet Packages" and browsed the repo (with enabled "Include Prerelaese" option). There was no the latest package! Only the previous one ("2.0.0-SNAPSHOT-1706406").

Then I checked via nuget powershell ("Package Manager Console"):

get-package -Filter XFW3.DslDesigner -ListAvailable -Source https://myserver/api/nuget/rnd-nuget-dev -IncludePrerelease

and it returned my latest package ("2.0.0-SNAPSHOT-1706758").

I checked via Fiddler what requests are being sent by nuget.
In the first case (when I browse the repo in VS) it's this one:

Artifactory returns two items for this request - both are for package the same "Croc.DslDesigner" but with different versions: 1.19.2 ?? 2.0.0-SNAPSHOT-1706406. It's incorrect but not critical. The worst thing is that Artifactory didn't return the latest version - "2.0.0-SNAPSHOT-1706758"!

In the other case (when I run "get-package -listavailable" in Package Console (powershell) NuGet at first sends the same request as before and gets two versions (incorrect) but then it sends:

and get all versions for this package 'XFW3.DslDesigner'. And now there is the latest version among received ones.

So PS-command get-package shows my the latest version but in UI-dialog I can see only the previous one.

But it's not the end unfortunetelly.

I tried to reindex the repo. I'm not sure when reindexing has finished but after a while (while I was filling this bug) Artifactory stopped returning prerelease packages at all. The means that absolutely the same request (I just hit F5 in the browser) returns only latest release version (1.19.2). PS-command (that is FindPackageById action) still works.

Please fix it ASAP. We hold Pro licence.

Comment by Sergei Dorogin [ 18/Feb/16 ]

It seems that the problem is with `$filter=IsAbsoluteLatestVersion` parameter. Without it Artifactory returns all version including prerealse, but with it (it's passed by NuGet client in VS) Artifactory returns only release versions or not latest prerelease versions (even with `includePrerelease=true`).

Comment by Sergei Dorogin [ 26/Feb/16 ]

One more example how strange NuGet Server implementation in Artifactory:

D:\>nuget list xfw3.core -Source https://artifacts.company.org/api/nuget/rnd-nuget
Please provide credentials for: https://artifacts.company.org/api/nuget/rnd-nuget
UserName: dev_rnd
Password: ********
XFW3.Core 1.19.3

D:\>nuget install xfw3.core -NoCache -Source https://artifacts.company.org/api/nuget/rnd-nuget
Please provide credentials for: https://artifacts.company.org/api/nuget/rnd-nuget
UserName: dev_rnd
Password: ********
Unable to find version '1.19.3' of package 'xfw3.core'.

This version (1.19.3) does exist in the repository.

Comment by Sergei Dorogin [ 07/Apr/16 ]

I've installed 4.7.1 with a little hope for a fix.
The bug is still there. And it seems that things got worse.
Now Artifactory doesn't return pre-release packages at all. Even via PS-commands:
Get-Package -Filter XFW3.Core -ListAvailable -IncludePrerelease
Returns only the latest released version ignoring all pre-realease versions in the repo.

Your support told me that the issue will be fixed in Q2 2016 and closed support ticket (#37032).
I hoped the fix will be in the next version, but it didn't happen. Please fix ASAP. Currently Artifactory as NuGet server isn't usable.

Comment by Brian Barker [ 07/Apr/16 ]

Sergei, see my comment on RTFACT-6830. Latest nuget clients don't work with artifactory, but you can roll back to 3.3 or earlier as needed: https://dist.nuget.org/index.html.

I don't work on this project, but was hitting issues and came across your tickets.

Comment by Sergei Dorogin [ 07/Apr/16 ]

Brian, thanks for note, but it's stated that 4.7.1 fix is exactly for NuGet in VS2015 Update 2. So I believe JFrog supposes that Artifactory works with NuGet 3.4... See RTFACT-9741

Comment by Sergei Dorogin [ 22/Jun/16 ]

Q2 2016 is almost ended but the bug is still here. Checked in 4.8.2.

Artifactory still cannot be used to install prerelease packages in VS2013.

Comment by Sergei Dorogin [ 02/Sep/16 ]

Can we expect to have a fix this year (2016) ?

Comment by John Lengeling [ 28/Sep/16 ]

We also ran into this issue in Artifactory 4.9.0.

Comment by Sergei Dorogin [ 21/Oct/16 ]

Gosh, is it fixed in 4.13.1? Why is it not mentioned in Release Notes - https://www.jfrog.com/confluence/display/RTF/Release+Notes#ReleaseNotes-Artifactory4.13.1 ?
It's a showstopper for NuGet Server after all.

Generated at Tue Sep 22 14:47:47 UTC 2020 using Jira 8.5.3#805003-sha1:b4933e02eaff29a49114274fe59e1f99d9d963d7.