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

BlueOcean UI stuck in "Waiting for run to start"

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Blocker
    • Resolution: Fixed
    • Component/s: blueocean-plugin
    • Labels:
      None
    • Environment:
      Jenkins 2.180, BlueOcean 1.17.0
    • Similar Issues:
    • Released As:
      blue-ocean 1.19.0

      Description

      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.

        Attachments

          Issue Links

            Activity

            Hide
            whatsdevops Angelo Loria added a comment -

            I am seeing this issue with every pipeline run; all pipelines are Bitbucket Branch Source jobs. 

            Pipeline example w/ all details removed. This pipeline is called by the jenkinsfile in the solution.

             

            // this code allows for entire pipeline to be called from jenkinsfile in solution
            def call(body) {
            // evaluate the body block, and collect configuration into the object
            def params = [:]
            body.resolveStrategy = Closure.DELEGATE_FIRST
            body.delegate = params
            body()

            def deployUtils = new DeployUtils(this)
            def gitUtils = new GitUtils(this)
            def jiraUtils = new JiraUtils(this)

            // sets parameters ahead of pipeline being executed
            node('master') {
            stage('Gathering Parameters for Build') {
            switch(env.branch_name)

            Unknown macro: { case ~/hotfix.*/}

            }
            }

            pipeline {
            agent {
            label "${agentLabel}"
            }
            options

            Unknown macro: { timestamps() disableConcurrentBuilds() }

            stages {
            stage('Building sln') {
            }
            stage('Publishing') {
            }
            }
            post {
            always {
            }
            failure {
            }
            success {

            }
            cleanup {
            }
            }
            }
            }
             

            Show
            whatsdevops Angelo Loria added a comment - I am seeing this issue with every pipeline run; all pipelines are Bitbucket Branch Source jobs.  Pipeline example w/ all details removed. This pipeline is called by the jenkinsfile in the solution.   // this code allows for entire pipeline to be called from jenkinsfile in solution def call(body) { // evaluate the body block, and collect configuration into the object def params = [:] body.resolveStrategy = Closure.DELEGATE_FIRST body.delegate = params body() def deployUtils = new DeployUtils(this) def gitUtils = new GitUtils(this) def jiraUtils = new JiraUtils(this) // sets parameters ahead of pipeline being executed node('master') { stage('Gathering Parameters for Build') { switch(env.branch_name) Unknown macro: { case ~/hotfix.*/} } } pipeline { agent { label "${agentLabel}" } options Unknown macro: { timestamps() disableConcurrentBuilds() } stages { stage('Building sln') { } stage('Publishing') { } } post { always { } failure { } success { } cleanup { } } } }  
            Hide
            timewalker75a Dmitry Seryogin added a comment -

             think the simplest reproduction of that kind of issue is a Pipeline like this

            Given you meant modulo 2 rather than 0, yeah, that does reproduce the problem just right - 3rd step is sitting there with 'waiting for run to start' until the step actually completes and the node renders with the green tick.

            Show
            timewalker75a Dmitry Seryogin added a comment -  think the simplest reproduction of that kind of issue is a Pipeline like this Given you meant modulo 2 rather than 0, yeah, that does reproduce the problem just right - 3rd step is sitting there with 'waiting for run to start' until the step actually completes and the node renders with the green tick.
            Hide
            dnusbaum Devin Nusbaum added a comment -

            Blue Ocean 1.19.0 was just released with a fix for at least some aspects of this issue. Please try it out, and if you are still seeing the problem, post a minimal Jenkinsfile that reproduces the behavior you are seeing.

            Show
            dnusbaum Devin Nusbaum added a comment - Blue Ocean 1.19.0 was just released with a fix for at least some aspects of this issue. Please try it out, and if you are still seeing the problem, post a minimal Jenkinsfile that reproduces the behavior you are seeing.
            Hide
            bbroere Bas Broere added a comment - - edited

            Sorry, not in the position to post a minimal jenkinsfile, but still the problem persists in the pipeline added as attachment.
            Version Blue Ocean: 1.19.0 · Core 2.199 · e743640 · 4th September 2019 01:20 AM

            Show
            bbroere Bas Broere added a comment - - edited Sorry, not in the position to post a minimal jenkinsfile, but still the problem persists in the pipeline added as attachment. Version Blue Ocean: 1.19.0 · Core 2.199 · e743640 · 4th September 2019 01:20 AM
            Hide
            brianjmurrell Brian J Murrell added a comment -

            Can we please have this re-opened.  I can confirm it's still happening here on 1.19.0 also.

            This together with stage-view being pretty crippled means finding logs of currently-running pipelines (i.e. in Pipeline Steps) is pretty cumbersome even for a Jenkins pro.  Pretty much unusable for casual users with it's lack of collapsibility, etc.

            Show
            brianjmurrell Brian J Murrell added a comment - Can we please have this re-opened.  I can confirm it's still happening here on 1.19.0 also. This together with stage-view being pretty crippled means finding logs of currently-running pipelines (i.e. in Pipeline Steps) is pretty cumbersome even for a Jenkins pro.  Pretty much unusable for casual users with it's lack of collapsibility, etc.

              People

              • Assignee:
                dnusbaum Devin Nusbaum
                Reporter:
                pracucci Marco Pracucci
              • Votes:
                22 Vote for this issue
                Watchers:
                30 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: