-
Notifications
You must be signed in to change notification settings - Fork 71
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
volley return a exception... #121
Comments
Can you give us more detail please? Is it POST, GET etc and what is the size of data being sent/received or any more information that we can recreate the issue |
I just want "https://api.github.com/" this url's json string, I use GET ,but no params...but in log the return body like this:������������������Mn�0���¢�(�G�r������&�ЈZܽ3��H%�l�,�7���qY1���������.Y��ۋ��W�Ja=�΅n���i/���ڨ��Jw6��m^�l�X@T]eE�� in WaspApplication:
in MyService:
in my WeatherActivity.class
let's my log: 08-22 22:06:24.845 3738-3738/com.orhanobut.waspsample I/Timeline﹕ Timeline: Activity_launch_request id:com.orhanobut.waspsample time:16881751 |
You need to provide custom type to wasp in order to parse it, in your case callback should have something like below. class GithubApi {
// fields
} @GET("/")
WaspRequest postCityWeather(
Callback<GithubApi> callback
); |
I follow your suggest,I add GitHubBean.class and use it , but in the end no effective...
and in MyService:
That's the first time log:(no body return)
then i close the app , restart the app , the log like this:(it happen again)
|
Let me reproduce it, it looks like a different problem occurs |
Shouldn't the interface definition should be like with void return.
|
@tasomaniac WaspRequest is a special case which you are able to cancel the request, https://github.com/orhanobut/wasp/wiki/Request-cancelation It looks like retry policy issue, but still need to check thoroughly. |
08-22 20:25:05.565 12211-12225/com.orhanobut.waspsample E/Volley﹕ [2044] NetworkDispatcher.run: Unhandled exception java.lang.IllegalStateException: closed
java.lang.IllegalStateException: closed
at okio.RealBufferedSource.read(RealBufferedSource.java:47)
at okio.RealBufferedSource.request(RealBufferedSource.java:71)
at okio.RealBufferedSource.require(RealBufferedSource.java:64)
at okio.GzipSource.consumeHeader(GzipSource.java:114)
at okio.GzipSource.read(GzipSource.java:73)
at okio.RealBufferedSource$1.read(RealBufferedSource.java:349)
at java.io.InputStream.read(InputStream.java:162)
at com.android.volley.toolbox.BasicNetwork.entityToBytes(BasicNetwork.java:253)
at com.android.volley.toolbox.BasicNetwork.performRequest(BasicNetwork.java:129)
at com.android.volley.NetworkDispatcher.run(NetworkDispatcher.java:112)
The text was updated successfully, but these errors were encountered: