You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a problem with retrieving data from my server using retrofit2.
While I was running my Android application on local server, data was retrieving properly.
I changed the server to external one, and then the problem occured.
My logCat:
java.io.EOFException: End of input at line 1 column 1
at com.google.gson.stream.JsonReader.nextNonWhitespace(JsonReader.java:1407)
at com.google.gson.stream.JsonReader.doPeek(JsonReader.java:553)
at com.google.gson.stream.JsonReader.peek(JsonReader.java:429)
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:201)
at retrofit2.converter.gson.GsonResponseBodyConverter.convert(GsonResponseBodyConverter.java:37)
at retrofit2.converter.gson.GsonResponseBodyConverter.convert(GsonResponseBodyConverter.java:25)
at retrofit2.ServiceMethod.toResponse(ServiceMethod.java:116)
at retrofit2.OkHttpCall.parseResponse(OkHttpCall.java:211)
at retrofit2.OkHttpCall$1.onResponse(OkHttpCall.java:106)
at okhttp3.RealCall$AsyncCall.execute(RealCall.java:135)
at okhttp3.internal.NamedRunnable.run(NamedRunnable.java:32)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:818)
An EOFException comes from the socket and indicates that the connection was terminated before all the data was available. Perhaps your server is timing out. This is not a problem with Retrofit, though.
Hello,
I have a problem with retrieving data from my server using retrofit2.
While I was running my Android application on local server, data was retrieving properly.
I changed the server to external one, and then the problem occured.
My logCat:
Retrofit class:
RequestInterface class:
Any solutions appreciated. Thanks!
The text was updated successfully, but these errors were encountered: