Skip to content

Regression: promise based stream.pipeline does not work #63817

@renkei

Description

@renkei

Version

24.16.0

Platform

Microsoft Windows NT 10.0.26200.0 x64

Subsystem

No response

What steps will reproduce the bug?

const { promises: stream } = require('node:stream')
// or
// const stream = require('node:stream/promises')

async function(readStream, writeStream) {
    await stream.pipeline(readStream, writeStream)
    console.log('finished')
}

How often does it reproduce? Is there a required condition?

always when Node.js 24.16 is used

What is the expected behavior? Why is that the expected behavior?

Expect either a thrown error or 'finished' in console

What do you see instead?

No error is thrown, but 'finished' is also not printed to console.

Additional information

Switch to callback version of stream.pipeline fixes the issue.
Switch to Node.js 24.15 or 24.14 also fixes the issue. Problem was seen on installing electron 41. The postinstall script uses the npm package extract-zip to unpack the electron zip file. extract-zip uses the promisified variant of stream.pipeline. Only one file from zip is extracted, other files are not triggered because stream.pipeline neither throws an error nor finishes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions