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

DownloadService as of 1.344 does not work with existing tool and update center JSON files

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Blocker
    • Resolution: Fixed
    • Component/s: core
    • Labels:
      None
    • Similar Issues:

      Description

      The change for JENKINS-5210 breaks all use of the existing downloadService.post instances for all the tools and the update center itself. See http://hudson.pastebin.com/m22c14ec. I'm not sure what to do to fix it.

        Attachments

          Issue Links

            Activity

            Hide
            abayer Andrew Bayer added a comment -

            FYI - as a workaround, redownload the JSON files (http://jenkins-ci.org/updates/hudson.tasks.Maven.MavenInstaller.json and the other tools, or http://jenkins-ci.org/update-center.json), and remove everything but the actual {} JSON object. Save the file(s) (removing the .json file extension for the tools, though not for update-center.json) and you should be able to function.

            Show
            abayer Andrew Bayer added a comment - FYI - as a workaround, redownload the JSON files ( http://jenkins-ci.org/updates/hudson.tasks.Maven.MavenInstaller.json and the other tools, or http://jenkins-ci.org/update-center.json ), and remove everything but the actual {} JSON object. Save the file(s) (removing the .json file extension for the tools, though not for update-center.json) and you should be able to function.
            Hide
            mindless Alan Harder added a comment -

            I added an onException handler in downloadService.post and found it was getting an exception in nslXMLHttpRequest.setRequestHeader (with mac firefox 3.5).. seems the requestHeaders parameter to Ajax.Request is required.. adding requestHeaders:[] seems to resolve the problem.

            Show
            mindless Alan Harder added a comment - I added an onException handler in downloadService.post and found it was getting an exception in nslXMLHttpRequest.setRequestHeader (with mac firefox 3.5).. seems the requestHeaders parameter to Ajax.Request is required.. adding requestHeaders:[] seems to resolve the problem.
            Hide
            mindless Alan Harder added a comment -

            I'll commit a little fix to avoid js error in firefox after successful update.. kohsuke will commit main fix for the issue (crumb object adds bad header with empty value). This will resolve both update of update center data, and refresh of plugin/hudson upgrade status on the /updateCenter/ page.

            Show
            mindless Alan Harder added a comment - I'll commit a little fix to avoid js error in firefox after successful update.. kohsuke will commit main fix for the issue (crumb object adds bad header with empty value). This will resolve both update of update center data, and refresh of plugin/hudson upgrade status on the /updateCenter/ page.
            Hide
            mindless Alan Harder added a comment -

            (the requestHeaders:[] workaround above was just a bandaid for that particular case to overwrite the bad/empty header added elsewhere)

            Show
            mindless Alan Harder added a comment - (the requestHeaders:[] workaround above was just a bandaid for that particular case to overwrite the bad/empty header added elsewhere)
            Hide
            kohsuke Kohsuke Kawaguchi added a comment -

            The root cause was in our modification to Ajax.Request, so this pretty much affects all AJAX activities in Hudson.

            Show
            kohsuke Kohsuke Kawaguchi added a comment - The root cause was in our modification to Ajax.Request, so this pretty much affects all AJAX activities in Hudson.
            Hide
            aheritier Arnaud Héritier added a comment -

            ok, I downgrade because I fixed files this morning and probably the update center automatically updated them and broke them again

            Show
            aheritier Arnaud Héritier added a comment - ok, I downgrade because I fixed files this morning and probably the update center automatically updated them and broke them again
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in hudson
            User: : kohsuke
            Path:
            branches/rc/test/src/main/java/org/jvnet/hudson/test/HudsonTestCase.java
            branches/rc/test/src/test/java/hudson/model/DownloadServiceTest.java
            branches/rc/test/src/test/resources/hudson/model/DownloadServiceTest/testPost.jelly
            branches/rc/war/resources/scripts/hudson-behavior.js
            trunk/www/changelog.html
            http://jenkins-ci.org/commit/27147
            Log:
            [FIXED JENKINS-5536] in 1.345 and added a test case.

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in hudson User: : kohsuke Path: branches/rc/test/src/main/java/org/jvnet/hudson/test/HudsonTestCase.java branches/rc/test/src/test/java/hudson/model/DownloadServiceTest.java branches/rc/test/src/test/resources/hudson/model/DownloadServiceTest/testPost.jelly branches/rc/war/resources/scripts/hudson-behavior.js trunk/www/changelog.html http://jenkins-ci.org/commit/27147 Log: [FIXED JENKINS-5536] in 1.345 and added a test case.
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in hudson
            User: : mindless
            Path:
            trunk/hudson/main/core/src/main/java/hudson/model/DownloadService.java
            trunk/hudson/main/core/src/main/java/hudson/model/UpdateSite.java
            http://jenkins-ci.org/commit/27145
            Log:
            JENKINS-5536 set text/plain content type in doPostBack response so browser won't
            try to parse response (resulting in "no element found" in firefox error console).
            Not the fix for 5536 itself, but nice to avoid js error after successful update.

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in hudson User: : mindless Path: trunk/hudson/main/core/src/main/java/hudson/model/DownloadService.java trunk/hudson/main/core/src/main/java/hudson/model/UpdateSite.java http://jenkins-ci.org/commit/27145 Log: JENKINS-5536 set text/plain content type in doPostBack response so browser won't try to parse response (resulting in "no element found" in firefox error console). Not the fix for 5536 itself, but nice to avoid js error after successful update.

              People

              Assignee:
              kohsuke Kohsuke Kawaguchi
              Reporter:
              abayer Andrew Bayer
              Votes:
              1 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: