Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The response not closed if this exceptions, I think #2990

Closed
gMan1990 opened this issue Dec 17, 2018 · 6 comments
Closed

The response not closed if this exceptions, I think #2990

gMan1990 opened this issue Dec 17, 2018 · 6 comments

Comments

@gMan1990
Copy link

gMan1990 commented Dec 17, 2018

java.net.ProtocolException: Expected leading [0-9a-fA-F] character but was 0x48
	at okhttp3.internal.http1.Http1Codec$ChunkedSource.readChunkSize(Http1Codec.java:476) ~[okhttp-3.10.0.jar:?]
	at okhttp3.internal.http1.Http1Codec$ChunkedSource.read(Http1Codec.java:449) ~[okhttp-3.10.0.jar:?]
	at okio.RealBufferedSource.read(RealBufferedSource.java:47) ~[okio-1.14.0.jar:?]
	at okio.RealBufferedSource.exhausted(RealBufferedSource.java:57) ~[okio-1.14.0.jar:?]
	at okio.InflaterSource.refill(InflaterSource.java:102) ~[okio-1.14.0.jar:?]
	at okio.InflaterSource.read(InflaterSource.java:62) ~[okio-1.14.0.jar:?]
	at okio.GzipSource.read(GzipSource.java:80) ~[okio-1.14.0.jar:?]
	at okio.RealBufferedSource.request(RealBufferedSource.java:68) ~[okio-1.14.0.jar:?]
	at okhttp3.logging.HttpLoggingInterceptor.intercept(HttpLoggingInterceptor.java:241) ~[logging-interceptor-3.10.0.jar:?]
	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147) ~[okhttp-3.10.0.jar:?]
	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121) ~[okhttp-3.10.0.jar:?]
	at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:200) ~[okhttp-3.10.0.jar:?]
	at okhttp3.RealCall.execute(RealCall.java:77) ~[okhttp-3.10.0.jar:?]
	at retrofit2.OkHttpCall.execute(OkHttpCall.java:180) ~[retrofit-2.4.0.jar:?]
	at ***
	... 5 more
java.io.IOException: gzip finished without exhausting source
	at okio.GzipSource.read(GzipSource.java:100) ~[okio-1.14.0.jar:?]
	at okio.RealBufferedSource.request(RealBufferedSource.java:68) ~[okio-1.14.0.jar:?]
	at okhttp3.logging.HttpLoggingInterceptor.intercept(HttpLoggingInterceptor.java:241) ~[logging-interceptor-3.10.0.jar:?]
	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147) ~[okhttp-3.10.0.jar:?]
	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121) ~[okhttp-3.10.0.jar:?]
	at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:200) ~[okhttp-3.10.0.jar:?]
	at okhttp3.RealCall.execute(RealCall.java:77) ~[okhttp-3.10.0.jar:?]
	at retrofit2.OkHttpCall.execute(OkHttpCall.java:180) ~[retrofit-2.4.0.jar:?]
	at ***
	... 5 more
java.io.EOFException
	at okio.RealBufferedSource.require(RealBufferedSource.java:61) ~[okio-1.14.0.jar:?]
	at okio.RealBufferedSource.readHexadecimalUnsignedLong(RealBufferedSource.java:304) ~[okio-1.14.0.jar:?]
	at okhttp3.internal.http1.Http1Codec$ChunkedSource.readChunkSize(Http1Codec.java:469) ~[okhttp-3.10.0.jar:?]
	at okhttp3.internal.http1.Http1Codec$ChunkedSource.read(Http1Codec.java:449) ~[okhttp-3.10.0.jar:?]
	at okio.RealBufferedSource.read(RealBufferedSource.java:47) ~[okio-1.14.0.jar:?]
	at okio.RealBufferedSource.exhausted(RealBufferedSource.java:57) ~[okio-1.14.0.jar:?]
	at okio.InflaterSource.refill(InflaterSource.java:102) ~[okio-1.14.0.jar:?]
	at okio.InflaterSource.read(InflaterSource.java:62) ~[okio-1.14.0.jar:?]
	at okio.GzipSource.read(GzipSource.java:80) ~[okio-1.14.0.jar:?]
	at okio.RealBufferedSource.request(RealBufferedSource.java:68) ~[okio-1.14.0.jar:?]
	at okhttp3.logging.HttpLoggingInterceptor.intercept(HttpLoggingInterceptor.java:241) ~[logging-interceptor-3.10.0.jar:?]
	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147) ~[okhttp-3.10.0.jar:?]
	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121) ~[okhttp-3.10.0.jar:?]
	at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:200) ~[okhttp-3.10.0.jar:?]
	at okhttp3.RealCall.execute(RealCall.java:77) ~[okhttp-3.10.0.jar:?]
	at retrofit2.OkHttpCall.execute(OkHttpCall.java:180) ~[retrofit-2.4.0.jar:?]
	at ***
	... 5 more
@gMan1990 gMan1990 changed the title The response not closed if this exceptions ... The response not closed if this exceptions, I think Dec 17, 2018
@gMan1990
Copy link
Author

java.io.InterruptedIOException: thread interrupted
	at okio.Timeout.throwIfReached(Timeout.java:145) ~[okio-1.14.0.jar:?]
	at okio.Okio$2.read(Okio.java:137) ~[okio-1.14.0.jar:?]
	at okio.AsyncTimeout$2.read(AsyncTimeout.java:237) ~[okio-1.14.0.jar:?]
	at okio.RealBufferedSource.request(RealBufferedSource.java:68) ~[okio-1.14.0.jar:?]
	at okio.RealBufferedSource.require(RealBufferedSource.java:61) ~[okio-1.14.0.jar:?]
	at okio.RealBufferedSource.readHexadecimalUnsignedLong(RealBufferedSource.java:304) ~[okio-1.14.0.jar:?]
	at okhttp3.internal.http1.Http1Codec$ChunkedSource.readChunkSize(Http1Codec.java:469) ~[okhttp-3.10.0.jar:?]
	at okhttp3.internal.http1.Http1Codec$ChunkedSource.read(Http1Codec.java:449) ~[okhttp-3.10.0.jar:?]
	at okio.RealBufferedSource.read(RealBufferedSource.java:47) ~[okio-1.14.0.jar:?]
	at okio.RealBufferedSource.exhausted(RealBufferedSource.java:57) ~[okio-1.14.0.jar:?]
	at okio.InflaterSource.refill(InflaterSource.java:102) ~[okio-1.14.0.jar:?]
	at okio.InflaterSource.read(InflaterSource.java:62) ~[okio-1.14.0.jar:?]
	at okio.GzipSource.read(GzipSource.java:80) ~[okio-1.14.0.jar:?]
	at okio.RealBufferedSource.request(RealBufferedSource.java:68) ~[okio-1.14.0.jar:?]
	at okhttp3.logging.HttpLoggingInterceptor.intercept(HttpLoggingInterceptor.java:241) ~[logging-interceptor-3.10.0.jar:?]
	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147) ~[okhttp-3.10.0.jar:?]
	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121) ~[okhttp-3.10.0.jar:?]
	at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:200) ~[okhttp-3.10.0.jar:?]
	at okhttp3.RealCall.execute(RealCall.java:77) ~[okhttp-3.10.0.jar:?]
	at retrofit2.OkHttpCall.execute(OkHttpCall.java:180) ~[retrofit-2.4.0.jar:?]
	at ***
	... 6 more

@JakeWharton
Copy link
Member

What converters are you using? The only way this could occur at the Retrofit layer is if you are using a converter that is not closing the body (or using @Streaming and not closing it yourself).

@gMan1990
Copy link
Author

@JakeWharton Not related to the converter, bug in HttpLoggingInterceptor.java, see square/okhttp#4447

@JakeWharton
Copy link
Member

Perfect. Thanks.

@gMan1990
Copy link
Author

@JakeWharton but the square/okhttp#4447 just add label Needs Info for it.
Do you think this is a bug that I reported?

@JakeWharton
Copy link
Member

JakeWharton commented Jan 24, 2019 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants