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

Request Timeout on Big File (180MB) #321

Open
3 tasks done
allidoisace opened this issue Oct 27, 2021 · 2 comments
Open
3 tasks done

Request Timeout on Big File (180MB) #321

allidoisace opened this issue Oct 27, 2021 · 2 comments

Comments

@allidoisace
Copy link

allidoisace commented Oct 27, 2021

Bug Report

Problem

[BackgroundTask] Background Task 1 ("Called by CordovaPlugins, from -[CDVFileTransfer uploadData:command:]"), was created over 30 seconds ago. In applications running in the background, this creates a risk of termination. Remember to call UIApplication.endBackgroundTask(_:) for your task in a timely manner to avoid this.

NSURLConnection finished with error - code -1001
File Transfer Error: The request timed out.

What is expected to happen?

Not timeout.

What does actually happen?

Times out.

Information

Using latest master branch code.

Command or Code

Ensure file is large. If the timeout doesn't occur, increase file size. The current environment is in a K8's cluster, so there may be some overhead there on my end.

const fileURL = file:// ...
const options: FileUploadOptions = {
      fileKey: 'file',
      fileName: fileURL.substring(fileURL.lastIndexOf('/') + 1),
      mimeType: 'text/plain',
    };

    // TODO Pass created uuid and version
    const params: any = {};
    params.value1 = 'test';
    params.value2 = 'param';

    options.params = params;

    const ft = new FileTransferObject();
    ft.upload(
      fileURL,
      encodeURI(`http://example.com`),
      options,
    );

Environment, Platform, Device

K8's/Docker with iOS, iPad Pro 12.9

Version information

cordova-plugin-file: 6.0.2
cordova-plugin-file-transfer: github:apache/cordova-plugin-file-transfer#master
Capacitor: 3.2.4
Ionic: 5.8.4
Ionic CLI: 6.17.1
XCode: 13

Checklist

  • I searched for existing GitHub issues
  • I updated all Cordova tooling to most recent version
  • I included all the necessary information above
@MarchenkoOleg
Copy link

Hello! Have you found a solution to the problem?

@Vansinnesvisor
Copy link

Vansinnesvisor commented Nov 9, 2022

When I upload large files on iOS I get a similar error.
Works well on Android.
Any solution yet?

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

3 participants