react-native-background-upload icon indicating copy to clipboard operation
react-native-background-upload copied to clipboard

Request timed out

Open MilanC994 opened this issue 2 years ago • 4 comments

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 avatar Jun 27 '23 22:06 MilanC994

Anyone help please ?

MilanC994 avatar Oct 18 '23 22:10 MilanC994

@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

kusche12 avatar Jan 13 '24 00:01 kusche12

@kusche12 Not yet.

MilanC994 avatar Jan 15 '24 11:01 MilanC994

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]; ...

MilanC994 avatar Mar 08 '24 09:03 MilanC994