[Webkit-unassigned] [Bug 272600] New: NotReadableError: The I/O read operation failed for large files of size 4G+
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri Apr 12 13:14:25 PDT 2024
https://bugs.webkit.org/show_bug.cgi?id=272600
Bug ID: 272600
Summary: NotReadableError: The I/O read operation failed for
large files of size 4G+
Product: WebKit
Version: Safari 17
Hardware: Mac (Apple Silicon)
OS: macOS 14
Status: NEW
Severity: Major
Priority: P2
Component: JavaScriptCore
Assignee: webkit-unassigned at lists.webkit.org
Reporter: theazgra at gmail.com
Created attachment 470903
--> https://bugs.webkit.org/attachment.cgi?id=470903&action=review
Small repro for bug.
Hello,
I have came accross bug regarding the ReadableStream::getReader() [https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream/getReader] method.
This method fails for large files, of size 4G+, with `NotReadableError: The I/O read operation failed`.
I have tested this with *real* files and also some generated ones. Generated like: `dd if=/dev/zero of=test.dat bs=1G count=3`
Files of sizes 1G, 2G, 3G were fine, but from 4G, the error would occur. This makes upload of such files, using this API not working.
Also we can note, that this is not problem with the file itself, because *workaround* using `slice`, eg. `await file.slice(0, 65_536).stream().getReader().read();` is able to read the first Chunk of the file.
Small repro is attached.
```
const fileStream = file.stream();
const fileStreamReader = fileStream.getReader(); <-- NotReadableError will occur here
const {done, value} = await fileStreamReader.read() <-- this won't work, stream is closed because of the NotReadableError
console.log(done);
console.log(value);
```
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20240412/10795a94/attachment.htm>
More information about the webkit-unassigned
mailing list