Skip to content

extractAllTo is broken with 0.5.15 #533

Closed

Description

@chandanjainn

Got the following error with v0.5.15. It was working until 0.5.14

Error: ADM-ZIP: Descriptor data is malformed at Object.DESCRIPTOR_FAULTY (/usr/src/app/node_modules/adm-zip/util/errors.js:56:16) at crc32OK (/usr/src/app/node_modules/adm-zip/zipEntry.js:62:36) at decompress (/usr/src/app/node_modules/adm-zip/zipEntry.js:121:26) at Object.getData (/usr/src/app/node_modules/adm-zip/zipEntry.js:320:24) at /usr/src/app/node_modules/adm-zip/adm-zip.js:762:37 at Array.forEach (<anonymous>) at Object.extractAllTo (/usr/src/app/node_modules/adm-zip/adm-zip.js:756:26) at download_and_unzip (/usr/src/app/processes/utils/batch.utils.js:64:9) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async module.exports.getProcessedFile (/usr/src/app/processes/utils/batch.utils.js:79:37)

The following data integrity check seems to be failing
image

Activity

  1. devland commented on Aug 20, 2024

    @devland

    The weird thing is that this happens only on some systems.
    For me it does not happen but for a colleague of mine it does and we're both running the same amd-zip powered code with the same adm-zip version.
    So there may also be a race condition or some other aspect involved that makes the same zip file fail the check on one system while it always passes on another.

  2. devland commented on Feb 20, 2025

    @devland

    We managed to reproduce this again on v0.5.16 and on master branch as of writing this (1cd32f7).

    To reproduce locally run extractAllTo on the below attached zip file.
    descriptorMalformed.zip

    The error is generated by this line:

    throw Utils.Errors.DESCRIPTOR_FAULTY();

    when descriptor.size does not match _centralHeader.size.
    For our example the values are 0 and 57 respectively.

    As a workaround you can simply comment out the error on line 62 in zipEntry.js.

  3. sdg9670f commented on Jul 3, 2025

    @sdg9670f

    I think validating descriptors should be optional.

  4. cthackers commented on Jul 10, 2026

    @cthackers
    Owner

    Fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions