Npm client can't download pagerduty from group repo

Hi,
after upgrade from 3.15.2 to 3.16.1 I’m not able to install single npm package pagerduty (any other packages I tried are ok, so thats strange) , npm info returns 500:
npm ERR! 500 javax.servlet.ServletException: java.lang.NullPointerException: pagerduty@0.0.3
Logs:

  2019-04-23 11:29:01,173+0000 ERROR [qtp1900775578-530]  admin org.sonatype.nexus.repository.npm.internal.NpmGroupFacet - Unable to use Cooperation to merge pagerduty for repository npm-all

com.fasterxml.jackson.databind.JsonMappingException: (was java.lang.NullPointerException) (through reference chain: java.util.HashMap[“readme”])
at com.fasterxml.jackson.databind.JsonMappingException.wrapWithPath(JsonMappingException.java:391)

Caused by: java.lang.NullPointerException: null
at com.fasterxml.jackson.databind.deser.std.MapDeserializer._readAndBindStringKeyMap(MapDeserializer.java:525)
… 118 common frames omitted
2019-04-23 11:29:01,175+0000 WARN [qtp1900775578-530] admin org.sonatype.nexus.repository.httpbridge.internal.ViewServlet - Failure servicing: GET /repository/npm-all/pagerduty
java.lang.NullPointerException: null

npm-all is a repository group which contains npm hosted repo and npm proxy repo.
Package installs fine if I set registry to proxy repo directly, but fails when it set to group repository.

I tried to invalidate cache, remove group repo and proxy repository and add it back, not helpful.
I had no such issue on 3.15.2

Could you please help ?

I’m not able to reproduce this locally. From the log snippet, it looks like it’s trying to merge metadata from the hosted and proxy repositories. Is there a pagerduty package in the hosted npm repository? If so, it would seem there is something about its metadata that is causing this.

Rich

Nope, there is no such package in the hosted npm repository (I tried to add it to hosted later to check, but removed then).
I have even recreated npm group, created empty hosted npm repo, added to npm group new hosted and old proxy, turned on trace log, but have same issues:

2019-04-23 14:35:46,007+0000 DEBUG [qtp1900775578-762] admin org.sonatype.nexus.repository.view.Router - Response: Response{status=Status{successful=true, code=200, message=‘null’}, payload=NpmContent{payload=NpmStreamPayload{stream=org.sonatype.nexus.repository.npm.internal.NpmFacetUtils$$Lambda$370/1716466894@646d1d27, size=-1, contentType=‘application/json’}, attributes=’{etag=W/“b984cee56850df0e84d94fb148c92f57”, lastModified=2018-05-27T11:44:42.000Z, hashCodesMap={org.sonatype.nexus.common.hash.HashAlgorithm@435e0cb3=68199e7d840c034e143c9b1e0e2cf0b4048d60a2}, org.sonatype.nexus.repository.storage.Asset=Asset{metadata=AttachedEntityMetadata{schema=asset, document=#25:175921{bucket:#17:21,format:npm,last_updated:Tue Apr 23 14:31:12 UTC 2019,attributes:[5],component:null,name:pagerduty,size:3622,content_type:application/json,created_by:admin,created_by_ip:10.20.89.5,blob_ref:npm-public@2C42E3BA-25E6FB50-C5F3CDDF-46DD3C4B-C6BAA330:03a98f84-263b-4e8c-beac-ae092e44ba9b,last_downloaded:Tue Apr 23 11:03:08 UTC 2019,blob_created:Tue Apr 23 11:03:08 UTC 2019,blob_updated:Tue Apr 23 14:31:12 UTC 2019} v3}, name=pagerduty}, org.sonatype.nexus.repository.cache.CacheInfo=CacheInfo{lastVerified=2019-04-23T14:31:12.206Z, cacheToken=‘18832280603566646’}}’}}

2019-04-23 14:35:46,007+0000 TRACE [qtp1900775578-762] admin org.sonatype.nexus.repository.view.Router - Response headers:

2019-04-23 14:35:46,007+0000 TRACE [qtp1900775578-762] admin org.sonatype.nexus.repository.view.Router - Last-Modified: Sun, 27 May 2018 11:44:42 GMT

2019-04-23 14:35:46,007+0000 TRACE [qtp1900775578-762] admin org.sonatype.nexus.repository.view.Router - ETag: "W/“b984cee56850df0e84d94fb148c92f57"”

2019-04-23 14:35:46,007+0000 TRACE [qtp1900775578-762] admin org.sonatype.nexus.repository.view.Router - No response attributes

2019-04-23 14:35:46,007+0000 TRACE [qtp1900775578-762] admin org.sonatype.nexus.repository.npm.internal.NpmGroupPackageHandler - Member RepositoryImpl$$EnhancerByGuice$$77f8ecc9{type=proxy, format=npm, name=‘npm-public’} response Status{successful=true, code=200, message=‘null’}

2019-04-23 14:35:46,008+0000 TRACE [qtp1900775578-762] admin org.sonatype.nexus.repository.storage.ContentValidatorSelector - Looking for content validator for format: npm

2019-04-23 14:35:46,008+0000 TRACE [qtp1900775578-762] admin org.sonatype.nexus.repository.storage.MimeRulesSourceSelector - Looking for MIME rule source for format: npm

2019-04-23 14:35:46,008+0000 DEBUG [qtp1900775578-762] admin org.sonatype.nexus.repository.storage.StorageTxImpl - Transitioning: OPEN -> ACTIVE

2019-04-23 14:35:46,008+0000 DEBUG [qtp1900775578-762] admin org.sonatype.nexus.repository.storage.StorageTxImpl - Transitioned: ACTIVE

2019-04-23 14:35:46,008+0000 DEBUG [qtp1900775578-762] admin org.sonatype.nexus.repository.storage.StorageTxImpl - Transitioning: ACTIVE -> OPEN

2019-04-23 14:35:46,008+0000 DEBUG [qtp1900775578-762] admin org.sonatype.nexus.repository.storage.StorageTxImpl - Transitioned: OPEN

2019-04-23 14:35:46,008+0000 DEBUG [qtp1900775578-762] admin org.sonatype.nexus.repository.storage.StorageTxImpl - Transitioning: OPEN -> CLOSED

2019-04-23 14:35:46,008+0000 DEBUG [qtp1900775578-762] admin org.sonatype.nexus.repository.storage.StorageTxImpl - Transitioned: CLOSED

2019-04-23 14:35:46,011+0000 ERROR [qtp1900775578-762] admin org.sonatype.nexus.repository.npm.internal.NpmGroupFacet - Unable to use Cooperation to merge pagerduty for repository npm-all

com.fasterxml.jackson.databind.JsonMappingException: (was java.lang.NullPointerException) (through reference chain: java.util.HashMap[“readme”])

I have this issue right after upgrade, I don’t think metadata changed somehow.

Thank you!

This will take further diagnosis. I suggest opening an issue at https://issue.sonatype.org in the “dev - nexus” project for this.

Rich

Thanks, opened https://issues.sonatype.org/browse/NEXUS-19781