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

Pipeline results screen unable to close or change stages

    XMLWordPrintable

Details

    • 1.0-m11

    Description

      If you click on the results for a pipeline execution the following error results in the console:

      blueocean.js:25708 Uncaught Invariant Violation: addComponentAsRefTo(...): Only a ReactOwner can have refs. You might be adding a ref to a component that was not created inside a component's `render` method, or you have multiple copies of React loaded (details: https://fb.me/react-refs-must-have-owner).
      

      You will not be able to change stages (step listing doesn't change), or close the results screen. This is true of freestyle or pipeline job types.

      This can be seen for example on dogfood: https://ci.blueocean.io/blue/organizations/jenkins/Pipeline%20visualization%20demo/detail/Pipeline%20visualization%20demo/6/pipeline

      If you try to exit the result screen:

      blueocean.js:17932 Uncaught TypeError: Cannot read property 'componentWillLeave' of undefined
      

      and

      blueocean.js:25708 Uncaught Invariant Violation: removeComponentAsRefFrom(...): Only a ReactOwner can have refs. You might be removing a ref to a component that was not created inside a component's `render` method, or you have multiple copies of React loaded (details: https://fb.me/react-refs-must-have-owner).
      

      results.

      This seems to be a recently introduced bug.

      Attachments

        Activity

          michaelneale Michael Neale added a comment -

          I know tscherler was looking at an acceptance test for this screen, which would help trap things like this before they get out.

          michaelneale Michael Neale added a comment - I know tscherler was looking at an acceptance test for this screen, which would help trap things like this before they get out.
          michaelneale Michael Neale added a comment -

          Note, you also see this for freestyle, so isn't related directly to stage graph

          michaelneale Michael Neale added a comment - Note, you also see this for freestyle, so isn't related directly to stage graph
          michaelneale Michael Neale added a comment - - edited

          I was able to see this with a commit as far back as this one:

          I can confirm most recent good build:
          https://github.com/jenkinsci/blueocean-plugin/commit/2935fb26437c280449a16594f07f435cc54b8c6e

          and the breaking commit (you won't see the changes directly in this though):
          https://github.com/jenkinsci/blueocean-plugin/commit/a5b74c9d0ff3484e217f8e7116cf3eec17e1829f

          The diff between these: https://github.com/jenkinsci/blueocean-plugin/compare/2935fb26437c280449a16594f07f435cc54b8c6e...a5b74c9d0ff3484e217f8e7116cf3eec17e1829f

          So it looks like it is related to JDL. Possibly something is pulling in a different react version somewhere?

          michaelneale Michael Neale added a comment - - edited I was able to see this with a commit as far back as this one: I can confirm most recent good build: https://github.com/jenkinsci/blueocean-plugin/commit/2935fb26437c280449a16594f07f435cc54b8c6e and the breaking commit (you won't see the changes directly in this though): https://github.com/jenkinsci/blueocean-plugin/commit/a5b74c9d0ff3484e217f8e7116cf3eec17e1829f The diff between these: https://github.com/jenkinsci/blueocean-plugin/compare/2935fb26437c280449a16594f07f435cc54b8c6e...a5b74c9d0ff3484e217f8e7116cf3eec17e1829f So it looks like it is related to JDL. Possibly something is pulling in a different react version somewhere?
          michaelneale Michael Neale added a comment - - edited

          Looks like JDL react version is out of sync with blueocean:

          https://github.com/jenkinsci/jenkins-design-language/blob/master/package.json#L39
          https://github.com/jenkinsci/blueocean-plugin/blob/master/blueocean-web/package.json#L35

          https://github.com/jenkinsci/blueocean-plugin/blob/master/js-extensions/package.json#L21 looks also a bit wrong - not sure what that range means though?

          I am not sure if sophistifunk's npm checkdeps.js tool could work across repos, hence can't pick this up

          michaelneale Michael Neale added a comment - - edited Looks like JDL react version is out of sync with blueocean: https://github.com/jenkinsci/jenkins-design-language/blob/master/package.json#L39 https://github.com/jenkinsci/blueocean-plugin/blob/master/blueocean-web/package.json#L35 https://github.com/jenkinsci/blueocean-plugin/blob/master/js-extensions/package.json#L21 looks also a bit wrong - not sure what that range means though? I am not sure if sophistifunk 's npm checkdeps.js tool could work across repos, hence can't pick this up
          michaelneale Michael Neale added a comment - - edited

          I updated versions and tested it locally:

          https://github.com/jenkinsci/blueocean-plugin/pull/323 - worth a look?

          If this is right, then the react error is correct! and great!
          What we do need are: tests, tooling to check for out of sync versions (I think...)

          Thats enough work for my day off.

          michaelneale Michael Neale added a comment - - edited I updated versions and tested it locally: https://github.com/jenkinsci/blueocean-plugin/pull/323 - worth a look? If this is right, then the react error is correct! and great! What we do need are: tests, tooling to check for out of sync versions (I think...) Thats enough work for my day off.

          mneale@cloudbees.com yes I just tried again before merging master into my branch and both stages karaoke tests are failing since they try to interact with a broken page. You see the error in the console. Coming with https://github.com/jenkinsci/blueocean-acceptance-test/pull/3

          tscherler Thorsten Scherler added a comment - mneale@cloudbees.com yes I just tried again before merging master into my branch and both stages karaoke tests are failing since they try to interact with a broken page. You see the error in the console. Coming with https://github.com/jenkinsci/blueocean-acceptance-test/pull/3

          People

            sophistifunk Josh McDonald
            michaelneale Michael Neale
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: