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

Download build artifacts as zip generates a corrupted file

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Blocker Blocker
    • core
    • Windows XP 32
      java version "1.7.0"
      Java(TM) SE Runtime Environment (build 1.7.0-b147)
      Java HotSpot(TM) Client VM (build 21.0-b17, mixed mode)

      The zip generated by the link http://server/job/myJob/lastSuccessfulBuild/artifact/*zip*/archive.zip generates a zip file in which everything seems ok, but when you try to unzip the content with 7z for instance, it fails (compression method not supported).

      I can't see anything in the logs.
      BTW, the size of the file in the archive are set to 0. Could be a side effect in 7z.

      It works fine with 1.531.

      And finally, there was a modification of something about the compression in 1.532 related to issue JENKINS-19473.

          [JENKINS-19752] Download build artifacts as zip generates a corrupted file

          Yoram Michaeli added a comment - - edited

          Happens to me in 1.535, 1.536, 1.539

          yorammi-macbook:temp Yoram$ unzip ../archive\ (3).zip
          Archive: ../archive (3).zip
          End-of-central-directory signature not found. Either this file is not
          a zipfile, or it constitutes one disk of a multi-part archive. In the
          latter case the central directory and zipfile comment will be found on
          the last disk(s) of this archive.
          unzip: cannot find zipfile directory in one of ../archive (3).zip or
          ../archive (3).zip.zip, and cannot find ../archive (3).zip.ZIP, period.

          Yoram Michaeli added a comment - - edited Happens to me in 1.535, 1.536, 1.539 yorammi-macbook:temp Yoram$ unzip ../archive\ (3).zip Archive: ../archive (3).zip End-of-central-directory signature not found. Either this file is not a zipfile, or it constitutes one disk of a multi-part archive. In the latter case the central directory and zipfile comment will be found on the last disk(s) of this archive. unzip: cannot find zipfile directory in one of ../archive (3).zip or ../archive (3).zip.zip, and cannot find ../archive (3).zip.ZIP, period.

          Jesse Glick added a comment -

          @yorammi I already verified the fix in 1.536 so if you are seeing corrupt ZIP files it is probably some other bug, that may happen only under certain circumstances, etc. Please file a separate report with steps to reproduce from scratch.

          Jesse Glick added a comment - @yorammi I already verified the fix in 1.536 so if you are seeing corrupt ZIP files it is probably some other bug, that may happen only under certain circumstances, etc. Please file a separate report with steps to reproduce from scratch.

          Mishael Kim added a comment -

          Does anyone know if this corrupt zip issue would apply to general zip files that are archived and then downloaded without using the "download build artifacts as zip" built into Jenkins?

          Mishael Kim added a comment - Does anyone know if this corrupt zip issue would apply to general zip files that are archived and then downloaded without using the "download build artifacts as zip" built into Jenkins?

          Jesse Glick added a comment -

          @mishael no, that situation would not trigger this problem.

          Jesse Glick added a comment - @mishael no, that situation would not trigger this problem.

          @tszadel: Why this is labeled lts-candidate? All associated commit was backported to 1.532.1.

          Oliver Gondža added a comment - @tszadel: Why this is labeled lts-candidate ? All associated commit was backported to 1.532.1.

          Code changed in jenkins
          User: ninian
          Path:
          pom.xml
          http://jenkins-ci.org/commit/compress-artifacts-plugin/04211d3c97832bb22ebc31958f360a107519d103
          Log:
          Updated parent to v1.536 to get fix for download of zipped artifacts,
          JENKINS-19752

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: ninian Path: pom.xml http://jenkins-ci.org/commit/compress-artifacts-plugin/04211d3c97832bb22ebc31958f360a107519d103 Log: Updated parent to v1.536 to get fix for download of zipped artifacts, JENKINS-19752

          Andreas Kotes added a comment - - edited

          btw: I also noticed that extended attributes (like an executable bit) are not preserved in those archives (created JENKINS-27937)

          Andreas Kotes added a comment - - edited btw: I also noticed that extended attributes (like an executable bit) are not preserved in those archives (created JENKINS-27937 )

          Hi, we've noticed the same problem in Jenkins ver. 1.651.1

          Radka Nepejchalova added a comment - Hi, we've noticed the same problem in Jenkins ver. 1.651.1

          Luca Moscato added a comment -

          Hi all, sadly I'm facing the same issue, here is my environment
          jenkins 2.7.4
          jdk 1.8.40 (too old?)
          centos 6.8 (package updated every night).
          It happens that artifacts download (both .zip and other formats) fails often when, in office, the network appears slow. For fail I intend that from browser the download process seems ends correctly ok, but the file downloaded has smaller size and, in case of .zip, can't be opened.

          Luca Moscato added a comment - Hi all, sadly I'm facing the same issue, here is my environment jenkins 2.7.4 jdk 1.8.40 (too old?) centos 6.8 (package updated every night). It happens that artifacts download (both .zip and other formats) fails often when, in office, the network appears slow. For fail I intend that from browser the download process seems ends correctly ok, but the file downloaded has smaller size and, in case of .zip, can't be opened.

          Paula Paez added a comment - - edited

          lucamoscato I think I have a similar problem. My environment is a jenkins 1.651.3 in a centos 7.2.

          When I connect with a slow connection (for example, from the office, or outside with NSA VPN), and download an artifact for example file.exe is never completed correctly.
          note: Usually speed goes from 20 to 200kb.
          To complicate the issue - the downloader (browser, download manager) checks the full size at the beginning (~200MB) but when download is cut at the middle, the downloader thinks it's actually completed successfully (hence no possibility to retry with resume)

          Could you finally solve your issue?? Please, I would really appreciate your comments.

          Paula Paez added a comment - - edited lucamoscato I think I have a similar problem. My environment is a jenkins 1.651.3 in a centos 7.2. When I connect with a slow connection (for example, from the office, or outside with NSA VPN), and download an artifact for example file.exe is never completed correctly. note: Usually speed goes from 20 to 200kb. To complicate the issue - the downloader (browser, download manager) checks the full size at the beginning (~200MB) but when download is cut at the middle, the downloader thinks it's actually completed successfully (hence no possibility to retry with resume) Could you finally solve your issue?? Please, I would really appreciate your comments.

            poussma Mathieu POUSSE
            poussma Mathieu POUSSE
            Votes:
            9 Vote for this issue
            Watchers:
            24 Start watching this issue

              Created:
              Updated:
              Resolved: