[RTFACT-18567] Nuget V3 failed to install due to case sensitivity (same work on V2) Created: 19/Feb/19  Updated: 06/Jan/20  Resolved: 01/Jan/20

Status: Resolved
Project: Artifactory Binary Repository
Component/s: None
Affects Version/s: 6.8.2
Fix Version/s: 6.17.0

Type: Bug Priority: High
Reporter: Matthew Wang Assignee: Bar Haim
Resolution: Fixed Votes: 16
Labels: QF, QF-P2, UGA

Issue Links:
Duplicate
is duplicated by RTFACT-14478 Nuget Search should be case in-sensit... Resolved
Assigned QA: Rotem Kfir
Sprint: Pam - Quality 5

 Description   

Steps to reproduce:

-create local nuget repository, deploy package EntityFramework

-set up nuget to use v3 in NuGet.config file:

<add key="ArtifactoryNuGetV3" value="http://localhost:8081/artifactory/api/nuget/v3/nuget-local" protocolVersion="3" />

-Clear all Nuget cache (nuget locals all -clear), then try nuget install EntityFramework (nuget install entityframework), see that the request fails:

GET http://localhost:8081/artifactory/api/nuget/nuget-local/Download/entityframework/6.1.0

NotFound http://localhost:8081/artifactory/api/nuget/nuget-local/Download/entityframework/6.1.0

-Change casing to camel case (nuget install EntityFramework), and see that the request will work now:

curl http://localhost:8081/artifactory/api/nuget/nuget-local/Download/EntityFramework/6.1.0

-This issue due to the metadata file containing the wrong casing:

curl http://localhost:8081/artifactory/api/nuget/v3/nuget-local/registration-semver2/entityframework/page/6.1.0/6.1.0.json
"packageContent":"http://localhost:8081/artifactory/api/nuget/nuget-local/Download/entityframework/6.1.0"

-See that with nuget v2, the casing is correct:

curl http://localhost:8081/artifactory/api/nuget/nuget-local/FindPackagesById()?id=%27EntityFramework%27

<content type="application/zip" src="http://localhost:8081/artifactory/api/nuget/nuget-local/Download/EntityFramework/6.1.0"/>

The issue seems to not occur for packages with just one word in the name, such as jquery



 Comments   
Comment by JD Stuart [ 20/Feb/19 ]

Search using the V3 API also doesn't work.

Given a package names Pbp.API.Shared exists on the nuget-local repository,
When searching for "Shared" or "shared" in the visual studio NuGet package manager
Then no results are returned

Expected behavior is to be the same as NuGet.org; partial match should return results.

Comment by Dan Dafna [ 06/Mar/19 ]

steps to reproduce:

1. Add local nuget repository to NuGet.config file. Make sure protocol is V3

<add key="ArtifactoryLocal" value="http://localhost:8081/artifactory/api/nuget/v3/nuget-local" protocolVersion="3" />

  1. Deploy entityframework.6.1.0.nupkg to the local repository
  2. Verify the package was deployed successfully to the local repository. Notice that name in artifacrory is EntituyFramework.
  3. Clear all Nuget cache: nuget locals all -clear
  4. Install EntityFramework package: nuget install EntityFramework
  5. The following error appear:
    WARNING: Install failed. Rolling back...
    Executing nuget actions took 91.27 ms
    Package 'EntityFramework.6.1.0' is not found on source 'http://localhost:8081/artifactory/api/nuget/v3/nuget-local'.
  6. Change version in NuGet.config to 2.
  7. Repeat steps 3,4 - install succeeded.

 

P.S In order to make v3 work you need to change to camel case  "packageContent" element in list_entityframework_range_6.1.0-6.1.0.dat as described in the Jira description. 

Comment by Simon Eickel [ 13/May/19 ]

any news on this?

Comment by Martin Perzl [ 20/May/19 ]

It seems that Artifactory is not impementing the NuGet protocol V3 correctly.

I have created an issue regarding case-sensitivity for the NuGet Client, but it turned out, that the NuGet protocol V3 is specificated to use lower-case package IDs.

https://github.com/dotnet/core/issues/2703

 

Comment by Martin Perzl [ 20/May/19 ]

in this post, a NuGet specialist is offering help to JFrog on this topic:

https://github.com/dotnet/core/issues/2703#issuecomment-493621621

 

Comment by Joseph Petersen [ 01/Aug/19 ]

JFrog 7.2 seems far out? Is there no way to get this fix in earlier?

We were happily using 6.7.3 and jumped up to 6.11.3 only to experience this bug.

Comment by Jort Koopmans [ 22/Aug/19 ]

We're also impacted by this bug. Workaround is to downgrade to using v2 as described by Dan. I agree with Joseph that v7.2 is very far away.

Comment by Florian Meister [ 23/Oct/19 ]

Same Problem here. Is there any expectation when this issue is resolved?

Generated at Wed Apr 08 09:43:34 UTC 2020 using Jira 8.5.3#805003-sha1:b4933e02eaff29a49114274fe59e1f99d9d963d7.