Title: Legacy stream throws unhandled stream error when it is handled · Issue #35237 · nodejs/node · GitHub
Open Graph Title: Legacy stream throws unhandled stream error when it is handled · Issue #35237 · nodejs/node
X Title: Legacy stream throws unhandled stream error when it is handled · Issue #35237 · nodejs/node
Description: Version: 14.11.0 Platform: Linux solus 5.6.19-158.current #1 SMP PREEMPT Sun Jul 26 14:17:01 UTC 2020 x86_64 GNU/Linux Subsystem: stream What steps will reproduce the bug? const {Stream: LegacyStream, PassThrough} = require('stream'); co...
Open Graph Description: Version: 14.11.0 Platform: Linux solus 5.6.19-158.current #1 SMP PREEMPT Sun Jul 26 14:17:01 UTC 2020 x86_64 GNU/Linux Subsystem: stream What steps will reproduce the bug? const {Stream: LegacyStre...
X Description: Version: 14.11.0 Platform: Linux solus 5.6.19-158.current #1 SMP PREEMPT Sun Jul 26 14:17:01 UTC 2020 x86_64 GNU/Linux Subsystem: stream What steps will reproduce the bug? const {Stream: LegacyStre...
Opengraph URL: https://github.com/nodejs/node/issues/35237
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Legacy stream throws unhandled stream error when it is handled","articleBody":"* **Version**: `14.11.0`\r\n* **Platform**: `Linux solus 5.6.19-158.current #1 SMP PREEMPT Sun Jul 26 14:17:01 UTC 2020 x86_64 GNU/Linux`\r\n* **Subsystem**: `stream`\r\n\r\n### What steps will reproduce the bug?\r\n\r\n```js\r\nconst {Stream: LegacyStream, PassThrough} = require('stream');\r\n\r\nconst destination = new PassThrough();\r\ndestination.once('error', () => {});\r\n\r\nconst stream = new LegacyStream();\r\nstream.pipe(destination);\r\n\r\ndestination.destroy(new Error('this should be handled'));\r\n```\r\n\r\n### How often does it reproduce? Is there a required condition?\r\n\r\nAlways.\r\n\r\n### What is the expected behavior?\r\n\r\nNo error.\r\n\r\n### What do you see instead?\r\n\r\n```\r\ninternal/streams/legacy.js:61\r\n throw er; // Unhandled stream error in pipe.\r\n ^\r\n\r\nError: this should be handled\r\n at Object.\u003canonymous> (/home/szm/Desktop/got/demo.js:9:21)\r\n at Module._compile (internal/modules/cjs/loader.js:1076:30)\r\n at Object.Module._extensions..js (internal/modules/cjs/loader.js:1097:10)\r\n at Module.load (internal/modules/cjs/loader.js:941:32)\r\n at Function.Module._load (internal/modules/cjs/loader.js:782:14)\r\n at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)\r\n at internal/main/run_main_module.js:17:47\r\n```\r\n\r\n### Additional information\r\n\r\nhttps://github.com/sindresorhus/got/issues/887\r\n","author":{"url":"https://github.com/szmarczak","@type":"Person","name":"szmarczak"},"datePublished":"2020-09-17T01:11:09Z","url":"https://github.com/nodejs/node/issues/35237"}
| 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:2022826b-c9b2-eccc-594f-7dc39bda9023 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | AB5C:39A2F9:1AA1F98:23B70CB:6AED899A |
| html-safe-nonce | 7d73a2662e64dae4455bc5613c9179133c52248af816bf686f3bcb0311dbfedc |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBQjVDOjM5QTJGOToxQUExRjk4OjIzQjcwQ0I6NkFFRDg5OUEiLCJ2aXNpdG9yX2lkIjoiMjM1MDM3NjYyOTI1MTcwNTI0MiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 6ed3920348a2f346e4239df4a54b8eef11ba7aa029973aba2e183ee53e1b11a0 |
| hovercard-subject-tag | issue:703190024 |
| 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/35237/issue_layout |
| twitter:image | https://opengraph.githubassets.com/1b02d40990c96f7e32990a6f78decf130699e8f630a9596aa0436db8b23037eb/nodejs/node/issues/35237 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/1b02d40990c96f7e32990a6f78decf130699e8f630a9596aa0436db8b23037eb/nodejs/node/issues/35237 |
| og:image:alt | Version: 14.11.0 Platform: Linux solus 5.6.19-158.current #1 SMP PREEMPT Sun Jul 26 14:17:01 UTC 2020 x86_64 GNU/Linux Subsystem: stream What steps will reproduce the bug? const {Stream: LegacyStre... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | szmarczak |
| hostname | github.com |
| expected-hostname | github.com |
| None | 56fb42677ae87ed3e64410323d67980aa65d0485568a7858f874e7edfc6d1c11 |
| 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 | 9c9a37e2423ed382cf39f70b5aa4b4858b40a3b0 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width