react-native-background-upload: Unknown Error
Occasionally uploads fail with Unknown Error. We are using the library with a forked version react-native-image-crop-picker which allows downloading assets from the cloud. The error occurs intermittently and seems to be an iOs only issue. Attempting the upload again with a the same media often works. We have been unable to find consistent reproduction steps. Is there a way to get a better error so we know where to start with this issue? Has anyone else come across the same thing?
About this issue
- Original URL
- State: open
- Created 6 years ago
- Reactions: 1
- Comments: 31 (8 by maintainers)
@L-Yeiser I’d be happy to make a PR that uses a different API for iOS uploading. But it will take me some time. Will you test it for me once I do it?
That would be amazing. Let me know if you want me to test a fork.
@TSMMark wondering if it would work to use
NSURLSessionUploadTaskinstead ofNSURLSessionDataTask? Counter to this line the docs make it sound likeNSURLSessionUploadTaskis the correct class to use when uploading in the background. This PR is also usingNSURLSessionUploadTask. I admittedly have limited understanding of iOs development, but this error is our number one issue.@superandrew213 retrying the upload does not work in our case. ATM we are batching uploads in groups of three and retrying any failed upload five times before failing the process. These safe guards have lessened the impact of the bug but we are still seeing it.
We were able to match a failed upload with an the corresponding s3 Post. The
Unknown Erroris triggered by a 400 incomplete body. It would be awesome if s3 error were passed to the upload Event Listeners. Also any ideas as to why we are getting this error would be amazing.