Skip to content

ParseRequestException: i/o failure When I query more than 8 rows #326

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

Closed
sinhpn92 opened this issue Dec 31, 2015 · 14 comments
Closed

ParseRequestException: i/o failure When I query more than 8 rows #326

sinhpn92 opened this issue Dec 31, 2015 · 14 comments
Labels
type:bug Impaired feature or lacking behavior that is likely assumed

Comments

@sinhpn92
Copy link

I query to a className, I got error com.parse.ParseRequest$ParseRequestException: i/o failure. When the className have more than 8 rows I got this error, but when the className have less than 8 rows It works fine. I tried a options this is: When the className have more than 8 rows, I setLimit(8) for query It works fine, but when I setLimit more than 8 I got this error.
Version I used:
compile 'com.parse.bolts:bolts-android:1.+' compile 'com.parse:parse-android:1.+'
Please help me.

Update:
I test on two device: Genymotion device 4.3 it got this error. Genymotion device 5.1 It works fine.

@parse-github-bot
Copy link

Thank you for your feedback. We prioritize issues that have clear and concise repro steps. Please see our Bug Reporting Guidelines about what information should be added to this issue.

Please try the latest SDK. Our release notes have details about what issues were fixed in each release.

In addition, you might find the following resources helpful:

@grantland
Copy link
Contributor

Could you please include the entire stacktrace, the exact version of the Parse SDK you're using that this issue reproduces on, and a project that we can use to reproduce this issue with?

@sinhpn92
Copy link
Author

I import in gradle by below code:
compile 'com.parse.bolts:bolts-android:1.+
compile 'com.parse:parse-android:1.+
I checked in lib folder,the version of parse is 1.12.
When I use log:
Log.i(TAG, e.toString())
I got full strack is: com.parse.ParseRequest$ParseRequestException: i/o failure
I tried on project create by user display is Sinh Phan (pnsinh).
I don't know why on device 5.1 It works fine but on device 4.3 It error.
My query code below:
ParseQuery<ParseObject> query = ParseQuery.getQuery("Comment"); query.findInBackground(new FindCallback<ParseObject>() { public void done(List<ParseObject> commentList, ParseException e) { if (e == null) { Log.d("Comment", "Retrieved " + commentList.size() + " scores"); } else { Log.d("Comment", "Error: " + e.toString()); } } });

@grantland
Copy link
Contributor

A full stack trace has the entire stack, not just the error message. You can refer to other issues for examples. A working project that repros this is also still required.

@sinhpn92
Copy link
Author

sinhpn92 commented Jan 1, 2016

oh so sorry. My full stacktrade below:

com.parse.ParseRequest$ParseRequestException: i/o failure
at com.parse.ParseRequest.newTemporaryException(ParseRequest.java:289)
at com.parse.ParseRequest$2.then(ParseRequest.java:144)
at com.parse.ParseRequest$2.then(ParseRequest.java:138)
at bolts.Task$15.run(Task.java:839)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573)
at java.lang.Thread.run(Thread.java:841)
Caused by: java.io.IOException: unknown format (magic number 227b)
D/dalvikvm: GC_FOR_ALLOC freed 487K, 17% free 2927K/3520K, paused 3ms, total 5ms
at java.util.zip.GZIPInputStream.<init>(GZIPInputStream.java:101)
at java.util.zip.GZIPInputStream.<init>(GZIPInputStream.java:81)
at com.parse.ParseDecompressInterceptor.intercept(ParseDecompressInterceptor.java:40)
at com.parse.ParseHttpClient$ParseNetworkInterceptorChain.proceed(ParseHttpClient.java:147)
at com.parse.ParsePlugins$1.intercept(ParsePlugins.java:115)
at com.parse.ParseHttpClient$ParseNetworkInterceptorChain.proceed(ParseHttpClient.java:147)
at com.parse.ParseHttpClient.execute(ParseHttpClient.java:122)
at com.parse.ParseRequest$3.then(ParseRequest.java:135)
at com.parse.ParseRequest$3.then(ParseRequest.java:132)
at bolts.Task$15.run(Task.java:839)
at bolts.BoltsExecutors$ImmediateExecutor.execute(BoltsExecutors.java:105)
at bolts.Task.completeAfterTask(Task.java:830)
at bolts.Task.continueWithTask(Task.java:642)
at bolts.Task.continueWithTask(Task.java:653)
at bolts.Task$13.then(Task.java:745)
at bolts.Task$13.then(Task.java:733)
... 4 more

I tried test with example project at https://github.com/ParsePlatform/Parse-SDK-Android/releases/tag/1.12.0. But this error still occurs with my genymotion device 4.3.

@sinhpn92
Copy link
Author

sinhpn92 commented Jan 3, 2016

Please help me. I added more information

@diegoroval
Copy link

Hi. I run into this problem too. I assume it has to do with the last version of Parse because they are using another http client that is only fully compatible with Android 5.1 or superior. To make it work I am using the 1.11.0 version ( compile 'com.parse:parse-android:1.11.0' ). So far no problems.

@sinhpn92
Copy link
Author

sinhpn92 commented Jan 4, 2016

@Xelz: so with parse 1.11.0 It works fine?

@sinhpn92
Copy link
Author

sinhpn92 commented Jan 4, 2016

I tested with parse 1.11.0 on device 4.3, It works fine. Thanks @Xelz

@jjmaceda
Copy link

jjmaceda commented Jan 4, 2016

Any solution for the latest version?, yes is try if I downgrade to 1.11 works as expected, new version is not working on 4.3 at least

@pkarwat
Copy link

pkarwat commented Jan 4, 2016

I had the same problem with version '1.+'. But I think that it doesn`t depend on the number of rows. It depends on the size of receiving data (number of filled cells). Now with version of Parse 1.11.0 works fine on Android 4.1.2

@grantland
Copy link
Contributor

@wangmengyan95 can you take a look at this?

environments:

  1. Genymotion android-18
  2. Genymotion android-22

repro steps:

  1. create 8 objects
  2. query for all objects
  3. create 1 additional object
  4. query for all objects

expected results:

  • 1st query results in 8 objects, 2nd results in 9

actual results:

  • (env 1) 1st query results in 8 objects, 2nd query fails
  • (env 2) 1st query results in 8 objects, 2nd results in 9

code:

ParseQuery<ParseObject> query = new ParseQuery<>("TestObject");
ParseObject object;
int i = 0;

for (; i < 8; i++) {
  object = new ParseObject("TestObject");
  object.put("index", i);
  object.save();
}

Log.d("test", "objects: " + query.find().size());

for (; i < 9; i++) {
  object = new ParseObject("TestObject");
  object.put("index", i);
  object.save();
}

Log.d("test", "objects: " + query.find().size());

notes:

@grantland grantland added type:bug Impaired feature or lacking behavior that is likely assumed needs investigation and removed needs more info labels Jan 5, 2016
@wangmengyan95
Copy link
Contributor

@grantland sure, will do that.

@wangmengyan95
Copy link
Contributor

This is actually cause by we add unnecessary ParseDecompressInterceptor. Check #355 for details. The fix is included in 1.13.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug Impaired feature or lacking behavior that is likely assumed
Projects
None yet
Development

No branches or pull requests

7 participants