Open sealiasheq opened 6 years ago
I suspect might be related to https://github.com/square/okhttp/pull/7801, would suggest retesting on OkHttp 5.0.0-alpha12 (not available yet).
I have same issue
OkHttp 5.0.0-alpha3, RxJava2
I have 100% reproducibility.
We need Charles, we need to put a breakpoint in Charles on the request
When the timeout expires, there will be an error in the logcat, but the request will be repeated endlessly judging by Charles’ session
Therefore, the version of Nginx does not matter
If you remove the breakpoint, the request will be completed, but the result will not be processed in RxJava.
Adding OkHttpClient.Builder.retryOnConnectionFailure(false)
helped me, the error remains StreamResetException, but there is no longer an endless retray of requests. And don’t care about StreamResetException since it is instance of IOException
okhttp3.internal.http2.StreamResetException: stream was reset: INTERNAL_ERROR
at okhttp3.internal.http2.Http2Stream.takeHeaders(Http2Stream.kt:148)
at okhttp3.internal.http2.Http2ExchangeCodec.readResponseHeaders(Http2ExchangeCodec.kt:97)
at okhttp3.internal.connection.Exchange.readResponseHeaders(Exchange.kt:110)
at okhttp3.internal.http.CallServerInterceptor.intercept(CallServerInterceptor.kt:93)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
at com.finstar.pesoredee.http.curl.CurlInterceptor.intercept(CurlInterceptor.kt:36)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
at pesoredee.api.http.AuthInterceptor.intercept(HttpClient.kt:119)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
at pesoredee.api.http.HeadersInterceptor.intercept(HeadersInterceptor.kt:38)
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:96)
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 pesoredee.api.http.HostInterceptor.intercept(HttpClient.kt:96)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
at okhttp3.internal.connection.RealCall.getResponseWithInterceptorChain$okhttp(RealCall.kt:202)
at okhttp3.internal.connection.RealCall$AsyncCall.run(RealCall.kt:518)
Any progress? becuase my some user face this type of error while downloading large json data from stream api. It happens sometime and in some users' device.
i have no idea to reproduce it by my own and in my android device.
any progress on this?
okhttp3.internal.http2.StreamResetException: stream was reset: INTERNAL_ERROR
at okhttp3.internal.http2.Http2Stream.takeHeaders(Http2Stream.kt:148)
at okhttp3.internal.http2.Http2ExchangeCodec.readResponseHeaders(Http2ExchangeCodec.kt:97)
at okhttp3.internal.connection.Exchange.readResponseHeaders(Exchange.kt:110)
at okhttp3.internal.http.CallServerInterceptor.intercept(CallServerInterceptor.kt:93)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
at com.finstar.pesoredee.http.curl.CurlInterceptor.intercept(CurlInterceptor.kt:36)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
at pesoredee.api.http.AuthInterceptor.intercept(HttpClient.kt:119)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
at pesoredee.api.http.HeadersInterceptor.intercept(HeadersInterceptor.kt:38)
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:96)
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 pesoredee.api.http.HostInterceptor.intercept(HttpClient.kt:96)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
at okhttp3.internal.connection.RealCall.getResponseWithInterceptorChain$okhttp(RealCall.kt:202)
at okhttp3.internal.connection.RealCall$AsyncCall.run(RealCall.kt:518)
I am connecting to web service with last version
retrofit
but get me bellow error :okhttp3.internal.http2.StreamResetException: stream was reset: PROTOCOL_ERROR
My code is like bellow :
And
And