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

Publishing NPM scoped packages to Bintray through Artifactory UI will results with Error 400

    XMLWordPrintable

    Details

    • Severity:
      High

      Description

      When trying to publish an NPM scoped packages to Bintray through a distribution repository the request will fail with error 400.

      The steps to reproduce are simple:
      1. create an npm scoped package: npm init --scope=username
      2. create npm repositories and a distribution repository to Bintray.
      3. configure the npm client to work against Artifactory repository.
      4. deploy the package to Artifactory.
      5. distribute the package through the UI.

      The npm publish to Bintray directly works fine.

      Here is the following stacktrace:

      2017-08-29 15:13:19,411 [art-exec-100] [ERROR] (o.a.b.d.DistributorImpl:350) - Error retrieving information for package null/@shai/npm: 400, Bad Request The package name in the Json body should starts with a letter or a digit. The package name can contain only letters digits and the following special characters: '-' '_' ':' '.' '+' 
      com.jfrog.bintray.client.api.BintrayCallException: The package name in the Json body should starts with a letter or a digit. The package name can contain only letters digits and the following special characters: '-' '_' ':' '.' '+' 
      	at com.jfrog.bintray.client.impl.handle.BintrayImpl$BintrayResponseHandler.handleResponse(BintrayImpl.java:381) ~[bintray-client-java-service-0.9.2.jar:na]
      	at com.jfrog.bintray.client.impl.handle.BintrayImpl$BintrayResponseHandler.handleResponse(BintrayImpl.java:375) ~[bintray-client-java-service-0.9.2.jar:na]
      	at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:222) ~[httpclient-4.5.1.jar:4.5.1]
      	at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:164) ~[httpclient-4.5.1.jar:4.5.1]
      	at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:139) ~[httpclient-4.5.1.jar:4.5.1]
      	at com.jfrog.bintray.client.impl.handle.BintrayImpl.execute(BintrayImpl.java:299) ~[bintray-client-java-service-0.9.2.jar:na]
      	at com.jfrog.bintray.client.impl.handle.BintrayImpl.setHeadersAndExecute(BintrayImpl.java:289) ~[bintray-client-java-service-0.9.2.jar:na]
      	at com.jfrog.bintray.client.impl.handle.BintrayImpl.post(BintrayImpl.java:150) ~[bintray-client-java-service-0.9.2.jar:na]
      	at com.jfrog.bintray.client.impl.handle.RepositoryHandleImpl.createPkg(RepositoryHandleImpl.java:89) ~[bintray-client-java-service-0.9.2.jar:na]
      	at org.artifactory.bintray.distribution.DistributorImpl.getOrCreatePackage(DistributorImpl.java:344) [artifactory-core-5.4.6.jar:na]
      	at org.artifactory.bintray.distribution.DistributorImpl.getOrCreateVersionForCoordinates(DistributorImpl.java:287) [artifactory-core-5.4.6.jar:na]
      	at org.artifactory.bintray.distribution.DistributorImpl.fetchBintrayVersion(DistributorImpl.java:227) [artifactory-core-5.4.6.jar:na]
      	at org.artifactory.bintray.distribution.DistributorImpl.distributeVersion(DistributorImpl.java:109) [artifactory-core-5.4.6.jar:na]
      	at org.artifactory.bintray.distribution.DistributorImpl.lambda$1(DistributorImpl.java:99) [artifactory-core-5.4.6.jar:na]
      	at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184) ~[na:1.8.0_121]
      	at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175) ~[na:1.8.0_121]
      	at java.util.Iterator.forEachRemaining(Iterator.java:116) ~[na:1.8.0_121]
      	at java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801) ~[na:1.8.0_121]
      	at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481) ~[na:1.8.0_121]
      	at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471) ~[na:1.8.0_121]
      	at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151) ~[na:1.8.0_121]
      	at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174) ~[na:1.8.0_121]
      	at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[na:1.8.0_121]
      	at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:418) ~[na:1.8.0_121]
      	at org.artifactory.bintray.distribution.DistributorImpl.distributeInternal(DistributorImpl.java:99) [artifactory-core-5.4.6.jar:na]
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121]
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121]
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121]
      	at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121]
      	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.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190) ~[spring-aop-4.1.5.RELEASE.jar:4.1.5.RELEASE]
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157) ~[spring-aop-4.1.5.RELEASE.jar:4.1.5.RELEASE]
      	at org.artifactory.schedule.aop.TraceableMethodInvocation.proceed(TraceableMethodInvocation.java:58) ~[artifactory-core-5.4.6.jar:na]
      	at org.artifactory.schedule.aop.AsyncAdvice.doInvoke(AsyncAdvice.java:325) ~[artifactory-core-5.4.6.jar:na]
      	at org.artifactory.schedule.aop.AsyncAdvice.lambda$1(AsyncAdvice.java:279) ~[artifactory-core-5.4.6.jar:na]
      	at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[na:1.8.0_121]
      	at org.artifactory.schedule.ArtifactoryConcurrentExecutor$RunnableWrapper.run(ArtifactoryConcurrentExecutor.java:104) ~[artifactory-storage-common-5.4.6.jar:na]
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) ~[na:1.8.0_121]
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) ~[na:1.8.0_121]
      	at java.lang.Thread.run(Thread.java:745) ~[na:1.8.0_121]
      

        Attachments

          Activity

            People

            Assignee:
            Unassigned
            Reporter:
            shaibz Shai Ben-Zvi
            Votes:
            5 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Sync Status

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