Skip to content

[WebKit] Failed to load resource: WebKit encountered an internal error #147

@OZIOisgood

Description

@OZIOisgood

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:

image
image

ENV:

iPhone 11 Pro Max
IOS 18.0
Safari

Error:

logs:

image
console_logs.txt

this.file.stream() ReadableStream request:

image

GCS PUT request:

image

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions