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

Crash in HttpClient$method$2$2.onFailure #3779

Open
mueller-ma opened this issue Jul 22, 2024 · 2 comments · Fixed by #3798
Open

Crash in HttpClient$method$2$2.onFailure #3779

mueller-ma opened this issue Jul 22, 2024 · 2 comments · Fixed by #3798
Labels
bug Indicates an unexpected problem or unintended behavior

Comments

@mueller-ma
Copy link
Member

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
@mueller-ma mueller-ma added the bug Indicates an unexpected problem or unintended behavior label Jul 22, 2024
@maniac103
Copy link
Contributor

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.

maniac103 added a commit to maniac103/openhab.android that referenced this issue Aug 14, 2024
maniac103 added a commit to maniac103/openhab.android that referenced this issue Aug 14, 2024
@mueller-ma
Copy link
Member Author

Still happens on 3.16.1.

@mueller-ma mueller-ma reopened this Aug 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Indicates an unexpected problem or unintended behavior
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants