Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Retrofit/OkHttp api calls not completing: "read: unexpected EOF!" printed

I am using Rx to batch requests to an api. There are currently 5 calls being made. I have a line in my code that prints out when the responses return. When executing the code, I often find only 4 lines printed, meaning not all 5 calls completed. Taking a look in logcat, i see the following message:

read: unexpected EOF!

I came across this issue on github: https://github.com/square/retrofit/issues/1228

I tried adding @Streaming on top of the @GET request that is being used, but this did not seem to fix the issue.

Where can I start debugging this, and what might be the issue?

like image 456
Orbit Avatar asked May 29 '16 20:05

Orbit


1 Answers

I found a solution here https://sites.google.com/site/zhuoweisite/blog/fixingreadunexpectedeoferrorwhenusinglogcatonandroid80

execute this command on your terminal

adb logcat -G 1m
like image 174
Camerev Avatar answered Oct 31 '22 11:10

Camerev