Coder Social home page Coder Social logo

Comments (8)

valdvit avatar valdvit commented on June 1, 2024 1

@yschimke @swankjesse
Updating from version 4.10.0 to 5.0.0-alpha.12 resolved the issue, no more crashes appear. Thank you for your help!

from okhttp.

swankjesse avatar swankjesse commented on June 1, 2024

what changed 2 weeks ago?

Wanna upgrade to the latest OkHttp release? The 5.x code is stable; only the APIs are incomplete.

from okhttp.

valdvit avatar valdvit commented on June 1, 2024

@swankjesse Nothing changed at all. Neither on the Android side, nor on the server.

We would definitely upgrade to a newer release, but it pulls other dependencies like the Kotlin version and requires a huge amount of work to update the whole project. We're looking for a possible workaround just to stabilize our production which, has been working correctly for more than 4 months.

from okhttp.

yschimke avatar yschimke commented on June 1, 2024

There are bug fixes including for websocket race conditions in 4.12.0 that definitely could be relevant. So it's probably worth checking if 4.12.0 fixes it.

from okhttp.

valdvit avatar valdvit commented on June 1, 2024

@yschimke Thank you, I’ll try to update to 5.x.x or 4.12.0 and tell the result.

from okhttp.

swankjesse avatar swankjesse commented on June 1, 2024

Note that you can depend on OkHttp 5.x without changing your own project’s Kotlin compiler version. The newer Kotlin stdlib interops fine with code compiled with the older compiler.

from okhttp.

verticelo avatar verticelo commented on June 1, 2024

We have seen this issue as well since about the 19th of January for the React Native 0.72 version for an app with many users. Nothing was changed on the server side nor client side and all of a sudden we started to get a flood of crashes.

Yes yes, I know how it sounds that "nothing was changed". We didn't at least push any new application code but we have automatic OS updates on all the Ubuntu servers which might have caused something to change, alternatively AWS load balancers etc might have changed or OS updates on Android.

We will try to upgrade to a newer OkHttp to see if that resolves it but it would be nice to understand what actually caused it.

Fatal Exception: java.lang.IllegalStateException: Unbalanced enter/exit
       at okio.AsyncTimeout$Companion.scheduleTimeout(AsyncTimeout.kt:225)
       at okio.AsyncTimeout$Companion.access$scheduleTimeout(AsyncTimeout.kt:201)
       at okio.AsyncTimeout.enter(AsyncTimeout.kt:54)
       at okio.AsyncTimeout$source$1.read(AsyncTimeout.kt:331)
       at okio.RealBufferedSource.indexOf(RealBufferedSource.kt:427)
       at okio.RealBufferedSource.readUtf8LineStrict(RealBufferedSource.kt:320)
       at okhttp3.internal.http1.HeadersReader.readLine(HeadersReader.kt:29)
       at okhttp3.internal.http1.Http1ExchangeCodec.readResponseHeaders(Http1ExchangeCodec.kt:178)
       at okhttp3.internal.connection.Exchange.readResponseHeaders(Exchange.kt:106)
       at okhttp3.internal.http.CallServerInterceptor.intercept(CallServerInterceptor.kt:79)
       at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
       at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.kt:34)
       at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
       at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.kt:95)
       at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
       at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.kt:83)
       at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
       at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.kt:76)
       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:1145)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644)
       at java.lang.Thread.run(Thread.java:1012)

from okhttp.

yschimke avatar yschimke commented on June 1, 2024

There were some race condition bugs now fixed in 4.12.0. one is relevant if you use web sockets.

Otherwise it's likely to be a threading issue in your app, hopefully not since it was working before.

Server changes including any intermediate http proxies you have may change conditions so you now hit this. So client changes are not required to change the code path.

from okhttp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.