crisp-im / crisp-sdk-android

:package: Crisp Android SDK, add a chat in any Android app and communicate with your users.
https://docs.crisp.chat/guides/chatbox-sdks/android-sdk/
Other
56 stars 17 forks source link

SocketTimeoutException #88

Closed francescogatto closed 2 years ago

francescogatto commented 2 years ago

Hi

Hi have a lot of this fatal exception in my app, please provide a way to not crash the app:

Fatal Exception: java.net.SocketTimeoutException: timeout at okio.SocketAsyncTimeout.newTimeoutException(JvmOkio.kt:146) at okio.AsyncTimeout.access$newTimeoutException(AsyncTimeout.kt:158) at okio.AsyncTimeout$source$1.read(AsyncTimeout.kt:337) at okio.RealBufferedSource.read(RealBufferedSource.kt:188) at okhttp3.internal.http1.Http1ExchangeCodec$AbstractSource.read(Http1ExchangeCodec.kt:331) at okhttp3.internal.http1.Http1ExchangeCodec$FixedLengthSource.read(Http1ExchangeCodec.kt:368) at okhttp3.internal.connection.Exchange$ResponseBodySource.read(Exchange.kt:276) at okio.RealBufferedSource.request(RealBufferedSource.kt:206) at okhttp3.logging.HttpLoggingInterceptor.intercept(HttpLoggingInterceptor.kt:247) at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109) at okhttp3.internal.connection.RealCall.getResponseWithInterceptorChain$okhttp(RealCall.kt:201) at okhttp3.internal.connection.RealCall$AsyncCall.run(RealCall.kt:517) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) at java.lang.Thread.run(Thread.java:923)

Doc1faux commented 2 years ago

Hi @francescogatto and thank you for your feedback. Can you precise me in which version this crash occurs? The only class we use directly in your provided stacktrace is okhttp3.logging.HttpLoggingInterceptor and our usage was removed in 1.0.8, so it should not happen since.

francescogatto commented 2 years ago

I'm going in production with the new sdk. I will update you!

Doc1faux commented 2 years ago

I close this issue as it seems resolved. I let you reopen it @francescogatto if you encounter it again ;)