upchunk
upchunk copied to clipboard
[WebKit] Failed to load resource: WebKit encountered an internal error
Hello, Mux Team & Contributors
We have discovered a bug which affects WebKit users. The error was detected while uploading a large 1.5GB file.
File:
ENV:
iPhone 11 Pro Max IOS 18.0 Safari
Error:
logs:
this.file.stream()
ReadableStream
request:
GCS PUT
request:
Code:
private uploadFileWithUpChunk(file: File, uploadUrl: string, onProgress: (progress: number) => void): Observable<void> {
return from(
new Promise<void>((resolve, reject) => {
const upload = UpChunk.createUpload({
endpoint: uploadUrl,
file: file,
dynamicChunkSize: true,
delayBeforeAttempt: 4,
attempts: 8,
useLargeFileWorkaround: true
// We have tried several variations of options here
});
upload.on('error', error => {
console.error('An error occurred while uploading the file', error);
reject(
new Error('An error occurred while uploading the file', {
cause: error
})
);
});
upload.on('progress', (progress: { detail: unknown }) => {
onProgress(progress.detail as number);
});
upload.on('success', () => {
resolve();
});
})
);
}
It works on Windows with the same file. It is also possible to upload the same file from IOS using simple XHR and uploadUrl.
Maybe, it is somehow related to #145 issue, but I do not have the overflow of Content-Range
bytes problem (obviously, cos' I am using useLargeFileWorkaround
flag).
@cjpillsbury, if it is okay to tag you here )
Please, ask for any info you would need. Thank for your replies in advance.