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

Lost connection to background transfer service on large file #234

Open
joshweir opened this issue Nov 16, 2018 · 2 comments
Open

Lost connection to background transfer service on large file #234

joshweir opened this issue Nov 16, 2018 · 2 comments

Comments

@joshweir
Copy link

joshweir commented Nov 16, 2018

RNFB: master (as at 16-Nov-2018)
RN: 0.57.2

I setup background upload following the readme, on small files this works but on large files the upload fails with:

[RNFetchBlobRequest] session didCompleteWithError Error Domain=NSURLErrorDomain Code=-997 "Lost connection to background transfer service" UserInfo={NSErrorFailingURLStringKey=https://hiddenurl.s3.amazonaws.com/, NSLocalizedDescription=Lost connection to background transfer service, NSErrorFailingURLKey=https://hiddenurl.s3.amazonaws.com/}
[info][tid:NSOperationQueue 0x1c0624fc0 (QOS: UTILITY)][RNFetchBlobRequest.m:362] [RNFetchBlobRequest] session didBecomeInvalidWithError (null)

I note that handleEventsForBackgroundURLSession in AppDelegate.m is not being triggered, however the uploadTaskWithRequest is being called (in sendRequest of RNFetchBlobRequest.m) and subsequent lines of sendRequest are being called, the task has a taskId.

Not sure where to go from here? Do you need any additional info?

@ghost
Copy link

ghost commented May 31, 2019

I resolved it by adding capability of background tasks in the xCode; https://koenig-media.raywenderlich.com/uploads/2016/09/BM-EnableBackgroundFetch.png. However downloads stops when app in the background, but when you will return to the app, it continues.

@santi8194
Copy link

@NeliHarbuzava Did you ever find a solution? I'm having the same problem.

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