Uploaded image for project: 'Dev - Nexus Repo'
  1. Dev - Nexus Repo
  2. NEXUS-10165

Register bower package fails

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Not A Bug
    • Affects Version/s: 3.0.0
    • Fix Version/s: None
    • Component/s: Bower
    • Labels:
      None

      Description

      Hi,

      I'm using Nexus 3 in docker :
      Version 3.0.0-03
      Edition OSS
      Build Revision be8dc14592026088ae68462638c85acd9f333577
      Build Timestamp 2016-04-04-1845-34384

      I can't register a package with bower.

      Here is my .bowwerc file :

      {
          "directory": "bower_components",
          "registry": {
              "search": ["http://192.168.99.100:10010/repository/bower-group"],
              "register": "http://192.168.99.100:10010/repository/bower-hosted/"
          },
          "resolvers": ["bower-nexus3-resolver"],
          "nexus": {
              "username": "admin",
              "password": "admin123"
          }
      }
      

      Log file :

      bower jquery#*                 resolve git://github.com/jquery/jquery.git#*
      bower jquery#*                download https://github.com/jquery/jquery/archive/2.2.3.tar.gz
      bower jquery#*                 extract archive.tar.gz
      bower jquery#*                resolved git://github.com/jquery/jquery.git#2.2.3
      ? Registering a package will make it installable via the registry (http://192.168.99.100:10010/repository/bower-internal), continue? Yes
      bower jquery                  register git://github.com/jquery/jquery.git
      git://github.com/jquery/jquery.git
      jquery
      http://192.168.99.100:10010/repository/bower-internal/packages
      undefined
      bower                         EUNKNOWN Unknown error: 401 - undefined
      

      Using Curl :

      url -X POST -d '{"name": "jquery", "url": "git://github.com/jquery/jquery.git"}' http://192.168.99.100:10010/repository/bower-internal/packages -v  -u admin
      Enter host password for user 'admin':
      *   Trying 192.168.99.100...
      * Connected to 192.168.99.100 (192.168.99.100) port 10010 (#0)
      * Server auth using Basic with user 'admin'
      > POST /repository/bower-internal/packages HTTP/1.1
      > Host: 192.168.99.100:10010
      > Authorization: Basic YWRtaW46YWRtaW4xMjM=
      > User-Agent: curl/7.43.0
      > Accept: */*
      > Content-Length: 63
      > Content-Type: application/x-www-form-urlencoded
      >
      * upload completely sent off: 63 out of 63 bytes
      < HTTP/1.1 500 Server Error
      < Date: Sat, 30 Apr 2016 19:54:14 GMT
      < Server: Nexus/3.0.0-03 (OSS)
      < X-Frame-Options: SAMEORIGIN
      < X-Content-Type-Options: nosniff
      < Set-Cookie: NXREMEMBERME=deleteMe; Path=/; Max-Age=0; Expires=Fri, 29-Apr-2016 19:54:14 GMT
      < Content-Type: text/plain
      < Content-Length: 0
      <
      * Connection #0 to host 192.168.99.100 left intact
      

      And finally Log from nexus :

      2016-04-30 19:56:24,394+0000 WARN  [qtp1697703179-354] admin org.sonatype.nexus.repository.bower.internal.BowerExceptionHandler - Service failure
      java.lang.NullPointerException: null
      	at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:210) [com.google.guava:18.0.0]
      	at org.sonatype.nexus.repository.bower.internal.HostedHandlers.lambda$1(HostedHandlers.java:47) [na:na]
      	at org.sonatype.nexus.repository.view.Context.proceed(Context.java:79) [org.sonatype.nexus.repository:3.0.0.03]
      

      Any idea why registering packages is impossible ?

      BR,
      Jérôme

        Attachments

          Activity

            People

            Assignee:
            Unassigned
            Reporter:
            jgarec Jerome Garec
            Last Updated By:
            Peter Lynch
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Date of First Response:

                tigCommentSecurity.panel-title