Missing close call on blob-get-stream causes the stream to never finish reading
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 38/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- javascript
- Domain
- api
Research direction
Start with the File API blob-get-stream algorithm and the Streams specification's ReadableStream close algorithm. Reproduce the supplied Blob.stream() BYOB-reader example and verify that reading eventually returns done=true after all bytes are queued.
Written by the indexing model from the issue text.
Description
I believe blog get stream algorithm is missing a call to close that stream, which results in consumers of that readable stream never 'finishing' reading that stream.
For example, without a call to "close", from my reading 'done' will never get set to true for the following test:
let buffer = new ArrayBuffer(200);
let bytesReceived = 0;
let offset = 0;
let blob = new Blob(['Data to be read! 🦬']);
const stream = blob.stream();
const reader = stream.getReader({ mode: "byob" });
while (true) {
let result = await reader.read(new type(buffer, offset, buffer.byteLength - offset));
if (result.done) {
return;
}
buffer = result.value.buffer;
offset += result.value.byteLength;
bytesReceived += result.value.byteLength;
}
I think the fix should be just adding a close into the blob-get-stream algorithm after all bytes have been queued into the stream.
- Dominant language
- HTML
- Stars
- 118
- Forks
- 52
- Avg merge
- 9d 16h
- Merged PRs (30d)
- 1
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from w3c/FileAPI
-
TPAC2026
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Difficulty 1/5 Under an hour Newbie friendliness 62/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Difficulty 5/5 Over a week Newbie friendliness 30/100
Similar issues
-
fix(errors): EHOSTUNREACH from a happy-eyeballs connect is reported as a resolver error (STAMP-80) Open
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
snapshot-labs/stamp#666 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
GauravKarakoti/SecureFlow#1070 · 1 comment ·
-
triage/confirmed
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
agentscope-ai/agentscope#2775 ·
-
area/sessions comp/cron comp/gateway P2 sweeper:risk-message-delivery sweeper:risk-session-state type/bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
NousResearch/hermes-agent#118863 ·
-
needs-triage🔍
Difficulty 2/5 1-3 hours Newbie friendliness 85/100