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

Intermittent: Unhandled Rejection: "TypeError: Cannot read property '_links' of undefined

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Critical Critical
    • blueocean-plugin
    • Jenkins:
      Core: 2.136
      Blue Ocean 1.8.2
      All other plugins at experimental update center levels
    • 1.14.0

      Summary
      Intermittently, when running a simple Declarative Pipeline, a stage which I know to have steps in it will be shown as having no steps. The browser console reports two errors in quick succession when this takes place.

      Frequency
      Probably 50% of the time.

      Steps to recreate
      1. Create a new, empty repository in an SCM you already have set up for use with Blue Ocean. In my case this is a Bitbucket server.

      2. Go through the Blue Ocean create flow, specifying the project and repo.

      3. Create a new Pipeline using the Pipeline Editor. This doesn't need to be anything fancy - mine looks exactly like this:

      pipeline {
        agent any
        stages {
          stage('I won a hat last year') {
            steps {
              echo 'I have not won another since, though.'
              sh 'cat /var/log/jenkins/jenkins.log.1'
            }
          }
        }
      }
      

      4. Run the pipeline several times, and look for the "live" pipeline view to report that the stage doesn't have any steps in it, as seen in this screenshot:

      5. This is when the error has occurred. The browser console will show the following:

      There has been an error while trying to get the run data. TypeError: newArray.slice is not a function
          at LogConsole.componentWillReceiveProps (jenkins-js-extension.js:93380)
          at ReactCompositeComponentWrapper.updateComponent (jenkins-design-language.js:49436)
          at ReactCompositeComponentWrapper.receiveComponent (jenkins-design-language.js:49369)
          at Object.receiveComponent (jenkins-design-language.js:55499)
          at ReactCompositeComponentWrapper._updateRenderedComponent (jenkins-design-language.js:49576)
          at ReactCompositeComponentWrapper._performComponentUpdate (jenkins-design-language.js:49546)
          at ReactCompositeComponentWrapper.updateComponent (jenkins-design-language.js:49467)
          at ReactCompositeComponentWrapper.receiveComponent (jenkins-design-language.js:49369)
          at Object.receiveComponent (jenkins-design-language.js:55499)
          at Object.updateChildren (jenkins-design-language.js:48731)
          at ReactDOMComponent._reconcilerUpdateChildren (jenkins-design-language.js:54357)
          at ReactDOMComponent._updateChildren (jenkins-design-language.js:54456)
          at ReactDOMComponent.updateChildren (jenkins-design-language.js:54443)
          at ReactDOMComponent._updateDOMChildren (jenkins-design-language.js:50747)
          at ReactDOMComponent.updateComponent (jenkins-design-language.js:50565)
          at ReactDOMComponent.receiveComponent (jenkins-design-language.js:50527)
          at Object.receiveComponent (jenkins-design-language.js:55499)
          at Object.updateChildren (jenkins-design-language.js:48731)
          at ReactDOMComponent._reconcilerUpdateChildren (jenkins-design-language.js:54357)
          at ReactDOMComponent._updateChildren (jenkins-design-language.js:54456)
          at ReactDOMComponent.updateChildren (jenkins-design-language.js:54443)
          at ReactDOMComponent._updateDOMChildren (jenkins-design-language.js:50747)
      

      Followed immediately (0.006 seconds later) by:

      blueocean.js:58096 Unhandled Rejection: "TypeError: Cannot read property '_links' of undefined
          at PipelineService.updateLatestRun (http://172.18.40.95:8080/adjuncts/ce7d142d/io/jenkins/blueocean/blueocean-core-js.js:58396:45)
          at executeAction (http://172.18.40.95:8080/adjuncts/ce7d142d/io/jenkins/blueocean/blueocean-core-js.js:40729:19)
          at PipelineService.res (http://172.18.40.95:8080/adjuncts/ce7d142d/io/jenkins/blueocean/blueocean-core-js.js:40701:16)
          at http://172.18.40.95:8080/adjuncts/ce7d142d/io/jenkins/blueocean/blueocean-core-js.js:57603:40"
      logUnhandledPromiseRejection @ blueocean.js:58096
      

            olamy Olivier Lamy
            kshultz Karl Shultz
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: