openhab-android
openhab-android copied to clipboard
Crash in HttpClient$method$2$2.onFailure
Actual behaviour
Fatal Exception: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:614)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1067)
Caused by java.lang.reflect.InvocationTargetException:
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:604)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1067)
Caused by org.openhab.habdroid.util.HttpClient$HttpException: java.net.SocketTimeoutException: failed to connect to myopenhab.org/194.195.245.175 (port 443) from /192.168.7.6 (port 38586) after 10000ms
at org.openhab.habdroid.util.HttpClient$method$2$2.onFailure(HttpClient.kt:22)
at okhttp3.internal.connection.RealCall$AsyncCall.run(RealCall.kt:154)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644)
at java.lang.Thread.run(Thread.java:1012)
Caused by java.net.SocketTimeoutException: failed to connect to myopenhab.org/194.195.245.175 (port 443) after 10000ms
at libcore.io.IoBridge.connectErrno(IoBridge.java:235)
at libcore.io.IoBridge.connect(IoBridge.java:179)
at java.net.PlainSocketImpl.socketConnect(PlainSocketImpl.java:142)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:390)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:230)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:212)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:436)
at java.net.Socket.connect(Socket.java:646)
at okhttp3.internal.platform.Platform.connectSocket(Platform.kt:10)
at okhttp3.internal.connection.RealConnection.connectSocket(RealConnection.kt:77)
at okhttp3.internal.connection.RealConnection.connect(RealConnection.kt:195)
at okhttp3.internal.connection.ExchangeFinder.findConnection(ExchangeFinder.kt:253)
at okhttp3.internal.connection.ExchangeFinder.findHealthyConnection(ExchangeFinder.kt)
at okhttp3.internal.connection.ExchangeFinder.find(ExchangeFinder.kt:47)
at okhttp3.internal.connection.RealCall.initExchange$okhttp(RealCall.kt:31)
at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.kt:11)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:151)
at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.kt:189)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:151)
at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.kt:167)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:151)
at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.kt:34)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:151)
at okhttp3.logging.HttpLoggingInterceptor.intercept(HttpLoggingInterceptor.kt:19)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:151)
at okhttp3.internal.connection.RealCall.getResponseWithInterceptorChain$okhttp(RealCall.kt:113)
at okhttp3.internal.connection.RealCall$AsyncCall.run(RealCall.kt:44)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644)
at java.lang.Thread.run(Thread.java:1012)
Environment data
Client
- App version : 3.15.4 (547)
- Build flavor : Full
I looked through all indirect invocations of HttpClient.method() and found one case that doesn't catch HttpException. Not sure if it's that, but it's what seems most likely to me.
Still happens on 3.16.1.