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 timed out #333

Open
MilanC994 opened this issue Jun 27, 2023 · 4 comments
Open

Request timed out #333

MilanC994 opened this issue Jun 27, 2023 · 4 comments

Comments

@MilanC994
Copy link

I'm trying to upload large videos, and getting the error 'Request timed out'. I was able to increase the timeout for Android, but how do I do it for IOS ?

I can see the request is processed on my backend, it uploads the file to s3, and returns correct url, but the RNBU throws the timeout error anyways.

RN: 0.68.2
RNBU: 6.6.0

@MilanC994
Copy link
Author

Anyone help please ?

@kusche12
Copy link

@MilanC994 were you able to find a fix for this? I am noticing some of our user uploads have the same error when trying to run a background upload

@MilanC994
Copy link
Author

@kusche12 Not yet.

@MilanC994
Copy link
Author

Hey @kusche12 I was able to solve this issue by increasing the timeoutInterval for IOS too.
go to ode_modules/react-native-background-upload/ios/VydiaRNFileUploader.m
and add your custom timeout interval

...
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:requestUrl];
[request setHTTPMethod: method];
[request setTimeoutInterval:YOUR_INTERVAL];
...

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

2 participants