Title: stream/iter: pull() swallows abort when async transform flush resolves to null · Issue #65345 · nodejs/node · GitHub
Open Graph Title: stream/iter: pull() swallows abort when async transform flush resolves to null · Issue #65345 · nodejs/node
X Title: stream/iter: pull() swallows abort when async transform flush resolves to null · Issue #65345 · nodejs/node
Description: Version main Platform N/A Subsystem stream What steps will reproduce the bug? import { pull, text } from 'node:stream/iter'; const controller = new AbortController(); const reason = new Error('boom'); const transform = async (chunks) => ...
Open Graph Description: Version main Platform N/A Subsystem stream What steps will reproduce the bug? import { pull, text } from 'node:stream/iter'; const controller = new AbortController(); const reason = new Error('boom...
X Description: Version main Platform N/A Subsystem stream What steps will reproduce the bug? import { pull, text } from 'node:stream/iter'; const controller = new AbortController(); const reason = new Err...
Opengraph URL: https://github.com/nodejs/node/issues/65345
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"stream/iter: pull() swallows abort when async transform flush resolves to null","articleBody":"### Version\n\nmain\n\n### Platform\n\n```text\nN/A\n```\n\n### Subsystem\n\nstream\n\n### What steps will reproduce the bug?\n\n```js\nimport { pull, text } from 'node:stream/iter';\n\nconst controller = new AbortController();\nconst reason = new Error('boom');\n\nconst transform = async (chunks) => {\n if (chunks !== null) return chunks;\n\n controller.abort(reason);\n return null;\n};\n\ntext(pull('x', transform, { signal: controller.signal })).then(\n (value) => console.log('fulfilled:', JSON.stringify(value)),\n (error) => console.log('rejected:', error === reason, error),\n);\n```\n\n### How often does it reproduce? Is there a required condition?\n\nAlways\n\n### What is the expected behavior? Why is that the expected behavior?\n\n```console\nrejected: true Error: boom\n```\n\nThe pipeline should reject with `reason`, making `error === reason` true. An abort during transform flushing should not be converted into normal iterator completion.\n\nFrom [§9.1, `Stream.pull()`, steps 5–7](https://iter-streams.proposal.wintertc.org/#pull-method):\n> If signal is not undefined, set pipelineController’s signal to follow signal.\n\n### What do you see instead?\n\n```console\nfulfilled: \"x\"\n```\n\nThe pipeline fulfills successfully with `\"x\"`, even though its signal was aborted while the asynchronous flush was completing. The abort reason is never delivered to the consumer.\n\n### Additional information\n\n_No response_","author":{"url":"https://github.com/trivikr","@type":"Person","name":"trivikr"},"datePublished":"2026-08-17T05:20:59Z","url":"https://github.com/nodejs/node/issues/65345"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:ca83413e-785c-d462-a150-1b39f333d0ad |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E68A:37E706:7AD86C:9FDD1C:6AED3335 |
| html-safe-nonce | 9c9f333053837999de6ebabb46661297af6d20f1b7746895568679ff3bb46f3a |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFNjhBOjM3RTcwNjo3QUQ4NkM6OUZERDFDOjZBRUQzMzM1IiwidmlzaXRvcl9pZCI6Ijg3NDU4OTA2MTE1Njc4NjY2NzciLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | e64a7f6444062f5cb88e7c00495a478307dfe9c204027caeebe8144e46669e06 |
| hovercard-subject-tag | issue:5168582393 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/nodejs/node/65345/issue_layout |
| twitter:image | https://opengraph.githubassets.com/445518aa1ce145791e2a8795361be94ea2b494e0d0e92249d45561ed55a4e005/nodejs/node/issues/65345 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/445518aa1ce145791e2a8795361be94ea2b494e0d0e92249d45561ed55a4e005/nodejs/node/issues/65345 |
| og:image:alt | Version main Platform N/A Subsystem stream What steps will reproduce the bug? import { pull, text } from 'node:stream/iter'; const controller = new AbortController(); const reason = new Error('boom... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | trivikr |
| hostname | github.com |
| expected-hostname | github.com |
| None | e51d0b7b5ab34b1688c05b54c3ed17b8658b2fa9bca973a9c740683ccb12cf4a |
| turbo-cache-control | no-preview |
| go-import | github.com/nodejs/node git https://github.com/nodejs/node.git |
| octolytics-dimension-user_id | 9950313 |
| octolytics-dimension-user_login | nodejs |
| octolytics-dimension-repository_id | 27193779 |
| octolytics-dimension-repository_nwo | nodejs/node |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 27193779 |
| octolytics-dimension-repository_network_root_nwo | nodejs/node |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 59ebb7b901cc154ecc179a44f266fcf69f343b30 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width