Orbit
Orbit

Reputation: 2385

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?

Upvotes: 5

Views: 5312

Answers (2)

Jayesh Dankhara
Jayesh Dankhara

Reputation: 829

In manifest.xml set

android:largeHeap="true"

this is working for me

Upvotes: 0

Camerev
Camerev

Reputation: 177

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

execute this command on your terminal

adb logcat -G 1m

Upvotes: 11

Related Questions