okhttp: EOFException in RealBufferedSource.readUtf8LineStrict
A few people have reported this. Needs investigation & fix.
java.io.EOFException: null
at okio.RealBufferedSource.readUtf8LineStrict(RealBufferedSource.java:154) ~[na:0.0]
at com.squareup.okhttp.internal.http.HttpConnection.readResponse(HttpConnection.java:189) ~[na:0.0]
at com.squareup.okhttp.internal.http.HttpTransport.readResponseHeaders(HttpTransport.java:101) ~[na:0.0]
at com.squareup.okhttp.internal.http.HttpEngine.readResponse(HttpEngine.java:676) ~[na:0.0]
at com.squareup.okhttp.internal.huc.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:426) ~[na:0.0]
at com.squareup.okhttp.internal.huc.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:371) ~[na:0.0]
at com.squareup.okhttp.internal.huc.HttpURLConnectionImpl.getResponseCode(HttpURLConnectionImpl.java:466) ~[na:0.0]
at com.squareup.okhttp.internal.huc.DelegatingHttpsURLConnection.getResponseCode(DelegatingHttpsURLConnection.java:105) ~[na:0.0]
About this issue
- Original URL
- State: closed
- Created 10 years ago
- Comments: 101 (21 by maintainers)
Links to this issue
Commits related to this issue
- Provide context on unexpected EOFs. https://github.com/square/okhttp/issues/1114 — committed to square/okhttp by swankjesse 9 years ago
- Provide context on unexpected EOFs. https://github.com/square/okhttp/issues/1114 — committed to square/okhttp by swankjesse 9 years ago
- Set vmSafeMode to "true" This is test solution for Enforta from this issue comment: https://github.com/square/okhttp/issues/1114#issuecomment-129954374 — committed to mosmetro-android/mosmetro-android by TheDrHax 8 years ago
Getting this error when trying to call a JSON service from a Nexus 5 Lollipop emulator using a http proxy. It seems to work on an actual Nexus 5 device without proxy.
Originally I was using a DefaultHttpClient.execute() with a Proxy set in the params. This worked. Removing the proxy and defining it via emulator parameters gives me this error.
Update: Different service (offering xml) works with the exact same call.
Any specific reason for this kind of EOF Exception error occurrence (using retrofit) ??? we all know this is issue facing with all, but i want to know exact problem behind this kind of issue.
An update that maybe help others.
I had the same issue for a long time. Since i updated to retrofit v1.9.0, okhttp 2.2.0, urlconnection 2.2.0 i haven’t encountered the problem since.