socketio / socket.io-client-java

Full-featured Socket.IO Client Library for Java, which is compatible with Socket.IO v1.0 and later.
https://socketio.github.io/socket.io-client-java/installation.html
Other
5.32k stars 972 forks source link

okio.AsyncTimeout Caused by java.lang.IllegalStateException Unbalanced enter/exit #691

Open nitrodenov opened 2 years ago

nitrodenov commented 2 years ago

Hello. Using socket.io 1.0.0, okhttp3 4.9.1 on Android. Do somebody have ideas, how to fix this crash?

Caused by java.lang.IllegalStateException
Unbalanced enter/exit

okio.AsyncTimeout$Companion.scheduleTimeout (AsyncTimeout.java:225)
okio.AsyncTimeout$Companion.access$scheduleTimeout (AsyncTimeout.java:201)
okio.AsyncTimeout.enter (AsyncTimeout.java:54)
okio.AsyncTimeout.withTimeout (AsyncTimeout.java:144)
okio.AsyncTimeout$source$1.read (AsyncTimeout.java:331)
okio.internal.RealBufferedSourceKt.commonIndexOf (RealBufferedSourceKt.java:322)
okio.RealBufferedSource.indexOf (RealBufferedSource.java:427)
okio.internal.RealBufferedSourceKt.commonReadUtf8LineStrict (RealBufferedSourceKt.java:197)
okio.RealBufferedSource.readUtf8LineStrict (RealBufferedSource.java:320)
okhttp3.internal.http1.HeadersReader.readLine (HeadersReader.java:29)
okhttp3.internal.http1.Http1ExchangeCodec.readResponseHeaders (Http1ExchangeCodec.java:178)
okhttp3.internal.connection.Exchange.readResponseHeaders (Exchange.java:106)
myapp.network.interceptor.SomeInterceptor.intercept (SomeInterceptor.java:16)
okhttp3.internal.http.RealInterceptorChain.proceed (RealInterceptorChain.java:109)
okhttp3.internal.connection.RealCall.getResponseWithInterceptorChain$okhttp (RealCall.java:201)
okhttp3.internal.connection.RealCall$AsyncCall.run (RealCall.java:517)
java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1167)
java.lang.Thread.run (Thread.java:929)

PS I found this issue, but this issue is very old. https://github.com/socketio/socket.io-client-java/issues/212