aws-sdk-android
aws-sdk-android copied to clipboard
Non-fatal Exception: com.amazonaws.AmazonClientException: Unable to execute HTTP request: timeout
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):
- AWS Android SDK Version: in all versions
- Device: SM-X205
- Android Version: Android 13
- Specific to simulators: No
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.
@tylerjroach still same issue after restarting the device too.
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:
-
make sure your app has permission android.permission.INTERNET.
-
make sure the device has a stable network connection.
Another possible cause could be that host is blocked by ISP.
- If possible, use a network diagnostic tool or a terminal emulator available on the device to perform a DNS lookup (nslookup or dig commands) for the hostname ?
- Could you try to access the same host using a browser on same device to see if the issue persists. This can help identify if the problem is specific to the app using the AWS SDK.
Also following details might help:
-
Network Signal Strength: This can often affect the upload process. Weak signal strength might lead to timeouts or other connectivity issues.
-
Network Type (4G, LTE, 5G, etc.): The type of network you're on can impact upload speeds and reliability.
-
Any VPN or Proxy Use: Are you using any VPN or proxy services that could affect the routing of your data?
@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.
@Sivaram1227 Were you unable to resolve your issue or gather more details of the issue?