Comments (8)
@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.
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.
@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.
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.
@yschimke Thank you, I’ll try to update to 5.x.x or 4.12.0 and tell the result.
from okhttp.
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.
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.
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)
- Unable to parse TLS packet header exception when using specific socks5 proxys HOT 1
- Potential failure on CallServerInterceptor if writeRequestHeader fails HOT 1
- Virtual thread pinning with 5.0.0-alpha.12 HOT 5
- Websocket connection failing few seconds after getting connected HOT 1
- How to cleanly pin a network HOT 1
- Dependency convergence issue with kotlin-stdlib-jdk8 (via okio) HOT 8
- Documentation: Is it possible to update the comment with more info HOT 1
- Check Cache headers against spec
- IllegalStateException: closed : HttpLoggingInterceptor.kt:248 HOT 1
- MockWebServer Dispatcher bug HOT 1
- Multiple async request do not store anything to cache HOT 1
- Add a means to reset Postponed Routes HOT 3
- Lets changes our OkHttp 5 async DNS APIs HOT 3
- Test MockWebServer with Loom
- Review tests failing on windows HOT 1
- The request body data added in the NetworkInterceptor was found not included in the capture by Charles. HOT 1
- The request body data added in the NetworkInterceptor was found not included in the capture by Charles
- Gzip/Deflate/Bortli not workin okhttp3 4.12.0/5.0.0-alpha12 HOT 5
- DiskLruCache entry?.currentEditor is allways not null for async requests HOT 1
- Documentation: Clearly state that OkHttpClient should be a singleton HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from okhttp.