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

Pipeline fails with NPE due to Blue Ocean favorites

      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
      

          [JENKINS-50715] Pipeline fails with NPE due to Blue Ocean favorites

          Guy Arad added a comment -

          markewaite it didn't resolved the issue for me. 

          Blue Ocean 1.13.2

          Autofavorite 1.2.3

          Jenkins 2.150.3

          Guy Arad added a comment - markewaite it didn't resolved the issue for me.  Blue Ocean 1.13.2 Autofavorite 1.2.3 Jenkins 2.150.3

          Nick Jones added a comment - - edited

          We installed Blue Ocean this morning (latest released versions of all plugins) and immediately started having the first build of every new branch/PR fail due to this bug. I'm going to uninstall.

          In our case, it was Blue Ocean 1.14.0, Autofavorite 1.2.3, and Jenkins 2.164.1 LTS.

          Nick Jones added a comment - - edited We installed Blue Ocean this morning (latest released versions of all plugins) and immediately started having the first build of every new branch/PR fail due to this bug. I'm going to uninstall. In our case, it was Blue Ocean 1.14.0, Autofavorite 1.2.3, and Jenkins 2.164.1 LTS.

          J P added a comment -

          Any plans to fix? Same issue today. Blue Ocean 1.14.0, Autofavorite 1.2.3. 

          This got a lot of people really upset when we found out about it. Not a nice time. 

          J P added a comment - Any plans to fix? Same issue today. Blue Ocean 1.14.0, Autofavorite 1.2.3.  This got a lot of people really upset when we found out about it. Not a nice time. 

          We have the same issue with: Blue Ocean 1.9.1, Autofavorite 1.2.2 and Jenkins 2.138.41.0.1-fixed

          java.lang.NullPointerException
          at io.jenkins.blueocean.autofavorite.FavoritingScmListener.onCheckout(FavoritingScmListener.java:70)

          Christian Häussler added a comment - We have the same issue with: Blue Ocean 1.9.1, Autofavorite 1.2.2 and Jenkins 2.138.41.0.1-fixed java.lang.NullPointerException at io.jenkins.blueocean.autofavorite.FavoritingScmListener.onCheckout(FavoritingScmListener.java:70)

          Could that help as a Workaround?

          -DBLUEOCEAN_FEATURE_AUTOFAVORITE_ENABLED=false

          Christian Häussler added a comment - Could that help as a Workaround? -DBLUEOCEAN_FEATURE_AUTOFAVORITE_ENABLED=false

          Mark Waite added a comment -

          Thanks for that pointer it12lsp!

          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

          Mark Waite added a comment - Thanks for that pointer it12lsp ! 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

          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 it12lsp's suggestions of -DBLUEOCEAN_FEATURE_AUTOFAVORITE_ENABLED=false because I don't have admin access to my team's Jenkins instance).

          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 it12lsp 's suggestions of -DBLUEOCEAN_FEATURE_AUTOFAVORITE_ENABLED=false because I don't have admin access to my team's Jenkins instance).

          Mark Waite added a comment -

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

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

          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.

          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.

          Kamil Mackow added a comment -

          medianick that solved my issue as well, thank you!

          Kamil Mackow added a comment - medianick that solved my issue as well, thank you!

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

              Created:
              Updated: