Uploaded image for project: 'Artifactory Binary Repository'
  1. Artifactory Binary Repository
  2. RTFACT-14171

NPM 500 ERROR when External Dependency Rewrite enabled

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: 4.16.0, 5.2.0, 5.2.1
    • Fix Version/s: 5.8.0
    • Component/s: NPM
    • Labels:
      None

      Description

      In Artifactory, when External Dependency Rewrite is enabled for a virtual NPM repository, some packages can not be resolved. For example, the package "equals".

      Verbosed output for the "npm install equals -ddd" command:

      npm info it worked if it ends with ok
      npm verb cli [ '/usr/local/bin/node',
      npm verb cli   '/usr/local/bin/npm',
      npm verb cli   'install',
      npm verb cli   'equals',
      npm verb cli   '-ddd' ]
      npm info using npm@4.2.0
      npm info using node@v6.10.0
      npm verb config Skipping project config: /Users/arielk/.npmrc. (matches userconfig)
      npm sill loadCurrentTree Starting
      npm sill install loadCurrentTree
      npm sill install readLocalPackageData
      npm sill fetchPackageMetaData equals
      npm sill fetchNamedPackageData equals
      npm sill mapToRegistry name equals
      npm sill mapToRegistry using default registry
      npm sill mapToRegistry registry http://artifactory:8081/artifactory/api/npm/npm
      npm sill mapToRegistry data Result {
      npm sill mapToRegistry   raw: 'equals',
      npm sill mapToRegistry   scope: null,
      npm sill mapToRegistry   escapedName: 'equals',
      npm sill mapToRegistry   name: 'equals',
      npm sill mapToRegistry   rawSpec: '',
      npm sill mapToRegistry   spec: 'latest',
      npm sill mapToRegistry   type: 'tag' }
      npm sill mapToRegistry uri http://artifactory:8081/artifactory/api/npm/npm/equals
      npm verb request uri http://mill.jfrog.info:12015/artifactory/api/npm/npm/equals
      npm verb request always-auth set; sending authorization
      npm info attempt registry request try #1 at 11:15:29 AM
      npm verb request id f34b70234e70f19b
      npm http request GET http://artifactory:8081/artifactory/api/npm/npm/equals
      npm http 500 http://artifactory:8081/artifactory/api/npm/npm/equals
      npm verb headers { server: 'Artifactory/5.2.0',
      npm verb headers   'x-artifactory-id': '8fbc6fbc4f6bb8b7:-1e437d36:15bae5d9d27:-8000',
      npm verb headers   'content-type': 'application/json',
      npm verb headers   'transfer-encoding': 'chunked',
      npm verb headers   date: 'Mon, 01 May 2017 08:15:30 GMT',
      npm verb headers   connection: 'close' }
      npm info retry will retry, error on last attempt: Error: Registry returned 500 for GET on http://artifactory:8081/artifactory/api/npm/npm/equals
      npm info attempt registry request try #2 at 11:15:40 AM
      npm http request GET http://artifactory:8081/artifactory/api/npm/npm/equals
      npm http 500 http://artifactory:8081/artifactory/api/npm/npm/equals
      npm verb headers { server: 'Artifactory/5.2.0',
      npm verb headers   'x-artifactory-id': '8fbc6fbc4f6bb8b7:-1e437d36:15bae5d9d27:-8000',
      npm verb headers   'content-type': 'application/json',
      npm verb headers   'transfer-encoding': 'chunked',
      npm verb headers   date: 'Mon, 01 May 2017 08:15:41 GMT',
      npm verb headers   connection: 'close' }
      npm info retry will retry, error on last attempt: Error: Registry returned 500 for GET on http://artifactory:8081/artifactory/api/npm/npm/equals
      npm info attempt registry request try #3 at 11:16:40 AM
      npm http request GET http://artifactory:8081/artifactory/api/npm/npm/equals
      npm http 500 http://artifactory:8081/artifactory/api/npm/npm/equals
      npm verb headers { server: 'Artifactory/5.2.0',
      npm verb headers   'x-artifactory-id': '8fbc6fbc4f6bb8b7:-1e437d36:15bae5d9d27:-8000',
      npm verb headers   'content-type': 'application/json',
      npm verb headers   'transfer-encoding': 'chunked',
      npm verb headers   date: 'Mon, 01 May 2017 08:16:42 GMT',
      npm verb headers   connection: 'close' }
      npm sill get cb [ 500,
      npm sill get   { server: 'Artifactory/5.2.0',
      npm sill get     'x-artifactory-id': '8fbc6fbc4f6bb8b7:-1e437d36:15bae5d9d27:-8000',
      npm sill get     'content-type': 'application/json',
      npm sill get     'transfer-encoding': 'chunked',
      npm sill get     date: 'Mon, 01 May 2017 08:16:42 GMT',
      npm sill get     connection: 'close' } ]
      npm sill fetchPackageMetaData Error: Registry returned 500 for GET on http://artifactory:8081/artifactory/api/npm/npm/equals
      npm sill fetchPackageMetaData     at makeError (/usr/local/lib/node_modules/npm/node_modules/npm-registry-client/lib/request.js:304:12)
      npm sill fetchPackageMetaData     at CachingRegistryClient.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-registry-client/lib/request.js:282:14)
      npm sill fetchPackageMetaData     at Request._callback (/usr/local/lib/node_modules/npm/node_modules/npm-registry-client/lib/request.js:212:14)
      npm sill fetchPackageMetaData     at Request.self.callback (/usr/local/lib/node_modules/npm/node_modules/request/request.js:186:22)
      npm sill fetchPackageMetaData     at emitTwo (events.js:106:13)
      npm sill fetchPackageMetaData     at Request.emit (events.js:191:7)
      npm sill fetchPackageMetaData     at Request.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/request/request.js:1081:10)
      npm sill fetchPackageMetaData     at emitOne (events.js:96:13)
      npm sill fetchPackageMetaData     at Request.emit (events.js:188:7)
      npm sill fetchPackageMetaData     at IncomingMessage.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/request/request.js:1001:12)
      npm sill fetchPackageMetaData  error for equals { Error: Registry returned 500 for GET on http://mill.jfrog.info:12015/artifactory/api/npm/npm/equals
      npm sill fetchPackageMetaData     at makeError (/usr/local/lib/node_modules/npm/node_modules/npm-registry-client/lib/request.js:304:12)
      npm sill fetchPackageMetaData     at CachingRegistryClient.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-registry-client/lib/request.js:282:14)
      npm sill fetchPackageMetaData     at Request._callback (/usr/local/lib/node_modules/npm/node_modules/npm-registry-client/lib/request.js:212:14)
      npm sill fetchPackageMetaData     at Request.self.callback (/usr/local/lib/node_modules/npm/node_modules/request/request.js:186:22)
      npm sill fetchPackageMetaData     at emitTwo (events.js:106:13)
      npm sill fetchPackageMetaData     at Request.emit (events.js:191:7)
      npm sill fetchPackageMetaData     at Request.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/request/request.js:1081:10)
      npm sill fetchPackageMetaData     at emitOne (events.js:96:13)
      npm sill fetchPackageMetaData     at Request.emit (events.js:188:7)
      npm sill fetchPackageMetaData     at IncomingMessage.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/request/request.js:1001:12) pkgid: 'artifactory', statusCode: 500, code: 'E500' }
      npm sill rollbackFailedOptional Starting
      npm sill rollbackFailedOptional Finishing
      npm sill runTopLevelLifecycles Finishing
      npm sill install printInstalled
      npm verb stack Error: Registry returned 500 for GET on http://mill.jfrog.info:12015/artifactory/api/npm/npm/equals
      npm verb stack     at makeError (/usr/local/lib/node_modules/npm/node_modules/npm-registry-client/lib/request.js:304:12)
      npm verb stack     at CachingRegistryClient.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-registry-client/lib/request.js:282:14)
      npm verb stack     at Request._callback (/usr/local/lib/node_modules/npm/node_modules/npm-registry-client/lib/request.js:212:14)
      npm verb stack     at Request.self.callback (/usr/local/lib/node_modules/npm/node_modules/request/request.js:186:22)
      npm verb stack     at emitTwo (events.js:106:13)
      npm verb stack     at Request.emit (events.js:191:7)
      npm verb stack     at Request.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/request/request.js:1081:10)
      npm verb stack     at emitOne (events.js:96:13)
      npm verb stack     at Request.emit (events.js:188:7)
      npm verb stack     at IncomingMessage.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/request/request.js:1001:12)
      npm verb statusCode 500
      npm verb pkgid artifactory
      npm verb cwd /Users/arielk
      npm ERR! Darwin 16.5.0
      npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "equals" "-ddd"
      npm ERR! node v6.10.0
      npm ERR! npm  v4.2.0
      npm ERR! code E500
      
      npm ERR! Registry returned 500 for GET on http://artifactory:8081/artifactory/api/npm/npm/equals
      npm ERR!
      npm ERR! If you need help, you may report this error at:
      npm ERR!     <https://github.com/npm/npm/issues>
      npm verb exit [ 1, true ]
      
      npm ERR! Please include the following file with any support request:
      npm ERR!     /Users/arielk/.npm/_logs/2017-05-01T08_16_41_226Z-debug.log
      

      From Artifactory.log:

      2017-05-01 08:15:30,969 [http-nio-8081-exec-2] [ERROR] (o.j.r.n.NpmMetadataExtractor:120) - Unable to find or parse correctly the package archive ('package.json') within the tarball content: Input is not in the .gz format
      java.io.IOException: Input is not in the .gz format
      	at org.apache.commons.compress.compressors.gzip.GzipCompressorInputStream.init(GzipCompressorInputStream.java:162) ~[commons-compress-1.10.jar:1.10]
      	at org.apache.commons.compress.compressors.gzip.GzipCompressorInputStream.<init>(GzipCompressorInputStream.java:135) ~[commons-compress-1.10.jar:1.10]
      	at org.apache.commons.compress.compressors.gzip.GzipCompressorInputStream.<init>(GzipCompressorInputStream.java:100) ~[commons-compress-1.10.jar:1.10]
      	at org.jfrog.repomd.npm.NpmMetadataExtractor.read(NpmMetadataExtractor.java:95) [npm-4.3.25.jar:na]
      	at org.jfrog.repomd.npm.NpmMetadataExtractor.extractAsSystem(NpmMetadataExtractor.java:54) [npm-4.3.25.jar:na]
      	at org.jfrog.repomd.npm.NpmMetadataExtractor.extract(NpmMetadataExtractor.java:41) [npm-4.3.25.jar:na]
      	at org.artifactory.addon.npm.NpmServiceImpl.getNpmMetadata(NpmServiceImpl.java:78) [artifactory-addon-npm-5.2.0.jar:na]
      	at sun.reflect.GeneratedMethodAccessor605.invoke(Unknown Source) ~[na:na]
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_102]
      	at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_102]
      	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317) [spring-aop-4.1.5.RELEASE.jar:4.1.5.RELEASE]
      	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:201) [spring-aop-4.1.5.RELEASE.jar:4.1.5.RELEASE]
      	at com.sun.proxy.$Proxy114.getNpmMetadata(Unknown Source) [na:na]
      	at org.artifactory.addon.npm.repo.merge.NpmPackageMetadataMerger.lambda$1(NpmPackageMetadataMerger.java:148) [artifactory-addon-npm-5.2.0.jar:na]
      	at java.util.LinkedHashMap$LinkedEntrySet.forEach(LinkedHashMap.java:671) ~[na:1.8.0_102]
      	at org.artifactory.addon.npm.repo.merge.NpmPackageMetadataMerger.lambda$0(NpmPackageMetadataMerger.java:138) [artifactory-addon-npm-5.2.0.jar:na]
      	at java.util.HashMap$Values.forEach(HashMap.java:980) ~[na:1.8.0_102]
      	at org.artifactory.addon.npm.repo.merge.NpmPackageMetadataMerger.fetchAndReplaceExternalDependencies(NpmPackageMetadataMerger.java:136) [artifactory-addon-npm-5.2.0.jar:na]
      	at org.artifactory.addon.npm.repo.merge.NpmPackageMetadataMerger.mergeNpmPackageMetadata(NpmPackageMetadataMerger.java:108) [artifactory-addon-npm-5.2.0.jar:na]
      	at org.artifactory.addon.npm.repo.merge.NpmPackageMetadataMerger.merge(NpmPackageMetadataMerger.java:98) [artifactory-addon-npm-5.2.0.jar:na]
      	at org.artifactory.addon.npm.repo.merge.NpmMetadataMerger.getMergedResult(NpmMetadataMerger.java:65) ~[artifactory-addon-npm-5.2.0.jar:na]
      	at org.artifactory.addon.npm.repo.NpmVirtualRepoHandler.getPackageMetadata(NpmVirtualRepoHandler.java:72) ~[artifactory-addon-npm-5.2.0.jar:na]
      	at org.jfrog.repomd.npm.rest.NpmSubResource.packageInfo(NpmSubResource.java:46) ~[npm-4.3.25.jar:na]
      	at sun.reflect.GeneratedMethodAccessor593.invoke(Unknown Source) ~[na:na]
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_102]
      	at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_102]
      	at com.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMethodInvokerFactory.java:60) ~[jersey-server-1.19.jar:1.19]
      	at com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$ResponseOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:205) ~[jersey-server-1.19.jar:1.19]
      	at com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:75) ~[jersey-server-1.19.jar:1.19]
      	at com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:302) ~[jersey-server-1.19.jar:1.19]
      	at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147) ~[jersey-server-1.19.jar:1.19]
      	at com.sun.jersey.server.impl.uri.rules.SubLocatorRule.accept(SubLocatorRule.java:137) ~[jersey-server-1.19.jar:1.19]
      	at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147) ~[jersey-server-1.19.jar:1.19]
      	at com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:108) ~[jersey-server-1.19.jar:1.19]
      	at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147) ~[jersey-server-1.19.jar:1.19]
      	at com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:84) ~[jersey-server-1.19.jar:1.19]
      	at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1542) ~[jersey-server-1.19.jar:1.19]
      	at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1473) ~[jersey-server-1.19.jar:1.19]
      	at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1419) ~[jersey-server-1.19.jar:1.19]
      	at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1409) ~[jersey-server-1.19.jar:1.19]
      	at com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:409) ~[jersey-servlet-1.19.jar:1.19]
      	at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:558) ~[jersey-servlet-1.19.jar:1.19]
      	at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:733) ~[jersey-servlet-1.19.jar:1.19]
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:729) ~[servlet-api.jar:na]
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:292) ~[catalina.jar:8.0.41]
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) ~[catalina.jar:8.0.41]
      	at org.artifactory.webapp.servlet.RepoFilter.execute(RepoFilter.java:185) ~[artifactory-web-application-5.2.0.jar:na]
      	at org.artifactory.webapp.servlet.RepoFilter.doFilter(RepoFilter.java:94) ~[artifactory-web-application-5.2.0.jar:na]
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240) ~[catalina.jar:8.0.41]
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) ~[catalina.jar:8.0.41]
      	at org.artifactory.webapp.servlet.authentication.ArtifactoryAuthenticationFilterChain.lambda$1(ArtifactoryAuthenticationFilterChain.java:136) ~[artifactory-web-application-5.2.0.jar:na]
      	at org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilter(BasicAuthenticationFilter.java:201) ~[spring-security-web-3.2.0.RELEASE.jar:3.2.0.RELEASE]
      	at org.artifactory.webapp.servlet.authentication.ArtifactoryBasicAuthenticationFilter.doFilter(ArtifactoryBasicAuthenticationFilter.java:84) ~[artifactory-web-application-5.2.0.jar:na]
      	at org.artifactory.webapp.servlet.authentication.ArtifactoryAuthenticationFilterChain.doFilter(ArtifactoryAuthenticationFilterChain.java:172) ~[artifactory-web-application-5.2.0.jar:na]
      	at org.artifactory.webapp.servlet.AccessFilter.authenticateAndExecute(AccessFilter.java:281) ~[artifactory-web-application-5.2.0.jar:na]
      	at org.artifactory.webapp.servlet.AccessFilter.doFilterInternal(AccessFilter.java:205) ~[artifactory-web-application-5.2.0.jar:na]
      	at org.artifactory.webapp.servlet.AccessFilter.doFilter(AccessFilter.java:165) ~[artifactory-web-application-5.2.0.jar:na]
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240) ~[catalina.jar:8.0.41]
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) ~[catalina.jar:8.0.41]
      	at org.artifactory.webapp.servlet.RequestFilter.doFilter(RequestFilter.java:67) ~[artifactory-web-application-5.2.0.jar:na]
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240) ~[catalina.jar:8.0.41]
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) ~[catalina.jar:8.0.41]
      	at org.springframework.session.web.http.SessionRepositoryFilter.doFilterInternal(SessionRepositoryFilter.java:164) ~[spring-session-1.2.2.RELEASE.jar:na]
      	at org.springframework.session.web.http.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:80) ~[spring-session-1.2.2.RELEASE.jar:na]
      	at org.artifactory.webapp.servlet.SessionFilter.doFilter(SessionFilter.java:62) ~[artifactory-web-application-5.2.0.jar:na]
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240) ~[catalina.jar:8.0.41]
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) ~[catalina.jar:8.0.41]
      	at org.artifactory.webapp.servlet.ArtifactoryFilter.doFilter(ArtifactoryFilter.java:116) ~[artifactory-web-application-5.2.0.jar:na]
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240) ~[catalina.jar:8.0.41]
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) ~[catalina.jar:8.0.41]
      	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212) ~[catalina.jar:8.0.41]
      	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:94) ~[catalina.jar:8.0.41]
      	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141) ~[catalina.jar:8.0.41]
      	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79) ~[catalina.jar:8.0.41]
      	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88) ~[catalina.jar:8.0.41]
      	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:509) ~[catalina.jar:8.0.41]
      	at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1104) ~[tomcat-coyote.jar:8.0.41]
      	at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:684) ~[tomcat-coyote.jar:8.0.41]
      	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1524) ~[tomcat-coyote.jar:8.0.41]
      	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1480) ~[tomcat-coyote.jar:8.0.41]
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) ~[na:1.8.0_102]
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) ~[na:1.8.0_102]
      	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) ~[tomcat-util.jar:8.0.41]
      	at java.lang.Thread.run(Thread.java:745) ~[na:1.8.0_102]
      2017-05-01 08:15:30,973 [http-nio-8081-exec-2] [ERROR] (o.a.r.c.e.GlobalExceptionMapper:48) - java.io.IOException: Input is not in the .gz format
      java.lang.RuntimeException: java.io.IOException: Input is not in the .gz format
      	at org.jfrog.repomd.npm.NpmMetadataExtractor.read(NpmMetadataExtractor.java:122) ~[npm-4.3.25.jar:na]
      	at org.jfrog.repomd.npm.NpmMetadataExtractor.extractAsSystem(NpmMetadataExtractor.java:54) ~[npm-4.3.25.jar:na]
      	at org.jfrog.repomd.npm.NpmMetadataExtractor.extract(NpmMetadataExtractor.java:41) ~[npm-4.3.25.jar:na]
      	at org.artifactory.addon.npm.NpmServiceImpl.getNpmMetadata(NpmServiceImpl.java:78) ~[artifactory-addon-npm-5.2.0.jar:na]
      	at sun.reflect.GeneratedMethodAccessor605.invoke(Unknown Source) ~[na:na]
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_102]
      	at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_102]
      	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317) ~[spring-aop-4.1.5.RELEASE.jar:4.1.5.RELEASE]
      	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:201) ~[spring-aop-4.1.5.RELEASE.jar:4.1.5.RELEASE]
      	at com.sun.proxy.$Proxy114.getNpmMetadata(Unknown Source) ~[na:na]
      	at org.artifactory.addon.npm.repo.merge.NpmPackageMetadataMerger.lambda$1(NpmPackageMetadataMerger.java:148) ~[artifactory-addon-npm-5.2.0.jar:na]
      	at java.util.LinkedHashMap$LinkedEntrySet.forEach(LinkedHashMap.java:671) ~[na:1.8.0_102]
      	at org.artifactory.addon.npm.repo.merge.NpmPackageMetadataMerger.lambda$0(NpmPackageMetadataMerger.java:138) ~[artifactory-addon-npm-5.2.0.jar:na]
      	at java.util.HashMap$Values.forEach(HashMap.java:980) ~[na:1.8.0_102]
      	at org.artifactory.addon.npm.repo.merge.NpmPackageMetadataMerger.fetchAndReplaceExternalDependencies(NpmPackageMetadataMerger.java:136) ~[artifactory-addon-npm-5.2.0.jar:na]
      	at org.artifactory.addon.npm.repo.merge.NpmPackageMetadataMerger.mergeNpmPackageMetadata(NpmPackageMetadataMerger.java:108) ~[artifactory-addon-npm-5.2.0.jar:na]
      	at org.artifactory.addon.npm.repo.merge.NpmPackageMetadataMerger.merge(NpmPackageMetadataMerger.java:98) ~[artifactory-addon-npm-5.2.0.jar:na]
      	at org.artifactory.addon.npm.repo.merge.NpmMetadataMerger.getMergedResult(NpmMetadataMerger.java:65) ~[artifactory-addon-npm-5.2.0.jar:na]
      	at org.artifactory.addon.npm.repo.NpmVirtualRepoHandler.getPackageMetadata(NpmVirtualRepoHandler.java:72) ~[artifactory-addon-npm-5.2.0.jar:na]
      	at org.jfrog.repomd.npm.rest.NpmSubResource.packageInfo(NpmSubResource.java:46) ~[npm-4.3.25.jar:na]
      	at sun.reflect.GeneratedMethodAccessor593.invoke(Unknown Source) ~[na:na]
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_102]
      	at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_102]
      	at com.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMethodInvokerFactory.java:60) ~[jersey-server-1.19.jar:1.19]
      	at com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$ResponseOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:205) ~[jersey-server-1.19.jar:1.19]
      	at com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:75) ~[jersey-server-1.19.jar:1.19]
      	at com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:302) ~[jersey-server-1.19.jar:1.19]
      	at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147) ~[jersey-server-1.19.jar:1.19]
      	at com.sun.jersey.server.impl.uri.rules.SubLocatorRule.accept(SubLocatorRule.java:137) ~[jersey-server-1.19.jar:1.19]
      	at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147) ~[jersey-server-1.19.jar:1.19]
      	at com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:108) ~[jersey-server-1.19.jar:1.19]
      	at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147) ~[jersey-server-1.19.jar:1.19]
      	at com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:84) ~[jersey-server-1.19.jar:1.19]
      	at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1542) [jersey-server-1.19.jar:1.19]
      	at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1473) [jersey-server-1.19.jar:1.19]
      	at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1419) [jersey-server-1.19.jar:1.19]
      	at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1409) [jersey-server-1.19.jar:1.19]
      	at com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:409) [jersey-servlet-1.19.jar:1.19]
      	at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:558) [jersey-servlet-1.19.jar:1.19]
      	at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:733) [jersey-servlet-1.19.jar:1.19]
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:729) [servlet-api.jar:na]
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:292) [catalina.jar:8.0.41]
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) [catalina.jar:8.0.41]
      	at org.artifactory.webapp.servlet.RepoFilter.execute(RepoFilter.java:185) [artifactory-web-application-5.2.0.jar:na]
      	at org.artifactory.webapp.servlet.RepoFilter.doFilter(RepoFilter.java:94) [artifactory-web-application-5.2.0.jar:na]
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240) [catalina.jar:8.0.41]
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) [catalina.jar:8.0.41]
      	at org.artifactory.webapp.servlet.authentication.ArtifactoryAuthenticationFilterChain.lambda$1(ArtifactoryAuthenticationFilterChain.java:136) [artifactory-web-application-5.2.0.jar:na]
      	at org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilter(BasicAuthenticationFilter.java:201) ~[spring-security-web-3.2.0.RELEASE.jar:3.2.0.RELEASE]
      	at org.artifactory.webapp.servlet.authentication.ArtifactoryBasicAuthenticationFilter.doFilter(ArtifactoryBasicAuthenticationFilter.java:84) ~[artifactory-web-application-5.2.0.jar:na]
      	at org.artifactory.webapp.servlet.authentication.ArtifactoryAuthenticationFilterChain.doFilter(ArtifactoryAuthenticationFilterChain.java:172) [artifactory-web-application-5.2.0.jar:na]
      	at org.artifactory.webapp.servlet.AccessFilter.authenticateAndExecute(AccessFilter.java:281) ~[artifactory-web-application-5.2.0.jar:na]
      	at org.artifactory.webapp.servlet.AccessFilter.doFilterInternal(AccessFilter.java:205) ~[artifactory-web-application-5.2.0.jar:na]
      	at org.artifactory.webapp.servlet.AccessFilter.doFilter(AccessFilter.java:165) ~[artifactory-web-application-5.2.0.jar:na]
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240) [catalina.jar:8.0.41]
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) [catalina.jar:8.0.41]
      	at org.artifactory.webapp.servlet.RequestFilter.doFilter(RequestFilter.java:67) ~[artifactory-web-application-5.2.0.jar:na]
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240) [catalina.jar:8.0.41]
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) [catalina.jar:8.0.41]
      	at org.springframework.session.web.http.SessionRepositoryFilter.doFilterInternal(SessionRepositoryFilter.java:164) ~[spring-session-1.2.2.RELEASE.jar:na]
      	at org.springframework.session.web.http.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:80) ~[spring-session-1.2.2.RELEASE.jar:na]
      	at org.artifactory.webapp.servlet.SessionFilter.doFilter(SessionFilter.java:62) ~[artifactory-web-application-5.2.0.jar:na]
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240) [catalina.jar:8.0.41]
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) [catalina.jar:8.0.41]
      	at org.artifactory.webapp.servlet.ArtifactoryFilter.doFilter(ArtifactoryFilter.java:116) ~[artifactory-web-application-5.2.0.jar:na]
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240) [catalina.jar:8.0.41]
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) [catalina.jar:8.0.41]
      	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212) ~[catalina.jar:8.0.41]
      	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:94) ~[catalina.jar:8.0.41]
      	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141) ~[catalina.jar:8.0.41]
      	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79) ~[catalina.jar:8.0.41]
      	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88) ~[catalina.jar:8.0.41]
      	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:509) ~[catalina.jar:8.0.41]
      	at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1104) ~[tomcat-coyote.jar:8.0.41]
      	at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:684) ~[tomcat-coyote.jar:8.0.41]
      	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1524) ~[tomcat-coyote.jar:8.0.41]
      	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1480) ~[tomcat-coyote.jar:8.0.41]
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) ~[na:1.8.0_102]
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) ~[na:1.8.0_102]
      	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) ~[tomcat-util.jar:8.0.41]
      	at java.lang.Thread.run(Thread.java:745) ~[na:1.8.0_102]
      Caused by: java.io.IOException: Input is not in the .gz format
      	at org.apache.commons.compress.compressors.gzip.GzipCompressorInputStream.init(GzipCompressorInputStream.java:162) ~[commons-compress-1.10.jar:1.10]
      	at org.apache.commons.compress.compressors.gzip.GzipCompressorInputStream.<init>(GzipCompressorInputStream.java:135) ~[commons-compress-1.10.jar:1.10]
      	at org.apache.commons.compress.compressors.gzip.GzipCompressorInputStream.<init>(GzipCompressorInputStream.java:100) ~[commons-compress-1.10.jar:1.10]
      	at org.jfrog.repomd.npm.NpmMetadataExtractor.read(NpmMetadataExtractor.java:95) ~[npm-4.3.25.jar:na]
      	... 80 common frames omitted
      ....
      

      and request.log:

      20170501081530|61|REQUEST|82.81.195.5|admin|GET|/api/npm/npm/equals|HTTP/1.1|500|0
      20170501081541|63|REQUEST|82.81.195.5|admin|GET|/api/npm/npm/equals|HTTP/1.1|500|0
      20170501081642|61|REQUEST|82.81.195.5|admin|GET|/api/npm/npm/equals|HTTP/1.1|500|0
      

      The issue occurs regardless to any whitelisted pattern.
      As a workaround either disabling the External Dependency Rewrite, or resolving directly from the remote repository works.

        Attachments

          Activity

            People

            • Assignee:
              inbart Inbar Tal
              Reporter:
              arielk Ariel Kabov
              Assigned QA:
              Konstantin Shenderov (Inactive)
            • Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: