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

Add Build Step - File system objects list Parameter - Javascript Error due to "nodeName"

XMLWordPrintable

      Jenkins Version: 2.440.3 (latest LTS as of creation of this ticket)

      Issue

      • When adding/editing a job, Clicking "Add Build Step" shows an empty view if there happens to have a "File system objects list Parameter" component defined in the "This project is parameterized" section.

      Cause

      • A javascript error due to the following code in PopperJS (dom-utils/getNodeName.js):
      export default function getNodeName(element) {
        return element ? (element.nodeName || '').toLowerCase() : null;
      } 
      • The error:
      Uncaught TypeError: (intermediate value).toLowerCase is not a function
          getNodeName getNodeName.js:2
          getScrollParent getScrollParent.js:6
          getScrollParent getScrollParent.js:15
          getScrollParent getScrollParent.js:15
          getScrollParent getScrollParent.js:15
          getScrollParent getScrollParent.js:15
          getScrollParent getScrollParent.js:15
          getScrollParent getScrollParent.js:15
          listScrollParents listScrollParents.js:19
          setOptions createPopper.js:69
          createPopper createPopper.js:215
          createPopperInstance tippy.esm.js:1167
          mount tippy.esm.js:1204
          show tippy.esm.js:1450
          scheduleShow tippy.esm.js:1240
          onTrigger tippy.esm.js:1014
      • The reason:
        • The "File system objects list Parameter" block has a <select> whose name value is "nodeName".  So as the stack is traversing the elements, and "getNodeName()" is invoked, that function assumes the element.nodeName is a string, but what ends up being returned once it hits the <select> is a reference to the <select> due to its name being "nodeName".

      Expected Behavior

      • The popup of the possible build steps to add should show, instead of being a blank view caused by the javascript error.

        1. jenkins_getNodeName.png
          248 kB
          Justin
        2. jenkins_javascript_error.png
          505 kB
          Justin
        3. jenkins_select_nodeName.png
          224 kB
          Justin

            justinnichols Justin
            justinnichols Justin
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: