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

JS error on MBPL configuration for GitHub branch source

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      1. Create a new multi-branch pipeline
      2. Under "Branch Sources", click "GitHub"
      TypeError: inputTbody.childNodes[4] is undefined
          findNeighboringDynamicInput http://localhost:8080/plugin/github-branch-source/github-scm-source.js:25
          <anonymous> http://localhost:8080/plugin/github-branch-source/github-scm-source.js:30
          applySubtree http://localhost:8080/static/7e7618a8/scripts/behavior.js:116
          applySubtree http://localhost:8080/static/7e7618a8/scripts/behavior.js:111
          applySubtree http://localhost:8080/static/7e7618a8/scripts/behavior.js:93
          <anonymous> http://localhost:8080/adjuncts/7e7618a8/lib/form/hetero-list/hetero-list.js:110    renderOnDemand http://localhost:8080/static/7e7618a8/scripts/hudson-behavior.js:684
          next http://localhost:8080/static/7e7618a8/scripts/hudson-behavior.js:723
          onreadystatechange http://localhost:8080/static/7e7618a8/scripts/hudson-behavior.js:2850
          loadScript http://localhost:8080/static/7e7618a8/scripts/hudson-behavior.js:2846
          evalInnerHtmlScripts http://localhost:8080/static/7e7618a8/scripts/hudson-behavior.js:701
          next http://localhost:8080/static/7e7618a8/scripts/hudson-behavior.js:723
          onreadystatechange http://localhost:8080/static/7e7618a8/scripts/hudson-behavior.js:2850
          loadScript http://localhost:8080/static/7e7618a8/scripts/hudson-behavior.js:2846
          evalInnerHtmlScripts http://localhost:8080/static/7e7618a8/scripts/hudson-behavior.js:701
          next http://localhost:8080/static/7e7618a8/scripts/hudson-behavior.js:723
          onreadystatechange http://localhost:8080/static/7e7618a8/scripts/hudson-behavior.js:2850
          loadScript http://localhost:8080/static/7e7618a8/scripts/hudson-behavior.js:2846
          evalInnerHtmlScripts http://localhost:8080/static/7e7618a8/scripts/hudson-behavior.js:701
          next http://localhost:8080/static/7e7618a8/scripts/hudson-behavior.js:723
          evalInnerHtmlScripts http://localhost:8080/static/7e7618a8/scripts/hudson-behavior.js:706
          next http://localhost:8080/static/7e7618a8/scripts/hudson-behavior.js:723
          onreadystatechange http://localhost:8080/static/7e7618a8/scripts/hudson-behavior.js:2850
          loadScript http://localhost:8080/static/7e7618a8/scripts/hudson-behavior.js:2846
          evalInnerHtmlScripts http://localhost:8080/static/7e7618a8/scripts/hudson-behavior.js:701
          next http://localhost:8080/static/7e7618a8/scripts/hudson-behavior.js:723
          sequencer http://localhost:8080/static/7e7618a8/scripts/hudson-behavior.js:726
          evalInnerHtmlScripts http://localhost:8080/static/7e7618a8/scripts/hudson-behavior.js:711
          renderOnDemand http://localhost:8080/static/7e7618a8/scripts/hudson-behavior.js:682
          onSuccess http://localhost:8080/adjuncts/7e7618a8/org/kohsuke/stapler/bind.js:57
          respondToReadyState http://localhost:8080/static/7e7618a8/scripts/prototype.js:1657
          onStateChange http://localhost:8080/static/7e7618a8/scripts/prototype.js:1600
          bind http://localhost:8080/static/7e7618a8/scripts/prototype.js:414
          request http://localhost:8080/static/7e7618a8/scripts/prototype.js:1581
          initialize http://localhost:8080/static/7e7618a8/scripts/prototype.js:1550
          wrap http://localhost:8080/static/7e7618a8/scripts/prototype.js:452
          klass http://localhost:8080/static/7e7618a8/scripts/prototype.js:101
          methodName http://localhost:8080/adjuncts/7e7618a8/org/kohsuke/stapler/bind.js:48
          renderOnDemand http://localhost:8080/static/7e7618a8/scripts/hudson-behavior.js:661
          <anonymous> http://localhost:8080/adjuncts/7e7618a8/lib/form/hetero-list/hetero-list.js:56
          notify http://localhost:8080/static/7e7618a8/scripts/yui/event/event-min.js:7
          fire http://localhost:8080/static/7e7618a8/scripts/yui/event/event-min.js:7
          e http://localhost:8080/static/7e7618a8/scripts/yui/menu/menu-min.js:7 

      Visible impact: It's not possible to add a new entry under "Behaviors", such as "Discover tags".

        Attachments

          Activity

          danielbeck Daniel Beck created issue -
          timja Tim Jacomb made changes -
          Field Original Value New Value
          Component/s github-branch-source-plugin [ 20858 ]
          Hide
          timja Tim Jacomb added a comment -
          Show
          timja Tim Jacomb added a comment - cc Liam Newman Devin Nusbaum
          timja Tim Jacomb made changes -
          Assignee Tim Jacomb [ timja ]
          timja Tim Jacomb made changes -
          Status Open [ 1 ] In Progress [ 3 ]
          timja Tim Jacomb made changes -
          Status In Progress [ 3 ] In Review [ 10005 ]
          timja Tim Jacomb made changes -
          Remote Link This issue links to "github-branch-source-plugin/pull/360 (Web Link)" [ 26352 ]
          Hide
          dnusbaum Devin Nusbaum added a comment -

          Tim Jacomb Just a heads up, but from what I can tell you still cannot configure behaviors for newly-created GitHub branch sources even after https://github.com/jenkinsci/github-branch-source-plugin/pull/360 (although the console error listed in the Jira ticket is gone). If you reconfigure an existing GitHub branch source, then you can add new behaviors, but if you create a new multibranch project and add a new GitHub branch source, you cannot add behaviors until after you save the branch source. Notably, I see the same behavior for Git branch sources, which suggests that something is wrong in branch-api or maybe scm-api, but I'm not sure.

          Show
          dnusbaum Devin Nusbaum added a comment - Tim Jacomb Just a heads up, but from what I can tell you still cannot configure behaviors for newly-created GitHub branch sources even after https://github.com/jenkinsci/github-branch-source-plugin/pull/360 (although the console error listed in the Jira ticket is gone). If you reconfigure an existing GitHub branch source, then you can add new behaviors, but if you create a new multibranch project and add a new GitHub branch source, you cannot add behaviors until after you save the branch source. Notably, I see the same behavior for Git branch sources, which suggests that something is wrong in branch-api or maybe scm-api , but I'm not sure.
          Hide
          timja Tim Jacomb added a comment -

          Is that with a minimal plugin set? Last I tested this it did work on that pull request, maybe another plugin is causing the issue

          Show
          timja Tim Jacomb added a comment - Is that with a minimal plugin set? Last I tested this it did work on that pull request, maybe another plugin is causing the issue
          Hide
          dnusbaum Devin Nusbaum added a comment -

          That is with mvn hpi:run from the current master branch of github-branch-source and no other plugins. The key thing seems to be that it only happens before the branch source is saved. If you reconfigure a source that has been saved, everything works.

          Also to clarify, I think the PR does help, because it fixes the error in the description of the ticket, it's just that something else seems to be wrong as well.

          Show
          dnusbaum Devin Nusbaum added a comment - That is with mvn hpi:run from the current master branch of github-branch-source and no other plugins. The key thing seems to be that it only happens before the branch source is saved. If you reconfigure a source that has been saved, everything works. Also to clarify, I think the PR does help, because it fixes the error in the description of the ticket, it's just that something else seems to be wrong as well.
          Hide
          timja Tim Jacomb added a comment - - edited

          Reproduced, and yeah well that explains why I missed it .

          I would have been re-configuring the same one over again I expect.

          Workaround till we figure out what's going on:
          1. Create the multi branch project
          2. Add the SCM configuration
          3. Save
          4. Click configure
          5. You can now add behaviours

          Ok, I found what is likely the cause, there's 3 table elements in the page when you add the github SCM

          1. Discover branches behaviour
          2. Discover pull requests from origin
          3. Discover pull requests from forks

          and I haven't been able to find where those are coming from =/

          and after saving the table elements are gone and they are in their proper elements, weird...

          From what I can tell it's not the github branch source plugin causing it, each plugin installed needs to be checked, (I don't have time right now to look at it any more)

          Show
          timja Tim Jacomb added a comment - - edited Reproduced, and yeah well that explains why I missed it . I would have been re-configuring the same one over again I expect. Workaround till we figure out what's going on: 1. Create the multi branch project 2. Add the SCM configuration 3. Save 4. Click configure 5. You can now add behaviours Ok, I found what is likely the cause, there's 3 table elements in the page when you add the github SCM 1. Discover branches behaviour 2. Discover pull requests from origin 3. Discover pull requests from forks and I haven't been able to find where those are coming from =/ and after saving the table elements are gone and they are in their proper elements, weird... From what I can tell it's not the github branch source plugin causing it, each plugin installed needs to be checked, (I don't have time right now to look at it any more)
          Hide
          dnusbaum Devin Nusbaum added a comment -

          Those three table elements are the default traits/behaviors for GitHubSCMSource, and the most relevant file seems like traits.jelly in scm-api Maybe the issue has to do with the use of the divBasedFormLayout variable in traits.jelly when that taglib is used by other plugins? We could try replacing https://github.com/jenkinsci/scm-api-plugin/pull/82 with a PR that bumps the minimum Jenkins version and switches to just always using divs to see if that helps.

          Show
          dnusbaum Devin Nusbaum added a comment - Those three table elements are the default traits/behaviors for GitHubSCMSource , and the most relevant file seems like traits.jelly in scm-api Maybe the issue has to do with the use of the divBasedFormLayout variable in traits.jelly when that taglib is used by other plugins? We could try replacing https://github.com/jenkinsci/scm-api-plugin/pull/82 with a PR that bumps the minimum Jenkins version and switches to just always using divs to see if that helps.
          Hide
          timja Tim Jacomb added a comment - - edited

          this is probably fixed in 2.271 with https://github.com/jenkinsci/jenkins/pull/5075

          you got time to re-check on that version / latest weekly?

          Show
          timja Tim Jacomb added a comment - - edited this is probably fixed in 2.271 with https://github.com/jenkinsci/jenkins/pull/5075 you got time to re-check on that version / latest weekly?
          Hide
          dnusbaum Devin Nusbaum added a comment -

          Sure will do, although it will be a few hours before I have time to check. Thanks!

          Show
          dnusbaum Devin Nusbaum added a comment - Sure will do, although it will be a few hours before I have time to check. Thanks!
          Hide
          dnusbaum Devin Nusbaum added a comment -

          Tim Jacomb I tested with 2.274 and everything worked, so yeah https://github.com/jenkinsci/jenkins/pull/5075 probably fixed it. Thanks!

          Show
          dnusbaum Devin Nusbaum added a comment - Tim Jacomb I tested with 2.274 and everything worked, so yeah https://github.com/jenkinsci/jenkins/pull/5075 probably fixed it. Thanks!
          Hide
          timja Tim Jacomb added a comment -

          Cool we should probably bump the minimum version then

          Show
          timja Tim Jacomb added a comment - Cool we should probably bump the minimum version then
          bitwiseman Liam Newman made changes -
          Resolution Fixed [ 1 ]
          Status In Review [ 10005 ] Fixed but Unreleased [ 10203 ]
          Hide
          allan_burdajewicz Allan BURDAJEWICZ added a comment -

          Tim Jacomb Should this be closed as it seems released in github-branch-source:2.9.4 ?

          Show
          allan_burdajewicz Allan BURDAJEWICZ added a comment - Tim Jacomb Should this be closed as it seems released in github-branch-source:2.9.4 ?
          timja Tim Jacomb made changes -
          Status Fixed but Unreleased [ 10203 ] Resolved [ 5 ]

            People

            Assignee:
            timja Tim Jacomb
            Reporter:
            danielbeck Daniel Beck
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: