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

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Blocker Blocker
    • core
    • None

      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.

          [JENKINS-5536] DownloadService as of 1.344 does not work with existing tool and update center JSON files

          Andrew Bayer created issue -

          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.

          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.
          Andrew Bayer made changes -
          Description Original: The change for JENKINS-5120 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. New: 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.

          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.

          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.
          Alan Harder made changes -
          Assignee New: Alan Harder [ mindless ]
          Alan Harder made changes -
          Status Original: Open [ 1 ] New: In Progress [ 3 ]

          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.

          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.
          Alan Harder made changes -
          Assignee Original: Alan Harder [ mindless ] New: Kohsuke Kawaguchi [ kohsuke ]

          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)

          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)

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

          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.

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

              Created:
              Updated:
              Resolved: