-
Type:
Bug
-
Status: Done
-
Resolution: Done
-
Affects Version/s: None
-
Fix Version/s: 7.17.2
-
Component/s: None
-
Labels:None
-
Severity:Medium
-
Release Notes:Yes
While resolving Nuget V3 package (StyleCop.Analyzers v1.0.2). Artifactory is throwing the below error:
(o.a.a.n.r.NuGetV3VirtualAndRemoteCommon:124) - Failed to parse registration for repo: nuget-remote, packageId: stylecop.analyzers
org.jfrog.common.JsonParsingException: com.fasterxml.jackson.databind.exc.InvalidFormatException: Cannot deserialize value of type `java.net.URI` from String "https://raw.githubusercontent.com/DotNetAnalyzers/StyleCopAnalyzers/${version}/LICENSE": not a valid textual representation, problem: Illegal character in path at index 69: https://raw.githubusercontent.com/DotNetAnalyzers/StyleCopAnalyzers/$
Steps to Reproduce:
1. nuget install stylecop.analyzers -Version 1.0.2 -Source Artifactory.
Also try installing it from the browser http://<artifactoryURL>:<Port>/artifactory/api/nuget/v3/nuget-remote/registration-semver2/stylecop.analyzers/index.json it throws the error."Failed to parse registration json for package: stylecop.analyzers, in repo: nuget-remotefor more information check the logs."
(please see the screenshot attached that shows the package was downloaded)
2. I modified the index.json in the Artifactory filestore from the location($ART_HOME/data/filestore/76) . In the file( vi 76c92bad0b216d35d91354035ee6034d72947b7f ) i modified all the locations that say https://raw.githubusercontent.com/DotNetAnalyzers/StyleCopAnalyzers/${version}
/LICENSE to
https://raw.githubusercontent.com/DotNetAnalyzers/StyleCopAnalyzers/version/LICENSE
in the index.json.
3.Install again nuget install stylecop.analyzers -Version 1.0.2 -Source Artifactory. we will be able to successfully download the package.
Please see the equivalent request.logs:
20191217060721|18|REQUEST|RESTRICTED_IP|anonymous|GET|/api/nuget/v3/nuget/registration-semver2/stylecop.analyzers/index.json|HTTP/1.1|200|0
20191217060722|19|REQUEST|RESTRICTED_IP|anonymous|GET|/api/nuget/v3/nuget/registration-semver2/stylecop.analyzers/page/1.0.0-alpha001/1.2.0-beta.113.json|HTTP/1.1|200|0
As a workaround, we will have to follow the above steps by modifying the index.json and install the package.
- is duplicated by
-
RTFACT-23903 NuGet V3 deserialization error when installing FSharp.Plotly package
- Open