[RTFACT-15272] Artifactory cannot proxy a Bintray NPM repository Created: 13/Nov/17  Updated: 21/Feb/18  Resolved: 29/Jan/18

Status: Resolved
Project: Artifactory Binary Repository
Component/s: NPM, Remote Repository
Affects Version/s: 5.5.2
Fix Version/s: 5.9.0

Type: Bug Priority: High
Reporter: Arturo Aparicio Assignee: Gal Ben Ami
Resolution: Fixed Votes: 0
Labels: None


Artifactory cannot proxy a Bintray NPM repository.

To reproduce

1. Create an open source NPM repo on Bintray
2. Upload an NPM package to it
3. Follow the "Set me Up" instructions to configure the NPM client for the Bintray Repo
4. Download the uploaded package (notice it succeeds)
5. Run 'npm cache clear' to remove the package
6. Point Artifactory to the Bintray repo (https://api.bintray.com/npm/<org|user>/<repo>)
7. Follow the Artifatory "Set me up instructions"
8. Attempt to download the package
9. Observe success in download metadata but failure to download the actual package (tgz)

The errors (with debug logging)

2017-11-13 22:07:34,444 [http-nio-8081-exec-6] [DEBUG] (o.a.w.s.RepoFilter  :100) - Entering request GET ( /api/npm/npm-virtual/foo/-/foo-1.8.0.tgz.
2017-11-13 22:07:34,454 [http-nio-8081-exec-6] [DEBUG] (o.a.h.i.c.DefaultHttpClientConnectionOperator:131) - Connecting to api.bintray.com/
2017-11-13 22:07:34,607 [http-nio-8081-exec-6] [DEBUG] (o.a.w.s.RepoFilter  :188) - Exiting request GET ( /api/npm/npm-virtual/foo/-/foo-1.8.0.tgz

Notice the request is made to api.bintray.com but the JSON tells us to download from dl.bintray.com:

 "dist": {
     "tarball": "https://dl.bintray.com//paco/paco-repo/foo/-/foo-1.2.1.tgz",
     "shasum": "38930fa059e4feb49b401c4fd23e4f477cf6360d"

Generated at Wed Aug 12 01:51:55 UTC 2020 using Jira 8.5.3#805003-sha1:b4933e02eaff29a49114274fe59e1f99d9d963d7.