You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi
I have downloaded the sample app and I tried to upload images to a S3 bucket. In android 2.3 all works perfect but in android 4.3 and android 5.0.2 I'm getting the following error:
I/AmazonHttpClient﹕ Unable to execute HTTP request: Hostname 'here_goes_my_bucket_name_changed_for_this_post.s3.amazonaws.com' was not verified
java.io.IOException: Hostname 'here_goes_my_bucket_name_changed_for_this_post.s3.amazonaws.com' was not verified
at libcore.net.http.HttpConnection.verifySecureSocketHostname(HttpConnection.java:223)
at libcore.net.http.HttpsURLConnectionImpl$HttpsEngine.connect(HttpsURLConnectionImpl.java:446)
at libcore.net.http.HttpEngine.sendSocketRequest(HttpEngine.java:290)
at libcore.net.http.HttpEngine.sendRequest(HttpEngine.java:240)
at libcore.net.http.HttpURLConnectionImpl.connect(HttpURLConnectionImpl.java:81)
at libcore.net.http.HttpURLConnectionImpl.getOutputStream(HttpURLConnectionImpl.java:197)
at libcore.net.http.HttpsURLConnectionImpl.getOutputStream(HttpsURLConnectionImpl.java:281)
at com.amazonaws.http.UrlHttpClient.writeContentToConnection(UrlHttpClient.java:128)
at com.amazonaws.http.UrlHttpClient.execute(UrlHttpClient.java:65)
at com.amazonaws.http.AmazonHttpClient.executeHelper(AmazonHttpClient.java:353)
at com.amazonaws.http.AmazonHttpClient.execute(AmazonHttpClient.java:196)
at com.amazonaws.services.s3.AmazonS3Client.invoke(AmazonS3Client.java:4230)
at com.amazonaws.services.s3.AmazonS3Client.putObject(AmazonS3Client.java:1644)
at com.amazonaws.mobileconnectors.s3.transferutility.UploadTask.uploadSinglePartAndWaitForCompletion(UploadTask.java:174)
at com.amazonaws.mobileconnectors.s3.transferutility.UploadTask.call(UploadTask.java:74)
at com.amazonaws.mobileconnectors.s3.transferutility.UploadTask.call(UploadTask.java:40)
at java.util.concurrent.FutureTask.run(FutureTask.java:234)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573)
at java.lang.Thread.run(Thread.java:841)
I suppose that is something related with https connection but I don't really know if is something related with my S3 configuration or is directly related with the app. The most strange thing is that the upload works like a charm in android 2.3 but not in newer android versions.
Thanks for your quick response. I'm using the version 2.2.6 of AWS android SDK and you are right my bucket includes "." in the name. is the problem related with that?
Usually not a problem, but there is an issue with the SDK of handling Virtual Hosting of Buckets with special characters. A dot in the bucket can cause hostname verification failure. We'll address it ASAP.
A work around is to turn on path style access in S3ClientOptions.
Hi
I have downloaded the sample app and I tried to upload images to a S3 bucket. In android 2.3 all works perfect but in android 4.3 and android 5.0.2 I'm getting the following error:
I suppose that is something related with https connection but I don't really know if is something related with my S3 configuration or is directly related with the app. The most strange thing is that the upload works like a charm in android 2.3 but not in newer android versions.
Thanks in advance :)
PS: I have raised the issue in the sample app repo as well but at the end is a library issue more than sample app issue. https://github.com/awslabs/aws-sdk-android-samples/issues/31
The text was updated successfully, but these errors were encountered: