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

BlueOcean UI stuck in "Waiting for run to start"

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Blocker Blocker
    • blueocean-plugin
    • None
    • Jenkins 2.180, BlueOcean 1.17.0
    • blue-ocean 1.19.0

      We recently upgraded BlueOcean from 1.16.0 to 1.17.0 and we started observing a weird behaviour in the BlueOcean pipeline UI.

      Frequently (not always) the pipeline UI stops updating the progress while the pipeline is running and the UI is stuck at "Waiting for run to start" (see attached screenshot). When it happens, it does not recover until the pipeline execution completes: once completed, the UI is correctly updated (all steps are green).

      We've also noticed that - when happens - the underlying requests sent by the browser to the endpoint https://jenkins.DOMAIN/blue/rest/organizations/jenkins/pipelines/PROJECT/branches/master/runs/ID/nodes/ID/steps/ always return an empty array "[]" instead of the expected array of steps. On the contrary, during the execution of the pipeline, if we look at the "Console Output" (old Jenkins UI) we can correctly see the progress of the pipeline even when the BlueOcean UI is stuck at "Waiting for run to start".

      This issue looks disappear if we rollback all BlueOcean plugins from 1.17.0 to 1.16.0.

        1. jenkins_build1.mov
          970 kB
        2. jenkins_build1.png
          jenkins_build1.png
          89 kB
        3. jenkins_build2.mov
          1.07 MB
        4. jenkins_build2.png
          jenkins_build2.png
          96 kB
        5. screenshot_2019-06-18_at_14.52.11.png
          screenshot_2019-06-18_at_14.52.11.png
          116 kB
        6. Screenshot 2019-10-17 at 10.08.17.png
          Screenshot 2019-10-17 at 10.08.17.png
          16 kB

          [JENKINS-58085] BlueOcean UI stuck in "Waiting for run to start"

          Donald Morton added a comment -

          I'm seeing the same issue on Jenkins 2.235.3 and Blue Ocean 1.23.2.

          Donald Morton added a comment - I'm seeing the same issue on Jenkins 2.235.3 and Blue Ocean 1.23.2.

          I am seeing the same issue as well, with Blue Ocean 1.23.2 and Jenkins 2.235.1

          dinesh Gopalakrishnan added a comment - I am seeing the same issue as well, with Blue Ocean 1.23.2 and Jenkins 2.235.1

          Ernest Suryś added a comment - - edited

          Same here, BO: 1.24.2, Jenkins: 2.492.2

          pipeline {
            agent any
            parameters {
              choice(name: 'BuildType', choices: ['Release', 'Develop'], description: ".")
              text(name: 'Comments', defaultValue: '', description: 'Additional information about this build.')
            }
            stages {
              stage('Check Unity version') {
                steps {
                  sh '''
                    command
                  '''
                }
              }
              stage('Build') {
                environment {
                  PROJECT_NAME = sh(script:'basename $(git config --get remote.origin.url) .git', returnStdout: true).trim()
                  DATE = sh(script:'date +%Y%m%d', returnStdout: true).trim()
                  BUILD_DIR = ""
                }
                parallel {
                  stage('Release') {
                    when { expression { params.BuildType == 'Release' } }
                    steps {
                      sh '''
                        command
                      '''
                    }
                  }
                  stage('Develop') {
                    when { expression { params.BuildType == 'Develop' } }
                    steps {
                      sh '''
                        command
                      '''
                    }
                  }
                }
              }
            }
          }
          

          Ernest Suryś added a comment - - edited Same here, BO: 1.24.2, Jenkins: 2.492.2 pipeline { agent any parameters { choice(name: 'BuildType' , choices: [ 'Release' , 'Develop' ], description: "." ) text(name: 'Comments' , defaultValue: '', description: ' Additional information about this build.') } stages { stage( 'Check Unity version' ) { steps { sh ''' command ''' } } stage( 'Build' ) { environment { PROJECT_NAME = sh(script: 'basename $(git config --get remote.origin.url) .git' , returnStdout: true ).trim() DATE = sh(script: 'date +%Y%m%d' , returnStdout: true ).trim() BUILD_DIR = "" } parallel { stage( 'Release' ) { when { expression { params.BuildType == 'Release' } } steps { sh ''' command ''' } } stage( 'Develop' ) { when { expression { params.BuildType == 'Develop' } } steps { sh ''' command ''' } } } } } }

          Did some experimenting. Pretty sure this happens with parallel stages and at least one having a when expression. Removing the whens or linearizing restores real-time logging.

          Dharma Indurthy added a comment - Did some experimenting. Pretty sure this happens with parallel stages and at least one having a when expression. Removing the whens or linearizing restores real-time logging.

          boris ivan added a comment -

          Since this is a bug and not an enhancement, will it be possible to get an update on this? Affecting so many people.

          boris ivan added a comment - Since this is a bug and not an enhancement, will it be possible to get an update on this? Affecting so many people.

          DP added a comment - - edited

          In terms of the "Waiting for run to start" message in a parallel block, the issue is still reproducible with Blue Ocean 1.24.3.

          As a workaround, I've found that adding a new dummy stage at the end of the parallel block will allow the logs of the other stages in the block to be viewed. The name of this extra stage doesn't matter, but it has to be defined as the last stage in the parallel block.

          For more details, see my comment on JENKINS-48879.

           

          I've also seen the "Waiting for run to start" message in single stages (without a parallel block), usually when the stages in the pipeline have changed (eg. after modifying the Jenkinsfile to add a new stage). In this case, I've found that the details of all stages will be shown when the pipeline completes; subsequent pipeline runs will then show the stages and their logs correctly. I'm not aware of a workaround for this case.

          DP added a comment - - edited In terms of the "Waiting for run to start" message in a parallel block, the issue is still reproducible with Blue Ocean 1.24.3. As a workaround, I've found that adding a new dummy stage at the end of the parallel block will allow the logs of the other stages in the block to be viewed. The name of this extra stage doesn't matter, but it has to be defined as the last stage in the parallel block. For more details, see my comment on JENKINS-48879 .   I've also seen the "Waiting for run to start" message in single stages (without a parallel block), usually when the stages in the pipeline have changed (eg. after modifying the Jenkinsfile to add a new stage). In this case, I've found that the details of all stages will be shown when the pipeline completes; subsequent pipeline runs will then show the stages and their logs correctly. I'm not aware of a workaround for this case.

          Hi, i'm seeing the same issue, in console log step is executing and in blueocean i see "Waiting for run to start" message, 2nd step in a parallel block
          Jenkins: 2.263.2
          Blueocean:  1.24.0 

          Ruslan Yemelianov added a comment - Hi, i'm seeing the same issue, in console log step is executing and in blueocean i see "Waiting for run to start" message, 2nd step in a parallel block Jenkins: 2.263.2 Blueocean:  1.24.0 

          Nick Devenish added a comment - - edited

          I'm seeing this now still, Blue Ocean 1.24.4, Jenkins 2.277.1 (docker jenkinsci/blueocean ). The previous run failed on this stage, but otherwise the flow structure/when conditions haven't changed since the last run - but I did remove the agent specifier from two incorrectly applied stages:

            parallel {
                stage("Linux") {
                    agent { label 'linux' }
                    stages {
                        stage("Build") {
          -                 agent any
                            ...
          
                        }
                        stage("Test") {
          -                 agent none
                            ...
                        }
                    }
                }
            }
          

          It actually started showing the output but then on a refresh disappeared back down to "Waiting for Run to Start". This build then went on to fail, but it also didn't work on a subsequent run so maybe it's not related to the agent changes. (Edit: To say that it's all obviously showing in the classic "console log" fine)

           

          Edit 2: Again to say that today with my test builds it persists - but it isn't just blank; before starting the job (waiting for executor) the "current stage" indicator is on the wrong step. Then, when it starts, it has the first step fine "checking out from source control". Clicking on a different node then back to the actual executing one replaces even that one step with "waiting for run to start"

          Nick Devenish added a comment - - edited I'm seeing this now still, Blue Ocean 1.24.4, Jenkins 2.277.1 (docker jenkinsci/blueocean ). The previous run failed on this stage, but otherwise the flow structure/when conditions haven't changed since the last run - but I did remove the agent specifier from two incorrectly applied stages: parallel { stage("Linux") { agent { label 'linux' } stages { stage("Build") { - agent any ... } stage("Test") { - agent none ... } } } } It actually started showing the output but then on a refresh disappeared back down to "Waiting for Run to Start". This build then went on to fail, but it also didn't work on a subsequent run so maybe it's not related to the agent changes. (Edit: To say that it's all obviously showing in the classic "console log" fine)   Edit 2: Again to say that today with my test builds it persists - but it isn't just blank; before starting the job (waiting for executor) the "current stage" indicator is on the wrong step. Then, when it starts, it has the first step fine "checking out from source control". Clicking on a different node then back to the actual executing one replaces even that one step with "waiting for run to start"

          Pay Bas added a comment -

          It's been a couple of years now, but sad to say that this bug/issue is still very much alive and kicking unfortunately.

          Since our pipelines are heavily parallelized, it makes Blue Ocean pretty much useless until the build is finished.

          Pay Bas added a comment - It's been a couple of years now, but sad to say that this bug/issue is still very much alive and kicking unfortunately. Since our pipelines are heavily parallelized, it makes Blue Ocean pretty much useless until the build is finished.

          Jason Wright added a comment -

          I'm having the same issue with Blue Ocean 1.27.9

          Jason Wright added a comment - I'm having the same issue with Blue Ocean 1.27.9

            Unassigned Unassigned
            pracucci Marco Pracucci
            Votes:
            44 Vote for this issue
            Watchers:
            61 Start watching this issue

              Created:
              Updated: