react-native-s3 icon indicating copy to clipboard operation
react-native-s3 copied to clipboard

Failed upload when uploading reaches to 100% [iOS only]

Open damathryx opened this issue 7 years ago • 4 comments

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: screen shot 2017-02-23 at 12 03 30 pm

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 screen shot 2017-01-19 at 11 10 29 pm

UPDATE: I am using transferUtility.setupWithBasic and passing accessKey, secretKey, and sessionKey. Promise returns true also.

damathryx avatar Jan 16 '17 15:01 damathryx

@damathryx, can you see any related logs in Xcode console?

jhen0409 avatar Jan 21 '17 15:01 jhen0409

@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


damathryx avatar Jan 23 '17 04:01 damathryx

@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? screen shot 2017-02-24 at 10 40 06 pm

damathryx avatar Feb 24 '17 15:02 damathryx

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.

img_1289

nab0y4enko avatar Nov 08 '17 14:11 nab0y4enko