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

"You must use POST method to trigger builds" from Context Menu

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Major Major
    • core
    • None
    • Linux 64-bit
      Start jenkins via java -jar jankins.war

      Just upgraded from 1.517 to 1.528 and when clicking 'Build Now' on the context menu for ALL jobs, I get the following:

      "You must use POST method to trigger builds. (From scripts you may instead pass a per-project authentication token, or authenticate with your API token.) If you see this page, it may be because a plugin offered a GET link; file a bug report for that plugin."

      I can understand that when you want to trigger a build remotely you can set the authorization tokens, but from the context menu it should 'Just Do It'.

      I can see that this is a duplicate of https://issues.jenkins-ci.org/browse/JENKINS-16844, but this was apparently fixed in 1.509

          [JENKINS-19368] "You must use POST method to trigger builds" from Context Menu

          Steve Eckerlein added a comment - - edited

          I have the same issue with 1.523

          Error come after several days of running service. My service is up since 2 weeks, and suddently the error come...

          It disappear after service restart (running Jenkins with Tomcat 7). Come agin after severals days...

          My previous version (1.467) was fine.

          Steve Eckerlein added a comment - - edited I have the same issue with 1.523 Error come after several days of running service. My service is up since 2 weeks, and suddently the error come... It disappear after service restart (running Jenkins with Tomcat 7). Come agin after severals days... My previous version (1.467) was fine.

          We are seeing the same issue with version 1.520 of Jenkins. Restarting tomcat (6.0.29) is our current workaround.

          Barbara Newman added a comment - We are seeing the same issue with version 1.520 of Jenkins. Restarting tomcat (6.0.29) is our current workaround.

          Same here at 1.526 with AD authentication.

          Victor Dulepov added a comment - Same here at 1.526 with AD authentication.

          Marc Reder added a comment -

          We just got the Messages with Jenkins 1.531 running in Tomcat.

          Marc Reder added a comment - We just got the Messages with Jenkins 1.531 running in Tomcat.

          Jesse Glick added a comment -

          Cannot reproduce in 1.528 with a regular or parameterized job (these are implemented differently, so please specify!) with security enabled.

          Diagnosis would require checking the browser console for JavaScript errors, obtaining the result of the POST request producing the context menu, and inspecting the HTML of the page.

          Jesse Glick added a comment - Cannot reproduce in 1.528 with a regular or parameterized job (these are implemented differently, so please specify!) with security enabled. Diagnosis would require checking the browser console for JavaScript errors, obtaining the result of the POST request producing the context menu, and inspecting the HTML of the page.

          i made severals tests with my two platform. One freshly restarted, so working, and the other with the issue.

          the link generated on my non-working platform is
          <a href="/jenkins/job/ade_test/build?delay=0sec" onclick="return build_id-2017269884(this)">Build Now</a>

          on my working platform :
          <a href="/jenkins/job/test2/build?delay=0sec" onclick="return build_id456004(this)">Build Now</a>

          on javascript console the - (minus) sign seems to cause the issue. The onclick method is breaking due to an error, and the href is used (in standart GET HTML method)

          here is the error :
          SyntaxError: missing ( before formal parameters
          function build_id-2017269884(a) {
          -----------------|

          My first idea is, the id generated after build_id is looping through a signed long, and number come inferior to zero....

          Steve Eckerlein added a comment - i made severals tests with my two platform. One freshly restarted, so working, and the other with the issue. the link generated on my non-working platform is <a href="/jenkins/job/ade_test/build?delay=0sec" onclick="return build_id-2017269884(this)">Build Now</a> on my working platform : <a href="/jenkins/job/test2/build?delay=0sec" onclick="return build_id456004(this)">Build Now</a> on javascript console the - (minus) sign seems to cause the issue. The onclick method is breaking due to an error, and the href is used (in standart GET HTML method) here is the error : SyntaxError: missing ( before formal parameters function build_id-2017269884(a) { -----------------| My first idea is, the id generated after build_id is looping through a signed long, and number come inferior to zero....

          We are experiencing this problem in Jenkins 1.509.4 our master has been running for about 10 days.

          Walter Kacynski added a comment - We are experiencing this problem in Jenkins 1.509.4 our master has been running for about 10 days.

          Sorry, I just saw JENKINS-20085. Using the script console fixed our problem without a restart.

          Walter Kacynski added a comment - Sorry, I just saw JENKINS-20085 . Using the script console fixed our problem without a restart.

            Unassigned Unassigned
            ksefat Kayhan Sefat
            Votes:
            5 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved: