Jenkins Blue Ocean not loading after initial install on existing Jenkins instance
Asked Answered
B

2

9

I just installed Blue Ocean on an existing Jenkins instance that I have been using for years. The landing page is not loading, and I'm getting the following error, which I have been unsuccessful in finding an answer to on SO or otherwise googling. I'm on Jenkins build 2.107.3, Blue Ocean 1.6.1.

I was able to create a new pipeline successfully, but when I go back to this page, it never finishes loading.

Has anyone encountered this error, or has advice on how to go about debugging it?

Screenshot of Jenkins error

blueocean-core-js.js:57883 Error fetching page TypeError: Cannot read property 'self' of undefined at ActivityService.bunkerKey (blueocean-core-js.js:57207) at ActivityService.setItem (blueocean-core-js.js:57250) at executeAction (blueocean-core-js.js:40729) at ActivityService.res (blueocean-core-js.js:40701) at PipelineService._this.bunkerMapper (blueocean-core-js.js:58214) at PipelineService.setItem (blueocean-core-js.js:57249) at executeAction (blueocean-core-js.js:40729) at PipelineService.res (blueocean-core-js.js:40701) at blueocean-core-js.js:57268 at Array.map (<anonymous>) at PipelineService.setItems (blueocean-core-js.js:57267) at blueocean-core-js.js:57867 at executeAction (blueocean-core-js.js:40729) at res (blueocean-core-js.js:40701)

Baun answered 26/6, 2018 at 12:42 Comment(0)
S
5

Yes - this is a bug with Jenkins (we need a null-check in that bunkerkey function for sure).

I was able to resolve this by removing a legacy job that used a folder shortcut to 'LastSuccessFullBuild' that didn't exist. (I actually deleted the entire legacy/disabled job).

You can determine which job is causing the js error by placing a breakpoint on at ActivityService.bunkerKey (blueocean-core-js.js:57207) in your browser tools and inspecting the 'data' object before it throws. Once you know the offending job, if you can delete it, you're done. Otherwise, you will likely have to run it/alter it to get it to generate the proper links.

Enjoy!

Schoolteacher answered 15/3, 2019 at 15:56 Comment(1)
Thanks! Using your suggestion I found two jobs that didn't have the _links object. I tried running them again to see if that would generate the proper links, and it didn't work. So I used the "Shelve Project" plugin to remove them temporarily. That seemed to fix the issue! Feels like there's still a bug there, but this was a great workaround for me!Baun
H
2

Looks like a straight up bug.

Usual practice when this kind of thing happens is to:

  1. Navigate to the Installed Plugins page. (Manage Jenkins > Manage Plugins > Installed tab).
  2. Enter "Blue Ocean" (without the quotes) into the Filter text box in the top corner.
  3. Click the "Downgrade to x.y" button in the "Previously installed version" column of the "Blue Ocean" row.

Note: the Blue Ocean plugin is the parent plugin for all the Blue Ocean dependencies. It is this parent plugin that will be only one that has the Enabled checkbox enabled. Unchecking this box disables the plugin but doesn't uninstall it.

Hungry answered 29/6, 2018 at 3:4 Comment(2)
Unfortunately this was my first install of Blue Ocean, so there's no version to downgrade to. =(Baun
So your only remaining options are to uninstall it or wait for the next version to come out.Hungry

© 2022 - 2024 — McMap. All rights reserved.