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

Npm remote cache prevents packages pulled incorrectly

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Done
    • Resolution: Done
    • Affects Version/s: 6.17.0, 7.7.8, 7.15.3
    • Fix Version/s: None
    • Component/s: None
    • Labels:
    • Severity:
      Medium

      Description

      If a request for an NPM file is sent to Artifactory NPM repository without the api/npm, the package will no longer be installable via the npm client.

       Steps to reproduce:

      1.) Setup Artifactory with an Npm remote repository. In this example will call it npm-remote.

      2.) run the following command: curl -uadmin:Password http://localhost:8081/artifactory/npm-remote/findup

      3.) Configure Npm client work with Artifactory and run: npm install findup -verbose

      npm info it worked if it ends with oknpm verb cli [npm verb cli   '/usr/local/Cellar/node/14.10.1/bin/node',npm verb cli   '/usr/local/bin/npm',npm verb cli   'install',npm verb cli   'findup',npm verb cli   '-verbose'npm verb cli ]npm info using npm@6.14.8npm info using node@v14.10.1npm verb npm-session 76795c2c2c24cb68npm http fetch GET 200 http://localhost:8081/artifactory/api/npm/npm-remote/findup 42msnpm http fetch GET 400 http://localhost:8081/artifactory/api/npm/npm-remote/findup/-/findup-0.1.5.tgz 8msnpm timing stage:rollbackFailedOptional Completed in 1msnpm timing stage:runTopLevelLifecycles Completed in 84msnpm verb stack Error: 400 Bad Request - GET http://localhost:8081/artifactory/api/npm/npm-remote/findup/-/findup-0.1.5.tgznpm verb stack     at /usr/local/lib/node_modules/npm/node_modules/npm-registry-fetch/check-response.js:117:15npm verb stack     at processTicksAndRejections (internal/process/task_queues.js:93:5)npm verb statusCode 400npm verb pkgid findup@latestnpm verb cwd /Users/ohadl/Upload/Npmnpm verb Darwin 19.6.0npm verb argv "/usr/local/Cellar/node/14.10.1/bin/node" "/usr/local/bin/npm" "install" "findup" "-verbose"npm verb node v14.10.1npm verb npm  v6.14.8npm ERR! code E400npm ERR! 400 Bad Request - GET http://localhost:8081/artifactory/api/npm/npm-remote/findup/-/findup-0.1.5.tgz

      Artifactory-request.log 

      2020-09-29T16:47:21.911Z|c52c08417b1efeea|127.0.0.1|admin|GET|/api/npm/npm-remote/findup|200|-1|0|8|npm/6.14.8 node/v14.10.1 darwinx64
      2020-09-29T16:47:21.943Z|f03c7743df7c56b8|127.0.0.1|admin|GET|/api/npm/npm-remote/findup/-/findup-0.1.5.tgz|400|-1|0|4|npm/6.14.8 node/v14.10.1 darwin x64
      

      Artifactory-service.log

      2020-09-29T16:46:43.928Z [jfrt ] [INFO ] [4164a76f7141fb45] [o.a.r.HttpRepo:455            ] [http-nio-8081-exec-8] - npm-remote downloading https://registry.npmjs.org/findup/-/findup-0.1.5.tgz 3.17 KB
      2020-09-29T16:46:43.930Z [jfrt ] [ERROR] [4164a76f7141fb45] [o.a.r.HttpRepo:1386           ] [http-nio-8081-exec-8] - npm-remote: Failed to download 'https://registry.npmjs.org/findup/-/findup-0.1.5.tgz'. Received status code 200 and caught exception: Parent findup/- must be a folder
      2020-09-29T16:46:43.931Z [jfrt ] [WARN ] [4164a76f7141fb45] [.r.ArtifactoryResponseBase:125] [http-nio-8081-exec-8] - Sending HTTP error code 400: Rejected artifact download request: Parent findup/- must be a folder
      2020-09-29T16:47:21.941Z [jfrt ] [WARN ] [f03c7743df7c56b8] [.r.ArtifactoryResponseBase:125] [http-nio-8081-exec-3] - Sending HTTP error code 400: Parent findup/- must be a folder
      

        Attachments

          Issue Links

            Activity

                People

                Assignee:
                nadavy Nadav Yogev
                Reporter:
                ohadl Ohad Levy
                Votes:
                6 Vote for this issue
                Watchers:
                8 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved:

                    Sync Status

                    Connection: RTFACT Sync
                    RTMID-23455 -
                    SYNCHRONIZED
                    • Last Sync Date: