Uploaded image for project: 'Dev - Nexus Repo'
  1. Dev - Nexus Repo
  2. NEXUS-17611

404s returned for packages containing build-metadata in version

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.10.0, 3.12.1
    • Fix Version/s: 3.14.0
    • Component/s: NuGet
    • Labels:

      Description

      A 404 is returned from nuget.org when attempting to get a package containing build-metadata in it's version e.g. 1.0.0+githash (see SemVer 2.0.0)

      For example https://www.nuget.org/packages/NuGet.Frameworks/4.7.0

      To reproduce:

      1. Setup proxy repo, proxying to https://www.nuget.org/api/v2 (i.e. nuget.org-proxy)
      2. Enable DEBUG logging on com.sonatype.nexus.repository.nuget.internal
      3. Via a nuget client attempt to install package e.g.

       nuget install NuGet.Frameworks -Version 4.7.0 -source http://localhost:8081/repository/nuget.org-proxy

       

      Expected:

      Package metadata and package are located and installed.

      Actual:

      Package is not installed and a 404 is returned. Following observed in logs showing 404 returned from nuget:

      2018-07-13 15:22:08,672+0100 DEBUG [qtp784640267-626]  *UNKNOWN com.sonatype.nexus.repository.nuget.internal.NugetFeedFetcher - Fetching: GET https://www.nuget.org/api/v2/Packages(Id='NuGet.Build.Tasks.Pack',Version='4.8.0-preview3.5278+c3240b16fcf3276246fc8c610771d14ab94fdc02') HTTP/1.1

      2018-07-13 15:22:08,792+0100 DEBUG [qtp784640267-626]  *UNKNOWN com.sonatype.nexus.repository.nuget.internal.NugetFeedFetcher - Response: HttpResponseProxy{HTTP/1.1 404 Not Found [Cache-Control: private, Transfer-Encoding: chunked, Content-Type: text/html; charset=utf-8, Content-Security-Policy: frame-ancestors 'none', X-Frame-Options: deny, X-XSS-Protection: 1; mode=block, X-Content-Type-Options: nosniff, Strict-Transport-Security: max-age=31536000, Date: Fri, 13 Jul 2018 14:22:03 GMT, Connection: close] ResponseEntityProxy{[Content-Type: text/html; charset=utf-8,Chunked: true]}}

      2018-07-13 15:22:08,792+0100 DEBUG [qtp784640267-626]  *UNKNOWN com.sonatype.nexus.repository.nuget.internal.NugetFeedFetcher - Status: HTTP/1.1 404 Not Found

      2018-07-13 15:22:08,793+0100 WARN  [qtp784640267-626]  *UNKNOWN com.sonatype.nexus.repository.nuget.internal.NugetFeedFetcher - Status code 404 contacting https://www.nuget.org/api/v2/Packages(Id='NuGet.Build.Tasks.Pack',Version='4.8.0-preview3.5278+c3240b16fcf3276246fc8c610771d14ab94fdc02')

      2018-07-13 15:22:08,901+0100 DEBUG [qtp784640267-626]  *UNKNOWN com.sonatype.nexus.repository.nuget.internal.proxy.NugetProxyFacet - Proxy repo nuget.org-proxy found no package entry for NuGet.Build.Tasks.Pack 4.8.0-preview3.5278+c3240b16fcf3276246fc8c610771d14ab94fdc02 at remote

       

      The request being made is https://www.nuget.org/api/v2/Packages(Id='NuGet.Frameworks',Version='4.7.0+9245481f357ae542f92e6bc5e504fc898cfe5fc0') which fails. 

      Request omitting the build-metadata is successful:  https://www.nuget.org/api/v2/Packages(Id='NuGet.Frameworks',Version='4.7.0') and https://www.nuget.org/api/v2/package/NuGet.Frameworks/4.7.0

      Installing the package directly against nuget.org is successful and it is observed the build-metadata is being omitted i.e. nuget install NuGet.Frameworks -Version 4.7.0 -source https://nuget.org/api/v2 -Verbosity detailed

       

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              jbryan Jeremy Bryan
              Reporter:
              hardeepn Hardeep Nagra
              CC:
              Sam Ohri
              Last Updated By:
              Rich Seddon
              Team:
              NXRM - Cypher
              Votes:
              4 Vote for this issue
              Watchers:
              8 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Date of First Response:

                  tigCommentSecurity.panel-title