react-native-s3
react-native-s3 copied to clipboard
Failed upload when uploading reaches to 100% [iOS only]
Version: 0.0.22
RN Version: 0.38.0
React version: 15.4.1
I'm having this issue when uploading in iOS. when the uploading progress reaches to 100% it fails.
my log looks like this:
android is perfectly fine though and I have the same component for both platforms
UPDATE: Additional note:
- Upon reaching 100% the tasks also disappear from getTasks.
- below is a task object, bytes and totalBytes are equal but status is failed
UPDATE:
I am using transferUtility.setupWithBasic
and passing accessKey
, secretKey
, and sessionKey
.
Promise returns true also.
@damathryx, can you see any related logs in Xcode console?
@jhen0409
these are my logs in xcode
2017-01-23 12:33:01.683 test_app[12534:307667] AWSiOSSDK v2.4.11 [Debug] AWSS3TransferUtility.m line:339 | __86-[AWSS3TransferUtility uploadFile:bucket:key:contentType:expression:completionHander:]_block_invoke | Request headers:
{
"Content-Type" = "image/jpeg";
"User-Agent" = "aws-sdk-iOS/2.4.11 iOS/10.1 en_US transfer-utility";
}
2017-01-23 12:33:01.730 test_app[12534:307667] AWSiOSSDK v2.4.11 [Debug] AWSS3TransferUtility.m line:339 | __86-[AWSS3TransferUtility uploadFile:bucket:key:contentType:expression:completionHander:]_block_invoke | Request headers:
{
"Content-Type" = "image/jpeg";
"User-Agent" = "aws-sdk-iOS/2.4.11 iOS/10.1 en_US transfer-utility";
}
2017-01-23 12:33:29.587574 test_app[12534:307799] [MC] Invalidating cache
2017-01-23 12:33:30.013332 test_app[12534:307169] [MC] Invalidating cache
2017-01-23 12:33:30.016931 test_app[12534:307799] [MC] Invalidating cache
2017-01-23 12:33:30.204929 test_app[12534:307667] [MC] Invalidating cache
2017-01-23 12:33:30.340110 test_app[12534:307169] [MC] Invalidating cache
@jhen0409 getting this error
The operation couldn’t be completed. (com.amazonaws.AWSS3TransferUtilityErrorDomain error 2.
after it fails when upload reaches 100%.
searched for the error and it seems bucket policy problem, but i am wondering why this is working in android not in ios?
Today I was looking for a solution to this problem and accidentally noticed that the time on the test device is incorrect. After I set the automatic time settings, this error disappeared.