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

iOS: Lost connection to background transfer service

Open sanderpick opened this issue 6 years ago • 16 comments

Every so often, when uploads happen in the background (kicked off by a significant location change update), we get an error: Lost connection to background transfer service

Same problem as described in this other lib: https://github.com/joltup/rn-fetch-blob/issues/20

sanderpick avatar Jul 22 '18 18:07 sanderpick

Thanks for the report. Do you have more information about the exception such as a stack traceback? How would you prefer the exception should be handled by this library?

TSMMark avatar Jul 23 '18 16:07 TSMMark

@TSMMark, I believe it's just an error reported back from the OS, not an exception (updated the issue description). Perhaps this lib could offer a retry?

sanderpick avatar Jul 24 '18 01:07 sanderpick

is the error reported back form the OS a NSURLErrorBackgroundSessionWasDisconnected thrown from here?

L-Yeiser avatar Aug 04 '18 15:08 L-Yeiser

+1 I have same issue, it not resolved

mlop113 avatar Jan 18 '19 08:01 mlop113

same...

BaderSerhan avatar Mar 26 '19 09:03 BaderSerhan

Same here... still a problem

tommysusanto avatar May 08 '19 02:05 tommysusanto

+1 same issue

rabi-boop avatar Jan 28 '20 13:01 rabi-boop

+1 same issue. Running into this on a production build, please follow up this bug immediately.

JackHull avatar Feb 21 '20 20:02 JackHull

+1 ... I'm having this issue from time to time too and I tried to catch the error, and make another 5 attempts but it throws this error every time.

danlupascu avatar Apr 05 '20 03:04 danlupascu

I have not idea what program you guys are talking about, but I am having the same error on Canvas Instructure.

andrewboldi avatar Dec 12 '20 07:12 andrewboldi

I've made some tests & looks like it's because of usage NSURLSessionDataTask *uploadTask;

WHY?

Please take a look at this https://developer.apple.com/documentation/foundation/nsurlsessionuploadtask

Screenshot 2021-02-23 at 22 35 59

As for me change to NSURLSessionUploadTask & add proper handlers fixing the issue. I'll try to prepare PR on days if that will help.

kasterlod avatar Feb 23 '21 21:02 kasterlod

@kasterlod Sounds nice! How is it going with the PR? Really need this as well! Or could you share some code in the meantime? Thanks 🙂

flogy avatar Mar 08 '21 07:03 flogy

hello! Yeah, I'm during tests, I'll prepare PR on days 🙌 stay tuned!

kasterlod avatar Mar 15 '21 07:03 kasterlod

@kasterlod hi, do you have any date for this fix, thanks

pmella16 avatar Mar 24 '21 15:03 pmella16

@flogy you tried with Xcode 12.5 beta 3 ?? according to some comments it is a bug that is fixed in the beta version

pmella16 avatar Mar 25 '21 15:03 pmella16

@pmella16 not sure about this, but probably no, as I never intentionally installed any beta version.

flogy avatar Mar 25 '21 21:03 flogy