Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-49968

Core 2.110 is unable to select a branch source via the server dropdown

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Critical Critical
    • core
    • Jenkins core 2.110
      Recommended plugins at install time

      Summary:
      Starting with an empty directory for JENKINS_HOME, and running via java -jar jenkins.war, the ability to select a branch source for a multibranch pipeline doesn't work with core 2.110. But with core 2.109, it works fine.

      Prerequisites:
      Have a Bitbucket server instance, or a GitHub Enterprise instance, available. This issue was originally written up using Bitbucket server, but I've confirmed that it can be recreated with both Bitbucket and GitHub Enterprise.

      Steps to recreate:
      1. Download the 2.110 war

      2. Create an empty directory for your JENKINS_HOME, and export this as $JENKINS_HOME:

      [kshultz@karl-fedora jenkinsWars]$ rm -rf ~/JENKINS_HOME/
      [kshultz@karl-fedora jenkinsWars]$ mkdir ~/JENKINS_HOME
      [kshultz@karl-fedora jenkinsWars]$ export JENKINS_HOME=~/JENKINS_HOME/
      

      3. Go through the usual setup wizard, and choose to install suggested plugins.

      4. Once Jenkins is fully up and running, install bitbucket-branch-source from the Manage Plugins page. Have Jenkins reboot once installation is complete.

      5. Go to Manage Jenkins, and set up your Bitbucket server as follows:

      6. Create a new Multibranch Pipeline project. Under Branch Sources, click the "Add Source" button, and select Bitbucket:

      7. Click on the "Server" drop down. Nothing shows up - the drop down is inop.

      8. Open your browser console and switch to the Network tab. Clear the console, reload the page, and try clicking on that drop down:

      prototype.js:1794 XHR finished loading: POST "http://127.0.0.1:8080/$stapler/bound/4f662ac2-9cdb-49d6-bf21-975c41fe462e/render".
      request @ prototype.js:1794
      initialize @ prototype.js:1759
      (anonymous) @ prototype.js:470
      klass @ prototype.js:80
      proxy.(anonymous function) @ bind.js:48
      renderOnDemand @ hudson-behavior.js:554
      (anonymous) @ hetero-list.js:53
      notify @ event-min.js:7
      fire @ event-min.js:7
      e @ menu-min.js:7
      n @ event-min.js:7
      17:06:17.322 hudson-behavior.js:479 Unable to find nearby bitbucketServerUrl
      (anonymous) @ hudson-behavior.js:479
      each @ prototype.js:887
      registerValidator @ hudson-behavior.js:476
      (anonymous) @ behavior.js:111
      (anonymous) @ behavior.js:107
      applySubtree @ behavior.js:93
      (anonymous) @ hetero-list.js:107
      (anonymous) @ hudson-behavior.js:577
      next @ hudson-behavior.js:616
      script.onload.script.onreadystatechange @ hudson-behavior.js:2711
      17:06:17.338 prototype.js:2906 Uncaught TypeError: Cannot read property 'length' of undefined
          at Function.hasClassName (prototype.js:2906)
          at findAncestorClass (hudson-behavior.js:300)
          at VM3557 traits.js:37
          at Array.forEach (<anonymous>)
          at behavior.js:111
          at Array.forEach (<anonymous>)
          at behavior.js:107
          at Array.forEach (<anonymous>)
          at Object.applySubtree (behavior.js:93)
          at hetero-list.js:107
      hasClassName @ prototype.js:2906
      findAncestorClass @ hudson-behavior.js:300
      (anonymous) @ traits.js:37
      (anonymous) @ behavior.js:111
      (anonymous) @ behavior.js:107
      applySubtree @ behavior.js:93
      (anonymous) @ hetero-list.js:107
      (anonymous) @ hudson-behavior.js:577
      next @ hudson-behavior.js:616
      script.onload.script.onreadystatechange @ hudson-behavior.js:2711
      17:06:17.438 prototype.js:1794 XHR finished loading: GET "http://127.0.0.1:8080/job/thing/descriptorByName/com.cloudbees.jenkins.plugins.bitbucket.BitbucketSCMSource/checkServerUrl?value=".
      request @ prototype.js:1794
      initialize @ prototype.js:1759
      (anonymous) @ prototype.js:470
      klass @ prototype.js:80
      sendRequest @ hudson-behavior.js:171
      schedule @ hudson-behavior.js:179
      delayedCheck @ hudson-behavior.js:162
      registerValidator @ hudson-behavior.js:450
      (anonymous) @ behavior.js:111
      (anonymous) @ behavior.js:107
      applySubtree @ behavior.js:93
      (anonymous) @ hetero-list.js:107
      (anonymous) @ hudson-behavior.js:577
      next @ hudson-behavior.js:616
      script.onload.script.onreadystatechange @ hudson-behavior.js:2711
      17:06:17.441 prototype.js:1794 XHR finished loading: POST "http://127.0.0.1:8080/$stapler/bound/5502c944-cc5a-40e2-8c8d-4926d7433ee2/render".
      request @ prototype.js:1794
      initialize @ prototype.js:1759
      (anonymous) @ prototype.js:470
      klass @ prototype.js:80
      proxy.(anonymous function) @ bind.js:48
      renderOnDemand @ hudson-behavior.js:554
      updateDropDownList @ hudson-behavior.js:1127
      SELECT.dropdownList @ hudson-behavior.js:1142
      (anonymous) @ behavior.js:111
      (anonymous) @ behavior.js:107
      applySubtree @ behavior.js:93
      (anonymous) @ hetero-list.js:107
      (anonymous) @ hudson-behavior.js:577
      next @ hudson-behavior.js:616
      script.onload.script.onreadystatechange @ hudson-behavior.js:2711
      17:06:17.505 prototype.js:1794 XHR finished loading: GET "http://127.0.0.1:8080/job/thing/descriptorByName/com.cloudbees.jenkins.plugins.bitbucket.BitbucketSCMSource/checkCredentialsId?value=".
      request @ prototype.js:1794
      initialize @ prototype.js:1759
      (anonymous) @ prototype.js:470
      klass @ prototype.js:80
      sendRequest @ hudson-behavior.js:171
      schedule @ hudson-behavior.js:179
      onComplete @ hudson-behavior.js:184
      respondToReadyState @ prototype.js:1880
      onStateChange @ prototype.js:1809
      XMLHttpRequest.send (async)
      request @ prototype.js:1794
      initialize @ prototype.js:1759
      (anonymous) @ prototype.js:470
      klass @ prototype.js:80
      sendRequest @ hudson-behavior.js:171
      schedule @ hudson-behavior.js:179
      delayedCheck @ hudson-behavior.js:162
      registerValidator @ hudson-behavior.js:450
      (anonymous) @ behavior.js:111
      (anonymous) @ behavior.js:107
      applySubtree @ behavior.js:93
      (anonymous) @ hetero-list.js:107
      (anonymous) @ hudson-behavior.js:577
      next @ hudson-behavior.js:616
      script.onload.script.onreadystatechange @ hudson-behavior.js:2711
      

      It's possible to retrace these steps with core 2.109, and it will work just fine.

        1. image-2018-03-06-17-05-53-668.png
          920 kB
          Karl Shultz
        2. image-2018-03-06-17-02-02-000.png
          508 kB
          Karl Shultz
        3. image-2018-03-06-17-00-16-320.png
          431 kB
          Karl Shultz
        4. image-2018-03-06-16-57-50-210.png
          424 kB
          Karl Shultz
        5. 127.0.0.1.har
          1.76 MB
          Karl Shultz

            drulli Ulli Hafner
            kshultz Karl Shultz
            Votes:
            4 Vote for this issue
            Watchers:
            13 Start watching this issue

              Created:
              Updated:
              Resolved: