aws-amplify / aws-sdk-android

AWS SDK for Android. For more information, see our web site:
https://docs.amplify.aws
Other
1.03k stars 551 forks source link

Non-fatal Exception: com.amazonaws.AmazonClientException: Unable to execute HTTP request: timeout #3478

Open Sivaram1227 opened 10 months ago

Sivaram1227 commented 10 months ago

When try to upload the files to S3, I am getting "Unable to execute HTTP request: timeout", "Caused by java.net.SocketTimeoutException: timeout", "Caused by java.net.SocketException: Socket closed", "Unable to execute HTTP request: Unable to resolve host "s3-ap-southeast-1.amazonaws.com": No address associated with hostname".

This issue happens only on Galaxy Tab A8(SM-X205) with mobile network. Uploading with wifi is working fine. Issue only with mobile network.

Mobile network upload bandwidth is also high.

File Size are less than 5MB.

Which AWS service(s) are affected? aws-android-sdk-s3

Expected behavior It should upload the files even with the mobile network.

Environment Information (please complete the following information):

tylerjroach commented 10 months ago

Can you restart the device and try again? SocketTimeoutExceptions are typically seen due to bad network or a DNS issue. Please let me know once you have tested again after a device restart.

Sivaram1227 commented 10 months ago

@tylerjroach still same issue after restarting the device too.

ankpshah commented 7 months ago

Hey @Sivaram1227, Are you still seeing this issue? We need more information on the mobile connection. Socket timeout indicates lack of outbound internet. Maybe mobile network has good download speed but not upload speed. UnknownHostException usually implies no network connection. Two possible causes:

Another possible cause could be that host is blocked by ISP.

Also following details might help:

Sivaram1227 commented 6 months ago

@ankpshah Yes, this issue still persist. The issue in when user connected to mobile network, then socket timeout issue occurs. But when user connect to wifi and try to upload files, it's works fine. Both mobile network and wifi has same network provider.

I will try your suggested cause to find the root cause and let you know. Thank you.

phantumcode commented 2 months ago

@Sivaram1227 Were you unable to resolve your issue or gather more details of the issue?