Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wifi java.net.SocketTimeoutException: failed to connect to host #5453

Closed
SergeyBukarev opened this issue Sep 12, 2019 · 1 comment
Closed
Labels
bug Bug in existing code stackoverflow Referred to stackoverflow

Comments

@SergeyBukarev
Copy link

Preconditions:

  1. Network hadware:
    Amplifier of 3G/LTE signal + Wifi router.
  2. Devices:
    Samsung galaxy A10 Android 9
    iPhone 8 Plus iOS 12.4
  3. Application:
    I have two applications (iOS and Android) that interact with the same server.
    Android aplication uses library okhttp:4.2.0 and makes requests through okhttp.

Test #1
Device: iPhone 8 Plus iOS 12.4.
Mobile network (3G/LTE) data is disabled, connected by wifi.
Request GET with MyTestApp iOS aplication:
The request is successful and the result is returned.

Test #2
Device: iPhone 8 Plus iOS 12.4.
Mobile network (3G/LTE) data is enabled. Wifi is disabled.
Request GET with MyTestApp iOS aplication:
The request is successful and the result is returned.

Test #3
Device: Samsung galaxy A10 Android 9
Mobile network (3G/LTE) data is disabled, connected by wifi.
Request GET with MyTestApp android aplication:
Logcat: HTTP FAILED: java.net.SocketTimeoutException: failed to connect to [MyServerName]/46.148.196.218 (port 4002) from /10.0.1.7 (port 37470) after 30000ms

Test #4
Device: Samsung galaxy A10 Android 9
Mobile network (3G/LTE) data is disabled, connected by wifi.
Request GET with RestApiClient android aplication:
(https://play.google.com/store/apps/details?id=com.app.restclient)
Logcat: HTTP FAILED: java.net.SocketTimeoutException: failed to connect to [MyServerName]/46.148.196.218 (port 4002) from /10.0.1.7 (port 37504) after 60000ms

Test #5
Device: Samsung galaxy A10 Android 9
Mobile network (3G/LTE) data is enabled. Wifi is disabled.
Request with MyTestApp android aplication:
The request is successful and the result is returned.

Conclusion:
The ios application always work fine with any network configuration. Android application does not work through a wifi router in 80% of cases.

@SergeyBukarev SergeyBukarev added the bug Bug in existing code label Sep 12, 2019
@yschimke
Copy link
Collaborator

You should discuss this on stackoverflow. There isn't anything actionable for us to investigate as we don't have a bug reproduction here.

@yschimke yschimke added the stackoverflow Referred to stackoverflow label Sep 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug in existing code stackoverflow Referred to stackoverflow
Projects
None yet
Development

No branches or pull requests

2 participants