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

"Cancel shutdown" queue widget link inserted via AJAX does not work

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • core
    • Jenkins 2.46

      Steps to reproduce:

      1. Select "Jenkins" (drop-down arrow) -> "Manage Jenkins" -> "Prepare for Shutdown" (see https://issues.jenkins-ci.org/browse/JENKINS-38175?focusedCommentId=273918&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-273918)
      2. Click "cancel" link (left pane)

      Result: I get "POST is required for jenkins.model.Jenkins.doCancelQuietDown" (/cancelQuietDown). Clicking "Try POSTing" gives the 403 error:

      Problem accessing /cancelQuietDown. Reason: No valid crumb was included in the request

       

          [JENKINS-44402] "Cancel shutdown" queue widget link inserted via AJAX does not work

          Owen Wood created issue -
          Owen Wood made changes -
          Link New: This issue relates to JENKINS-38175 [ JENKINS-38175 ]

          Oleg Nenashev added a comment -

          Cannot reproduce on 2.61.

          Likely it has been fixed by the security fixes in 2.46.2. CC danielbeck

          owood please try to reproduce the issue on 2.46.2. If the issue still appears, makes sense to investigate

          Oleg Nenashev added a comment - Cannot reproduce on 2.61. Likely it has been fixed by the security fixes in 2.46.2. CC danielbeck owood please try to reproduce the issue on 2.46.2. If the issue still appears, makes sense to investigate

          Daniel Beck added a comment - - edited

          Reproduced on 2.46.2 (ci.jenkins.io). The key thing is to use the "(cancel)" link in the build queue widget that was added in an AJAX page update.

          These work:

          • Reload the page so that the link was already there on page load
          • Use the link in the same dropdown menu or on the /manage page

          Daniel Beck added a comment - - edited Reproduced on 2.46.2 (ci.jenkins.io). The key thing is to use the "(cancel)" link in the build queue widget that was added in an AJAX page update. These work: Reload the page so that the link was already there on page load Use the link in the same dropdown menu or on the /manage page
          Daniel Beck made changes -
          Summary Original: Manage Jenkins - Prepare for Shutdown (via drop-down) gives 405 -> 403 New: "Cancel shutdown" queue widget link inserted via AJAX does not work
          Oleg Nenashev made changes -
          Status Original: Open [ 1 ] New: In Progress [ 3 ]
          Oleg Nenashev made changes -
          Assignee New: Oleg Nenashev [ oleg_nenashev ]

          Oleg Nenashev added a comment -

          Another lazy hack: Just navigate http://localhost:8080/jenkins/ajaxBuildQueue and run from there

          Oleg Nenashev added a comment - Another lazy hack: Just navigate http://localhost:8080/jenkins/ajaxBuildQueue  and run from there

          Oleg Nenashev added a comment -

          The issue happens because link.js fails. At least when you access the page directly:

          link.js:1 Uncaught ReferenceError: Behaviour is not defined
          at link.js:1

          Oleg Nenashev added a comment - The issue happens because link.js fails. At least when you access the page directly: link.js:1 Uncaught ReferenceError: Behaviour is not defined at link.js:1
          James Dumay made changes -
          Remote Link New: This issue links to "CloudBees Internal OSS-2269 (Web Link)" [ 18366 ]

            dnusbaum Devin Nusbaum
            owood Owen Wood
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: