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

run job button for parametrised job error -- createRunStartedToast: TypeError: Cannot read property 'self' of undefined

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • blueocean-plugin
    • BlueOcean 1.0.0-b25
      Jenkins 2.47

      Google Chrome 56.0.2924.87
      MacOS 10.12.1

      about.md is the about.md from the support bundle plugin.
    • 1.0

      Original request
      When clicking the "play/run" button on a job in the blueocean to build a particular branch, i get the following Javascript error in my developer console, and server logs don't have anything at all related to this job:
       

      blueocean.js:306 Uncaught (in promise) TypeError: Cannot read property 'self' of undefined
       at Object.createRunStartedToast (blueocean.js:306)
       at blueocean.js:3734
      createRunStartedToast @ blueocean.js:306
      (anonymous) @ blueocean.js:3734

       
      Notes

      • HAR file has been generated by reporter and is available from UX-619 on the CloudBees JIRA.

       

      The only reference to "self" in ToasUtils is: https://github.com/jenkinsci/blueocean-plugin/blob/master/blueocean-core-js/src/js/ToastUtils.js#L28 - not sure why runInfo would have no _links... 

          [JENKINS-42559] run job button for parametrised job error -- createRunStartedToast: TypeError: Cannot read property 'self' of undefined

          jamesdumay sure, I just got one, but its 12Mb, so I can't upload it to Jira. What can I do?

          Chance Zibolski added a comment - jamesdumay sure, I just got one, but its 12Mb, so I can't upload it to Jira. What can I do?

          James Dumay added a comment -

          chancez you can email it to me at jdumay@cloudbees.com - thanks!

          James Dumay added a comment - chancez you can email it to me at jdumay@cloudbees.com - thanks!

          Emailed & also added a screenshot of the console to this ticket.

          Chance Zibolski added a comment - Emailed & also added a screenshot of the console to this ticket.

          James Dumay added a comment -

          michaelneale I have a HAR file for this attached to another ticket (thanks chancez!!). See notes in the description.

          James Dumay added a comment - michaelneale I have a HAR file for this attached to another ticket (thanks chancez !!). See notes in the description.

          Michael Neale added a comment -

          chancez you say PR but the screenshot has branches on it - did you mean a different screenshot? 

          Michael Neale added a comment - chancez you say PR but the screenshot has branches on it - did you mean a different screenshot? 

          Sorry, this happens on anything with "Play Button". So any thing which offers a "Build with parameters" at the least. I may have mistyped when I wrote PR, but branches are definitely effected.

          I thought PRs also offered a "Play" button (build with parameters), but I don't see that button, and clicking into the PR's job only offers a "re-run" option, surprisingly. Either thats it's own bug, or they never had the option. Below I included a screenshot of my PR view. It looks like maybe the same buttons should be there on the right side, but perhaps I'm just imaging things.

          What I do mean is this button doesn't work (the blue icon on the right):

          Chance Zibolski added a comment - Sorry, this happens on anything with "Play Button". So any thing which offers a "Build with parameters" at the least. I may have mistyped when I wrote PR, but branches are definitely effected. I thought PRs also offered a "Play" button (build with parameters), but I don't see that button, and clicking into the PR's job only offers a "re-run" option, surprisingly. Either thats it's own bug, or they never had the option. Below I included a screenshot of my PR view. It looks like maybe the same buttons should be there on the right side, but perhaps I'm just imaging things. What I  do mean is this button doesn't work (the blue icon on the right):

          Michael Neale added a comment - - edited

          chancez can you: 

           

          * run non parametrised jobs

          * share a Jenkinsfile for the type of parameters you are expecting?

           

          This would help narrow down how to reproduce this. Otherwise, would you be open to a google hangout or something next week or later this week? Sometimes it can be hard to diagnose from snippets of info.

           

          BTW do you work for coreos? I love that stuff!

           

           

          Michael Neale added a comment - - edited chancez can you:    * run non parametrised jobs * share a Jenkinsfile for the type of parameters you are expecting? Create a very simple parametrised job to see if it works at all? - for example: https://github.com/jenkinsci/blueocean-acceptance-test/blob/master/src/test/resources/parametrised/Jenkinsfile  which is used in the test suite   This would help narrow down how to reproduce this. Otherwise, would you be open to a google hangout or something next week or later this week? Sometimes it can be hard to diagnose from snippets of info.   BTW do you work for coreos? I love that stuff!    

          michaelneale I tested the above Jenkinsfile, and it causes the original issue reported when trying to build via blueocean. I created another Jenkinsfile without any parameters, and it did work. However, I also noticed some issues actually triggering a pipeline with an empty parameters list (might file another bug for that).

          I'd be glad to do a google hangout or something this week or next if that would. Just send me an email if you want and we can find a time. I'm generally free the rest of this week. I tend to be available 9am-5pm PST.

          Glad you like our stuff, we like Jenkins as well!

          Chance Zibolski added a comment - michaelneale  I tested the above Jenkinsfile, and it causes the original issue reported when trying to build via blueocean. I created another Jenkinsfile without any parameters, and it did work. However, I also noticed some issues actually triggering a pipeline with an empty parameters list (might file another bug for that). I'd be glad to do a google hangout or something this week or next if that would. Just send me an email if you want and we can find a time. I'm generally free the rest of this week. I tend to be available 9am-5pm PST. Glad you like our stuff, we like Jenkins as well!

          Michael Neale added a comment -

           

          I think bwalding has seen similar error - slightly different but same cause - bad _links

          Michael Neale added a comment -   I think bwalding has seen similar error - slightly different but same cause - bad _links

          Michael Neale added a comment -

          was resolved in rc1

          Michael Neale added a comment - was resolved in rc1

            Unassigned Unassigned
            chancez Chance Zibolski
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: