Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
OZIOisgood opened this issue Sep 24, 2024 · 0 comments
Open

Comments

@OZIOisgood
Copy link

OZIOisgood commented Sep 24, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant