I've tested back and forth on 2.4.2 vs 2.4.1 and I can confirm that prior to 2.4.2 this issue didn't exist.
Basically when attempting to make an upload via AWSS3TransferUtility the upload appears to go through successfully (progress call back is called until progress reaches 100%), then in the completion block the following error is thrown: Error Domain=com.amazonaws.AWSS3TransferUtilityErrorDomain Code=1 "(null)"
I've looked through the release notes, and existing issues and can't see any mention of why this would occur? So I just rolled back to 2.4.1 until I have time to dig into it, but any insight would be helpful as to why this breaking change would have been introduced in v.2.4.2.
I'm happy to help with a PR once I have time to track down why this is happening.
can you print the response headers and body for your request and paste them here?
Here's the redacted response data (can't pull the body because the error is being thrown in - (void)URLSession (NSURLSession *)session task:(NSURLSessionTask *)task didCompleteWithError:(NSError *)error):
po task.response
â–¿ Optional<NSHTTPURLResponse>
- Some : <NSHTTPURLResponse: 0x12e3111f0> { URL: https://my-bucket.s3.amazonaws.com/useruploads/threaduploads/57364afd7a4e76dd30047042/A5CBF696-B2F4-4B70-A1E2-D139406152D9-2210-0000021F1585A343.jpg?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=cred&X-Amz-Date=20160524T001646Z&X-Amz-Expires=2999&X-Amz-SignedHeaders=content-type%3Bhost&x-amz-security-token=token&X-Amz-Signature=sig } { status code: 403, headers {
Connection = close;
"Content-Type" = "application/xml";
Date = "Tue, 24 May 2016 00:16:47 GMT";
Server = AmazonS3;
"Transfer-Encoding" = Identity;
"x-amz-id-2" = "ID";
Let me know if there's anything else you'd like to see. The 403 makes me think it's related to authentication (we're using Developer Authenticated IDs), but seems odd that all of the rest of our AWS calls would work except uploads...
what is the content type setting when you upload the request?
image/jpeg
I see exactly the same issue - ever since 2.4.2
I just got bitten by this bug. Rolling back to 2.4.1 worked for me.
I spent the last two days on this before I checked this place… 🙄
This issue will be addressed in the next release. See this pull request for more details. Thanks.
@yosuke-matsuda I have the same issue now on a live app on the App Store, which breaks the whole app. Any fix I can issue now?
@yosuke-matsuda Ok, just read the other thread, and seems I can add something to the code. Still have to upload a new binary to App Store.
fixed with 2.4.3
Confirmed, it works in 2.4.3. Thanks guys.
It's working again. Thanks.
v2.4.3 not work for iphone 4s
v2.4.6 not work for all device
I had the same error as reported originally. It turned out I was using the wrong region in my configuration.
<key>AWS</key>
<dict>
<key>CredentialsProvider</key>
<dict>
<key>CognitoIdentity</key>
<dict>
<key>Default</key>
<dict>
<key>PoolId</key>
<string>us-west-2:xxxxx</string>
<key>Region</key>
<string>USWest2</string>
</dict>
</dict>
</dict>
<key>S3TransferUtility</key>
<dict>
<key>Default</key>
<dict>
<key>Region</key>
<string>**USEast1**</string>
</dict>
</dict>
</dict>
I was using USWest1 when I needed USEast2. Your mileage may vary.
I have this bug in 2.4.7
I am getting the same Error in 2.4.7. I checked everything from region to code debugging and explored various forums on Amazon but it does not seems to work. :(
hi guys, I am also facing same issue with 2.4.7, I have tried all methods to upload image, did not get success.
with AWSS3TransferManager getting following error each time:
<Error><Code>PermanentRedirect</Code><Message>The bucket you are attempting to access must be addressed using the specified endpoint. Please send all future requests to this endpoint.</Message><Bucket>bucketName</Bucket><Endpoint>bucketName.s3.amazonaws.com</Endpoint><RequestId>requestId</RequestId><HostId>hostID</HostId></Error>
and with AWSS3TransferUtility getting following error :
"Error Domain=com.amazonaws.AWSS3TransferUtilityErrorDomain Code=2 \"(null)\" UserInfo={Server=AmazonS3, Transfer-Encoding=Identity, Connection=close, Content-Type=application/xml, Date=Tue, 06 Sep 2016 19:56:22 GMT, x-amz-request-id=requestID, x-amz-id-2=someId}"
+1
Same error here, using 2.4.11, please help :-(
"Error Domain=com.amazonaws.AWSS3TransferUtilityErrorDomain Code=1 \"(null)\" UserInfo={Server=AmazonS3, Transfer-Encoding=Identity, Connection=close, Content-Type=application/xml, Date=Tue, 25 Oct 2016 21:03:41 GMT, x-amz-request-id=F4E1C7D4A21A53, x-amz-id-2=yPEHYjXwcPtMEePxP+ctmovAY8y175QjyJzzpwz3GVvcsMqHsMSrgkZzv8ckO7Kl4oZVdo=}"
+1 same error
Error: Optional(Error Domain=com.amazonaws.AWSS3TransferUtilityErrorDomain Code=1 "(null)" UserInfo={Server=AmazonS3, Transfer-Encoding=Identity, Connection=close, Content-Type=application/xml, Date=Mon, 31 Oct 2016 18:24:32 GMT, x-amz-request-id=7CC1D7BC5D76D19C, x-amz-id-2=sPqHD28/nWQhBut26zfUnMahN+J4TtCxyCOF2B8tHe0iKyTaWl8NP4CfBMa1V63Cd8dMZ1NgOPw=})
Not an error anymore for me, my bucket and my code had different region, they have to match.
same problem any one ? i am using (2.4.16) this version
Error : Error Domain=com.amazonaws.AWSS3TransferUtilityErrorDomain Code=2 "(null)" UserInfo={Server=AmazonS3, Transfer-Encoding=Identity, Connection=close, Content-Type=application/xml, Date=Wed, 08 Mar 2017 06:44:05 GMT, x-amz-request-id=7E378925DBB28EE1, x-amz-id-
I face the same issue, It's the system date is the future time.
+1 same issue, and I am using version 2.5.5.
upload error : Error Domain=com.amazonaws.AWSServiceErrorDomain Code=11 "(null)" UserInfo={HostId=fCa9+koh9+Zkj1vqNwzWF/P1IjVqanYtghUEFkJdFKH34xIpEsUGvEjLPSrpbdfZpOCzh3Abnjw=, Message=Access Denied, Code=AccessDenied, RequestId=783EFDBA73343BB0}
same problem any one ? i am using (2.4.16) this version
Error : Error Domain=com.amazonaws.AWSS3TransferUtilityErrorDomain Code=2 "(null)" UserInfo={Server=AmazonS3, Transfer-Encoding=Identity, Connection=close, Content-Type=application/xml, Date=Wed, 08 Mar 2017 06:44:05 GMT, x-amz-request-id=7E378925DBB28EE1, x-amz-id-
Have you solved this problem?
Hello @ddDeName,
The version of the SDK you are using is quite old. Please upgrade to the latest version, and open a new issue if you still need help.
Error RAW: Optional(Error Domain=com.amazonaws.AWSS3TransferUtilityErrorDomain Code=1 "(null)" UserInfo={Server=AmazonS3, Transfer-Encoding=Identity, Connection=close, Content-Type=application/xml, Date=Tue, 25 Jun 2019 15:49:12 GMT, x-amz-request-id=5FB137472340081A, x-amz-id-2=rxyS0KtBSSpGx8awu7J5zyET6g+wE3CbVozXI8Rhh+AWRrTyxJf8Z9DxTnK2gWZqTB+WFZL5Lvo=, x-amz-bucket-region=eu-west-1})
i'm facing this issue when i'm changing the region from one region to another region can anyone help me to fix this
Most helpful comment
same problem any one ? i am using (2.4.16) this version
Error : Error Domain=com.amazonaws.AWSS3TransferUtilityErrorDomain Code=2 "(null)" UserInfo={Server=AmazonS3, Transfer-Encoding=Identity, Connection=close, Content-Type=application/xml, Date=Wed, 08 Mar 2017 06:44:05 GMT, x-amz-request-id=7E378925DBB28EE1, x-amz-id-