RESOLVED FIXED 272600
NotReadableError: The I/O read operation failed for large files of size 4G+
https://bugs.webkit.org/show_bug.cgi?id=272600
Summary NotReadableError: The I/O read operation failed for large files of size 4G+
Vojtěch Moravec
Reported 2024-04-12 13:14:25 PDT
Created attachment 470903 [details] 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); ```
Attachments
Small repro for bug. (1.21 KB, text/html)
2024-04-12 13:14 PDT, Vojtěch Moravec
no flags
Alexey Proskuryakov
Comment 1 2024-04-12 14:26:05 PDT
Surprisingly, I could not find any existing bug tracking this, even though this was something we discussed in conjunction with bug 145083 before. It would be good to know if common user scenarios were still affected (such as uploading to YouTube or to Google Drive).
Vojtěch Moravec
Comment 2 2024-04-12 14:35:53 PDT
(In reply to Alexey Proskuryakov from comment #1) > Surprisingly, I could not find any existing bug tracking this, even though > this was something we discussed in conjunction with bug 145083 before. > > It would be good to know if common user scenarios were still affected (such > as uploading to YouTube or to Google Drive). Yeah, Uploading with mux's UpChunk to Google storage doesn't work. I have already filled issue with them. https://github.com/muxinc/upchunk/issues/134
Radar WebKit Bug Importer
Comment 3 2024-04-22 08:55:34 PDT
youenn fablet
Comment 4 2024-04-29 06:56:45 PDT
Repro is not working for me since it is using byob. https://jsfiddle.net/amrktnh6/ reproes the issue.
youenn fablet
Comment 5 2024-04-29 09:06:48 PDT
EWS
Comment 6 2024-05-07 06:52:47 PDT
Committed 278457@main (0608392ae72e): <https://commits.webkit.org/278457@main> Reviewed commits have been landed. Closing PR #27875 and removing active labels.
Note You need to log in before you can comment on or make changes to this bug.