Skip to content

async iteration never starts for openReadStream on uncompressed entries #169

Closed

Description

@thejoshwolfe

The below code reproduces the issue, only for read streams created for (small?) entries that are not compressed. (When using a zlib inflate filter in the middle, the behavior is different.)

zipfile.openReadStream(entry, function(err, readStream) {
    for await (let chunk of readStream) {
        console.log("never gets here");
    }
    console.log("never gets here either");
});

Originally suggested in #168. The problem has to do with fd-slicer's destroy() implementation conflicting with assumptions in the most recent version of node 26.1. The solution is to stop doing custom destroy stuff and lean into the builtin destroy functionality introduced in node 8. The only remaining custom destroy stuff is in the vendored fd slicer dependency, which can be cleaned up quite a bit.

Activity

  1. changed the title [-]async iteration never starts for openReadStream on uncompressed entries on certain versions of node[/-] [+]async iteration never starts for openReadStream on uncompressed entries[/+] on May 21, 2026
  2. thejoshwolfe commented on May 21, 2026

    @thejoshwolfe
    OwnerAuthor

    The bug I've reproduced is not specific to node 26.1. It looks like it goes all the way back to node 12. Not sure it's going to fix anyone's real issues, but it's definitely a bug that should be addressed.

  3. DeeDeeG commented on May 21, 2026

    @DeeDeeG

    yauzl 3.3.1 definitely fixed a real issue for us, thank you very much for the fix! ❤️

  4. joshkel commented on May 22, 2026

    @joshkel

    In case it helps anyone else: We started seeing several tests hang when we upgraded from Node.js 24.15.0 to 24.16.0. Upgrading from yauzl 3.3.0 to 3.3.1 fixes these issues.

    Thanks for taking care of this so promptly!

  5. added a commit that references this issue on May 27, 2026
  6. added a commit that references this issue on Jun 17, 2026
    f3c921b
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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions