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

SocketTimeoutException close app on 2G #16

Open
Kadanza opened this issue Oct 20, 2019 · 2 comments
Open

SocketTimeoutException close app on 2G #16

Kadanza opened this issue Oct 20, 2019 · 2 comments

Comments

@Kadanza
Copy link

Kadanza commented Oct 20, 2019

I have error when I use 2G mobile internet. My app is closed. I use last version.

10-20 12:10:56.692 11068-11068 . E/MobileMessaging: MobileMessaging API returned error (synchronizing messages)!
org.infobip.mobile.messaging.api.support.ApiIOException: -4, Can't access URI : https://mobile.infobip.com/mobile/5/messages
at org.infobip.mobile.messaging.api.support.http.client.DefaultApiClient.execute(DefaultApiClient.java:101)
at org.infobip.mobile.messaging.api.support.Generator$CachingInvocationHandler.invoke(Generator.java:368)
at java.lang.reflect.Proxy.invoke(Proxy.java:397)
at $Proxy12.sync(Unknown Source)
at org.infobip.mobile.messaging.mobile.messages.MessagesSynchronizer$1.run(MessagesSynchronizer.java:72)
at org.infobip.mobile.messaging.mobile.messages.MessagesSynchronizer$1.run(MessagesSynchronizer.java:64)
at org.infobip.mobile.messaging.mobile.common.MRetryableTask$1.run(MRetryableTask.java:82)
at org.infobip.mobile.messaging.mobile.common.MAsyncTask$2.doInBackground(MAsyncTask.java:55)
at org.infobip.mobile.messaging.mobile.common.MAsyncTask$2.doInBackground(MAsyncTask.java:43)
at android.os.AsyncTask$2.call(AsyncTask.java:292)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:818)
Caused by: java.net.SocketTimeoutException: failed to connect to mobile.infobip.com/3.123.239.72 (port 443) after 5000ms
at libcore.io.IoBridge.connectErrno(IoBridge.java:169)
at libcore.io.IoBridge.connect(IoBridge.java:122)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:183)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:456)
at java.net.Socket.connect(Socket.java:882)
at com.android.okhttp.internal.Platform.connectSocket(Platform.java:174)
at com.android.okhttp.Connection.connect(Connection.java:1222)
at com.android.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:395)
at com.android.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:298)
at com.android.okhttp.internal.http.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:399)
at com.android.okhttp.internal.http.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:349)
at com.android.okhttp.internal.http.HttpURLConnectionImpl.getResponseCode(HttpURLConnectionImpl.java:517)
at com.android.okhttp.internal.http.DelegatingHttpsURLConnection.getResponseCode(DelegatingHttpsURLConnection.java:105)
at com.android.okhttp.internal.http.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:25)
at org.infobip.mobile.messaging.api.support.http.client.DefaultApiClient.executeHTTP(DefaultApiClient.java:178)
at org.infobip.mobile.messaging.api.support.http.client.DefaultApiClient.execute(DefaultApiClient.java:86)

@tjuric
Copy link
Member

tjuric commented Oct 28, 2019

Hi @Kadanza,

How often does this error occur for you while you're using 2G?
Could you give us following info about testing device and connection:

  • OS version
  • device model - did you try it on another device models
  • connection type - did the error happen just on 2G (not wifi, 3G...)
  • does the error happen just on one mobile operator

We've made tests over 2G and didn't reproduce this error yet.

This is a caught exception and it doesn't affect library performance. API that failed tried to synchronize message delivery reports and other message operations which are all retried.

@Kadanza
Copy link
Author

Kadanza commented Nov 3, 2019

@tjuric

  • It was all time, when I force use 2G. When I use 3G or WiFi - I dont see any problems

Huawei Nexus 6p silver - 32 Gb
Android 8.1

Redmi s3
Android 6.0

Xiaomi Redmi 5 Plus
Android 7.1.2

This error close my app.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants