Title: wasm: streaming APIs accept non-Uint8Array response body chunks · Issue #64669 · nodejs/node · GitHub
Open Graph Title: wasm: streaming APIs accept non-Uint8Array response body chunks · Issue #64669 · nodejs/node
X Title: wasm: streaming APIs accept non-Uint8Array response body chunks · Issue #64669 · nodejs/node
Description: Version latest main branch Platform 7.1.3-arch1-3 Subsystem wasm What steps will reproduce the bug? const bytes = new Uint8Array([ 0x00, 0x61, 0x73, 0x6d, // \0asm 0x01, 0x00, 0x00, 0x00, // version 1 ]); const stream = new ReadableStrea...
Open Graph Description: Version latest main branch Platform 7.1.3-arch1-3 Subsystem wasm What steps will reproduce the bug? const bytes = new Uint8Array([ 0x00, 0x61, 0x73, 0x6d, // \0asm 0x01, 0x00, 0x00, 0x00, // versio...
X Description: Version latest main branch Platform 7.1.3-arch1-3 Subsystem wasm What steps will reproduce the bug? const bytes = new Uint8Array([ 0x00, 0x61, 0x73, 0x6d, // \0asm 0x01, 0x00, 0x00, 0x00, // versio...
Opengraph URL: https://github.com/nodejs/node/issues/64669
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"wasm: streaming APIs accept non-Uint8Array response body chunks","articleBody":"### Version\n\nlatest main branch\n\n### Platform\n\n```text\n7.1.3-arch1-3\n```\n\n### Subsystem\n\nwasm\n\n### What steps will reproduce the bug?\n\n\n ```js\n const bytes = new Uint8Array([\n 0x00, 0x61, 0x73, 0x6d, // \\0asm\n 0x01, 0x00, 0x00, 0x00, // version 1\n ]);\n\n const stream = new ReadableStream({\n start(controller) {\n controller.enqueue(bytes.buffer); // ArrayBuffer, not Uint8Array\n controller.close();\n },\n });\n\n const response = new Response(stream, {\n headers: {\n 'Content-Type': 'application/wasm',\n },\n });\n\n WebAssembly.compileStreaming(response).then(\n () => console.log('unexpectedly compiled'),\n (error) => console.error('rejected:', error),\n );\n```\n### How often does it reproduce? Is there a required condition?\n\nEvery\n\n### What is the expected behavior? Why is that the expected behavior?\n\nFetch body consumption requires every chunk read from the response body to be a `Uint8Array`. Other values, including `ArrayBuffer`, `DataView`, and other typed arrays, should cause the operation to reject with a `TypeError`.\n\n### What do you see instead?\n\n`WebAssembly.compileStreaming()` and `WebAssembly.instantiateStreaming()` accept response bodies whose\n`ReadableStream` produces non-`Uint8Array` chunks.The WebAssembly module is compiled successfully, even though the response body produces an ArrayBuffer chunk. \n\n### Additional information\n\nRefs: https://github.com/web-platform-tests/wpt/blob/master/wasm/webapi/wasm_stream_compile_test.any.js#L80-L93\nRefs: https://github.com/web-platform-tests/wpt/blob/master/wasm/webapi/wasm_stream_instantiate_test.any.js#L79-L92","author":{"url":"https://github.com/Archkon","@type":"Person","name":"Archkon"},"datePublished":"2026-07-22T06:53:48Z","url":"https://github.com/nodejs/node/issues/64669"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| 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:e62c4612-5e29-6e73-1972-2bcf5ec71852 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A0D4:3F8AB1:1AF0AD8:2245892:6B013890 |
| html-safe-nonce | 9c9600ca97eb3620dea3781f212b3dba9c720339ec5dbf18bef7cd2f0c1ee67d |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBMEQ0OjNGOEFCMToxQUYwQUQ4OjIyNDU4OTI6NkIwMTM4OTAiLCJ2aXNpdG9yX2lkIjoiNDk4NjA5MDMwNjY2ODY3MzE2OCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | bf63725261d62c82ddc59d8bc7a63792a3f1c21a992a74e95a41834deb681c96 |
| hovercard-subject-tag | issue:4946318659 |
| 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/64669/issue_layout |
| twitter:image | https://opengraph.githubassets.com/0d7cf0f96c28905a56bd486c8608ed4a5f8bdf629aef59a06fa74d68b65f71f1/nodejs/node/issues/64669 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/0d7cf0f96c28905a56bd486c8608ed4a5f8bdf629aef59a06fa74d68b65f71f1/nodejs/node/issues/64669 |
| og:image:alt | Version latest main branch Platform 7.1.3-arch1-3 Subsystem wasm What steps will reproduce the bug? const bytes = new Uint8Array([ 0x00, 0x61, 0x73, 0x6d, // \0asm 0x01, 0x00, 0x00, 0x00, // versio... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | Archkon |
| hostname | github.com |
| expected-hostname | github.com |
| None | cc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c |
| 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 | 8c77c9e8439031ad54c75a250694842892f693e1 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width