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

Pipeline fails with NPE due to Blue Ocean favorites

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      This was a new branch, and this was the first time it was built in a multi-branch pipeline.

      [Pipeline] End of Pipeline
       java.lang.NullPointerException
       at io.jenkins.blueocean.autofavorite.FavoritingScmListener.onCheckout(FavoritingScmListener.java:109)
       at org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:127)
       at org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:85)
       at org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:75)
       at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1$1.call(AbstractSynchronousNonBlockingStepExecution.java:47)
       at hudson.security.ACL.impersonate(ACL.java:290)
       at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1.run(AbstractSynchronousNonBlockingStepExecution.java:44)
       at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
       at java.util.concurrent.FutureTask.run(FutureTask.java:266)
       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
       at java.lang.Thread.run(Thread.java:748)
       Finished: FAILURE
      

        Attachments

          Issue Links

            Activity

            Hide
            kahmeal Kamil Mackow added a comment -

            Nick Jones that solved my issue as well, thank you!

            Show
            kahmeal Kamil Mackow added a comment - Nick Jones that solved my issue as well, thank you!
            Hide
            medianick Nick Jones added a comment -

            In our case the culprit was not restarting the Jenkins instance after the initial install of all the Blue Ocean plugins (including Autofavorite), which is not normally required when installing a new plugin. Every first build of a new branch/PR failed with this problem after that. Our solution was uninstalling every one of the Blue Ocean plugins (which was painful, given how many there are), restarting Jenkins to complete the uninstall, installing Blue Ocean plugins again, and restarting Jenkins again (the step we'd missed before). After that, it has worked perfectly.

            Show
            medianick Nick Jones added a comment - In our case the culprit was not restarting the Jenkins instance after the initial install of all the Blue Ocean plugins (including Autofavorite), which is not normally required when installing a new plugin. Every first build of a new branch/PR failed with this problem after that. Our solution was uninstalling every one of the Blue Ocean plugins (which was painful, given how many there are), restarting Jenkins to complete the uninstall, installing Blue Ocean plugins again, and restarting Jenkins again (the step we'd missed before). After that, it has worked perfectly.
            Hide
            markewaite Mark Waite added a comment -

            Jay Ache I'm not aware of anyone working on it. If you have a Java development environment, you could propose a pull request.

            Show
            markewaite Mark Waite added a comment - Jay Ache I'm not aware of anyone working on it. If you have a Java development environment, you could propose a pull request.
            Hide
            jayache80 Jay Ache added a comment -

            Still not fixed, Blue Ocean 1.21.0, Autofavorite for Blue Ocean 1.2.4, Jenkins 2.150.3

            Anyone working on this? I probably have to completely remove Blue Ocean from our pipeline because of this little Autofavorite bug (I can't use Christian Häussler's suggestions of -DBLUEOCEAN_FEATURE_AUTOFAVORITE_ENABLED=false because I don't have admin access to my team's Jenkins instance).

            Show
            jayache80 Jay Ache added a comment - Still not fixed, Blue Ocean 1.21.0, Autofavorite for Blue Ocean 1.2.4, Jenkins 2.150.3 Anyone working on this? I probably have to completely remove Blue Ocean from our pipeline because of this little Autofavorite bug (I can't use Christian Häussler 's suggestions of -DBLUEOCEAN_FEATURE_AUTOFAVORITE_ENABLED=false because I don't have admin access to my team's Jenkins instance).
            Hide
            markewaite Mark Waite added a comment -

            Thanks for that pointer Christian Häussler!

            I have enough jobs in my Jenkins server that I find the Blue Ocean autofavorite plugin more of a hindrance than a help. You've now given me a setting that may avoid me getting favorites that aren't actually my favorites. JENKINS-47214 describes that property.

            It is also mentioned in the plugin release notes for release 1.2.1

            Show
            markewaite Mark Waite added a comment - Thanks for that pointer Christian Häussler ! I have enough jobs in my Jenkins server that I find the Blue Ocean autofavorite plugin more of a hindrance than a help. You've now given me a setting that may avoid me getting favorites that aren't actually my favorites. JENKINS-47214 describes that property. It is also mentioned in the plugin release notes for release 1.2.1

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              renatosilvarosa Renato Rosa
              Votes:
              14 Vote for this issue
              Watchers:
              19 Start watching this issue

                Dates

                Created:
                Updated: