Skip to content

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

Closed

Description

@jenkins-infra-bot

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.


Originally reported by abayer, imported from: DownloadService as of 1.344 does not work with existing tool and update center JSON files
  • assignee: kohsuke
  • status: Closed
  • priority: Blocker
  • component(s): core
  • resolution: Fixed
  • resolved: 2010-02-08T11:30:07+00:00
  • votes: 1
  • watchers: 1
  • imported: 2025-11-24
Raw content of original issue

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.

Activity

  1. jenkins-infra-bot commented on Feb 7, 2010

    @jenkins-infra-bot
    Author
    abayer:

    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.

  2. jenkins-infra-bot commented on Feb 8, 2010

    @jenkins-infra-bot
    Author
    mindless:
    • Original comment link
    • Raw content of original 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.

    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.

  3. jenkins-infra-bot commented on Feb 8, 2010

    @jenkins-infra-bot
    Author
    mindless:
    • Original comment link
    • Raw content of original 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.

    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.

  4. jenkins-infra-bot commented on Feb 8, 2010

    @jenkins-infra-bot
    Author
    mindless:
    • Original comment link
    • Raw content of original comment:

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

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

  5. jenkins-infra-bot commented on Feb 8, 2010

    @jenkins-infra-bot
    Author
    kohsuke:
    • Original comment link
    • Raw content of original comment:

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

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

  6. jenkins-infra-bot commented on Feb 8, 2010

    @jenkins-infra-bot
    Author
    aheritier:
    • Original comment link
    • Raw content of original comment:

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

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

  7. jenkins-infra-bot commented on Feb 8, 2010

    @jenkins-infra-bot
    Author
    scm_issue_link:
    • Original comment link
    • Raw content of original 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.

    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.

  8. jenkins-infra-bot commented on Feb 8, 2010

    @jenkins-infra-bot
    Author
    scm_issue_link:
    • Original comment link
    • Raw content of original 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.

    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.

  9. jenkins-infra-bot commented on Nov 24, 2025

    @jenkins-infra-bot
    Author

    [Original is_duplicated_by from Jira: JENKINS-5537]

  10. jenkins-infra-bot commented on Nov 24, 2025

    @jenkins-infra-bot
    Author

    [Original is_duplicated_by from Jira: JENKINS-5540]

  11. jenkins-infra-bot commented on Nov 24, 2025

    @jenkins-infra-bot
    Author

    [Original is_duplicated_by from Jira: JENKINS-5546]

  12. removed
    bugFor changelog: Minor bug. Will be listed after features
    on Nov 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions