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

npm install against a group repository with nested group member fails with 500 status



    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.0.0
    • Fix Version/s: 3.0.1
    • Component/s: NPM
    • Labels:
    • Story Points:
    • Sprint:
      Sprint 71


      "npm install <package>" from a nested group repo fails with a 500 response from Nexus.

      This is easily to setup and reproduce.

      npmjs (proxy) and npm-internal (hosted) -> nmp-all (group) -> npm-top-group (group)

      npm registry setting is pointing to npm-top-group

      Acceptance Criteria:

      • All metadata should be merged, respecting the order of the repositories, first in the tree should win
      • A user should be able to install a package from a nested group


      • Check Maven to see if this issue also occurs here
      $ npm -loglevel info install grunt
      npm info it worked if it ends with ok
      npm info using npm@3.7.3
      npm info using node@v0.10.42
      npm info attempt registry request try #1 at 10:48:05
      npm http request GET http://localhost:8081/repository/npm-top-group/grunt
      npm http 500 http://localhost:8081/repository/npm-top-group/grunt
      npm ERR! registry error parsing json
      npm info retry will retry, error on last attempt: SyntaxError: Unexpected token <
      npm info retry 
      npm info retry <!DOCTYPE html>
      npm info retry <html>
      npm info retry <head>
      npm info retry   <title>500 - Nexus Repository Manager</title>
      npm info retry   <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
      npm info retry 
      npm info retry 
      npm info retry   <!--[if lt IE 9]>
      npm info retry   <script>(new Image).src="http://localhost:8081/favicon.ico?3.0.0-03"</script>
      npm info retry   <![endif]-->
      npm info retry   <link rel="icon" type="image/png" href="http://localhost:8081/favicon-32x32.png?3.0.0-03" sizes="32x32">
      npm info retry   <link rel="mask-icon" href="http://localhost:8081/safari-pinned-tab.svg?3.0.0-03" color="#5bbad5">
      npm info retry   <link rel="icon" type="image/png" href="http://localhost:8081/favicon-16x16.png?3.0.0-03" sizes="16x16">
      npm info retry   <link rel="shortcut icon" href="http://localhost:8081/favicon.ico?3.0.0-03">
      npm info retry   <meta name="msapplication-TileImage" content="http://localhost:8081/mstile-144x144.png?3.0.0-03">
      npm info retry   <meta name="msapplication-TileColor" content="#00a300">
      npm info retry 
      npm info retry   <link rel="stylesheet" type="text/css" href="http://localhost:8081/static/css/nexus-content.css?3.0.0-03"/>
      npm info retry </head>
      npm info retry <body>
      npm info retry <div class="nexus-header">
      npm info retry   <a href="http://localhost:8081">
      npm info retry     <div class="product-logo">
      npm info retry       <img src="http://localhost:8081/static/images/nexus.png?3.0.0-03"/>
      npm info retry     </div>
      npm info retry     <div class="product-id">
      npm info retry       <div class="product-id__line-1">
      npm info retry         <span class="product-name">Nexus Repository Manager</span>
      npm info retry       </div>
      npm info retry       <div class="product-id__line-2">
      npm info retry         <span class="product-spec">OSS 3.0.0-03</span>
      npm info retry       </div>
      npm info retry     </div>
      npm info retry   </a>
      npm info retry </div>
      npm info retry 
      npm info retry <div class="nexus-body">
      npm info retry   <div class="content-header">
      npm info retry     <img src="http://localhost:8081/static/rapture/resources/icons/x32/exclamation.png?3.0.0-03"/>
      npm info retry     <span class="title">Error 500</span>
      npm info retry     <span class="description">Internal Server Error</span>
      npm info retry   </div>
      npm info retry   <div class="content-body">
      npm info retry     <div class="content-section">
      npm info retry       javax.servlet.ServletException: java.lang.NullPointerException
      npm info retry     </div>
      npm info retry       </div>
      npm info retry </div>
      npm info retry </body>
      npm info retry </html>
      npm info retry 
      npm info retry 
    - admin [14/Apr/2016:10:48:15 +0100] "GET /repository/npm-top-group/grunt HTTP/1.1" 500 1848 71
      2016-04-14 10:48:15,930+0100 WARN  [qtp1750092014-104] admin org.sonatype.nexus.repository.httpbridge.internal.ViewServlet - Service failure
      java.lang.NullPointerException: null
      	at com.sonatype.nexus.repository.npm.internal.NpmMetadataUtils.rewriteTarballUrl(NpmMetadataUtils.java:142) [na:na]
      	at sun.reflect.GeneratedMethodAccessor198.invoke(Unknown Source) [na:na]
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [na:1.8.0_65]
      	at java.lang.reflect.Method.invoke(Method.java:497) [na:1.8.0_65]


          Issue Links



              dbradicich Damian Bradicich
              msurani Mahendra Surani
              Last Updated By:
              Peter Lynch
              0 Vote for this issue
              6 Start watching this issue


                Date of First Response: