Skip to content

ParseRequestException: i/o failure in ParseDecompressInterceptor on 1.12.0 on API<19 devices #355

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
aphexcx opened this issue Jan 19, 2016 · 13 comments · Fixed by #358
Closed
Labels
type:bug Impaired feature or lacking behavior that is likely assumed

Comments

@aphexcx
Copy link

aphexcx commented Jan 19, 2016

I (and other developers) are getting errors with 1.12.0 on older devices (seemingly API 19 and below). http://stackoverflow.com/questions/34561280/android-parse-sdk-i-o-failure-unknown-format-magic-number-227b

My stacktrace, from an API 18 device:

01-19 01:43:23.035 22904-22904/io.givenow.app W/System.err: com.parse.ParseRequest$ParseRequestException: i/o failure
01-19 01:43:23.035 22904-22904/io.givenow.app W/System.err:     at com.parse.ParseRequest.newTemporaryException(ParseRequest.java:289)
01-19 01:43:23.035 22904-22904/io.givenow.app W/System.err:     at com.parse.ParseRequest$2.then(ParseRequest.java:144)
01-19 01:43:23.035 22904-22904/io.givenow.app W/System.err:     at com.parse.ParseRequest$2.then(ParseRequest.java:138)
01-19 01:43:23.035 22904-22904/io.givenow.app W/System.err:     at bolts.Task$15.run(Task.java:839)
01-19 01:43:23.045 22904-22904/io.givenow.app W/System.err:     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)
01-19 01:43:23.045 22904-22904/io.givenow.app W/System.err:     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573)
01-19 01:43:23.045 22904-22904/io.givenow.app W/System.err:     at java.lang.Thread.run(Thread.java:841)
01-19 01:43:23.045 22904-22904/io.givenow.app W/System.err: Caused by: java.io.IOException: unknown format (magic number 227b)
01-19 01:43:23.045 22904-22904/io.givenow.app W/System.err:     at java.util.zip.GZIPInputStream.<init>(GZIPInputStream.java:101)
01-19 01:43:23.045 22904-22904/io.givenow.app W/System.err:     at java.util.zip.GZIPInputStream.<init>(GZIPInputStream.java:81)
01-19 01:43:23.045 22904-22904/io.givenow.app W/System.err:     at com.parse.ParseDecompressInterceptor.intercept(ParseDecompressInterceptor.java:40)
01-19 01:43:23.045 22904-22904/io.givenow.app W/System.err:     at com.parse.ParseHttpClient$ParseNetworkInterceptorChain.proceed(ParseHttpClient.java:147)
01-19 01:43:23.045 22904-22904/io.givenow.app W/System.err:     at com.parse.ParsePlugins$1.intercept(ParsePlugins.java:115)
01-19 01:43:23.045 22904-22904/io.givenow.app W/System.err:     at com.parse.ParseHttpClient$ParseNetworkInterceptorChain.proceed(ParseHttpClient.java:147)
01-19 01:43:23.045 22904-22904/io.givenow.app W/System.err:     at com.parse.ParseHttpClient.execute(ParseHttpClient.java:122)
01-19 01:43:23.045 22904-22904/io.givenow.app W/System.err:     at com.parse.ParseRequest$3.then(ParseRequest.java:135)
01-19 01:43:23.045 22904-22904/io.givenow.app W/System.err:     at com.parse.ParseRequest$3.then(ParseRequest.java:132)
01-19 01:43:23.045 22904-22904/io.givenow.app W/System.err:     at bolts.Task$15.run(Task.java:839)
01-19 01:43:23.045 22904-22904/io.givenow.app W/System.err:     at bolts.BoltsExecutors$ImmediateExecutor.execute(BoltsExecutors.java:105)
01-19 01:43:23.045 22904-22904/io.givenow.app W/System.err:     at bolts.Task.completeAfterTask(Task.java:830)
01-19 01:43:23.045 22904-22904/io.givenow.app W/System.err:     at bolts.Task.continueWithTask(Task.java:642)
01-19 01:43:23.045 22904-22904/io.givenow.app W/System.err:     at bolts.Task.continueWithTask(Task.java:653)
01-19 01:43:23.045 22904-22904/io.givenow.app W/System.err:     at bolts.Task$13.then(Task.java:745)
01-19 01:43:23.045 22904-22904/io.givenow.app W/System.err:     at bolts.Task$13.then(Task.java:733)
01-19 01:43:23.055 22904-22904/io.givenow.app W/System.err:     ... 4 more
01-19 01:43:23.055 22904-22904/io.givenow.app D/ErrorDialogs: Error caused by: 
01-19 01:43:23.055 22904-22904/io.givenow.app W/System.err: java.io.IOException: unknown format (magic number 227b)
01-19 01:43:23.055 22904-22904/io.givenow.app W/System.err:     at java.util.zip.GZIPInputStream.<init>(GZIPInputStream.java:101)
01-19 01:43:23.055 22904-22904/io.givenow.app W/System.err:     at java.util.zip.GZIPInputStream.<init>(GZIPInputStream.java:81)
01-19 01:43:23.055 22904-22904/io.givenow.app W/System.err:     at com.parse.ParseDecompressInterceptor.intercept(ParseDecompressInterceptor.java:40)
01-19 01:43:23.055 22904-22904/io.givenow.app W/System.err:     at com.parse.ParseHttpClient$ParseNetworkInterceptorChain.proceed(ParseHttpClient.java:147)
01-19 01:43:23.055 22904-22904/io.givenow.app W/System.err:     at com.parse.ParsePlugins$1.intercept(ParsePlugins.java:115)
01-19 01:43:23.055 22904-22904/io.givenow.app W/System.err:     at com.parse.ParseHttpClient$ParseNetworkInterceptorChain.proceed(ParseHttpClient.java:147)
01-19 01:43:23.055 22904-22904/io.givenow.app W/System.err:     at com.parse.ParseHttpClient.execute(ParseHttpClient.java:122)
01-19 01:43:23.055 22904-22904/io.givenow.app W/System.err:     at com.parse.ParseRequest$3.then(ParseRequest.java:135)
01-19 01:43:23.055 22904-22904/io.givenow.app W/System.err:     at com.parse.ParseRequest$3.then(ParseRequest.java:132)
01-19 01:43:23.055 22904-22904/io.givenow.app W/System.err:     at bolts.Task$15.run(Task.java:839)
01-19 01:43:23.055 22904-22904/io.givenow.app W/System.err:     at bolts.BoltsExecutors$ImmediateExecutor.execute(BoltsExecutors.java:105)
01-19 01:43:23.055 22904-22904/io.givenow.app W/System.err:     at bolts.Task.completeAfterTask(Task.java:830)
01-19 01:43:23.055 22904-22904/io.givenow.app W/System.err:     at bolts.Task.continueWithTask(Task.java:642)
01-19 01:43:23.055 22904-22904/io.givenow.app W/System.err:     at bolts.Task.continueWithTask(Task.java:653)
01-19 01:43:23.055 22904-22904/io.givenow.app W/System.err:     at bolts.Task$13.then(Task.java:745)
01-19 01:43:23.055 22904-22904/io.givenow.app W/System.err:     at bolts.Task$13.then(Task.java:733)
01-19 01:43:23.055 22904-22904/io.givenow.app W/System.err:     at bolts.Task$15.run(Task.java:839)
01-19 01:43:23.055 22904-22904/io.givenow.app W/System.err:     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)
01-19 01:43:23.055 22904-22904/io.givenow.app W/System.err:     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573)
01-19 01:43:23.055 22904-22904/io.givenow.app W/System.err:     at java.lang.Thread.run(Thread.java:841)
@aphexcx
Copy link
Author

aphexcx commented Jan 19, 2016

Seems to be similar to #325.

aphexcx added a commit to GiveNow/givenow-android that referenced this issue Jan 19, 2016
…d#355 and convert the DonationCategory fetch to an Observable.
@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:

@wangmengyan95
Copy link
Contributor

Hi @aphexcx, could you try ParseLogInterceptor and paste your request here?

@aphexcx
Copy link
Author

aphexcx commented Jan 20, 2016

Added it (version 0.0.2) and the problem went away. Very strange how adding the interceptor made the query work, like what happened to the guy in #326. I expected it to still fail, but show some additional logging.

Here's the ParseLogInterceptor log. As you can see, the query succeeds after a few errors (looks like it retries):

01-19 17:31:23.120 6645-12614/io.givenow.app I/ParseLogInterceptor: Type : Request
01-19 17:31:23.120 6645-12614/io.givenow.app I/ParseLogInterceptor: Request-Id : 5
01-19 17:31:23.120 6645-12614/io.givenow.app I/ParseLogInterceptor: Url : https://api.parse.com/1/classes/DonationCategory
01-19 17:31:23.120 6645-12614/io.givenow.app I/ParseLogInterceptor: Method : POST
01-19 17:31:23.120 6645-12614/io.givenow.app I/ParseLogInterceptor: Headers : {X-Parse-Application-Id=*redacted*, X-Parse-App-Display-Version=0.3.2, X-Parse-Installation-Id=1443bd16-cf3b-4f51-aff8-b0bba90192ef, Content-Length=48, X-Parse-OS-Version=4.3, User-Agent=Parse Android SDK 1.12.0 (io.givenow.app/6) API Level 18, Content-Type=application/json, X-Parse-Client-Key=*redacted*, X-Parse-Client-Version=a1.12.0, X-Parse-Session-Token=r:aRBob7yeDe4FKBp9LHFOLrJp4, X-Parse-App-Build-Version=6}
01-19 17:31:23.120 6645-12614/io.givenow.app I/ParseLogInterceptor: Body : {
                                                                        "order": "priority",
                                                                        "limit": "9",
                                                                        "_method": "GET"
                                                                    }
01-19 17:31:23.120 6645-12614/io.givenow.app I/ParseLogInterceptor: --------------
01-19 17:31:23.130 6645-6735/io.givenow.app I/GAv4: Dry run enabled. Would have sent hit: ht=1453253483135, _v=ma8.2.98, a=1797430685, aid=io.givenow.app, an=Give Now, av=0.3.2, cd=MainActivity, cid=68da225b-8f73-4e2a-85d2-a9759c58c18c, ea=BottomButtonClicked, ec=RequestPickup, el=withConfirmAddressShowing, sr=768x1184, t=event, tid=UA-70870403-1, ul=de-de, v=1
01-19 17:31:23.130 6645-12614/io.givenow.app I/ParseLogInterceptor: Type : Error
01-19 17:31:23.130 6645-12614/io.givenow.app I/ParseLogInterceptor: Request-Id : 5
01-19 17:31:23.130 6645-12614/io.givenow.app I/ParseLogInterceptor: Error : The target server failed to respond
01-19 17:31:23.140 6645-12614/io.givenow.app I/ParseLogInterceptor: --------------
01-19 17:31:24.171 6645-12634/io.givenow.app I/ParseLogInterceptor: Type : Request
01-19 17:31:24.171 6645-12634/io.givenow.app I/ParseLogInterceptor: Request-Id : 6
01-19 17:31:24.171 6645-12634/io.givenow.app I/ParseLogInterceptor: Url : https://api.parse.com/1/classes/DonationCategory
01-19 17:31:24.181 6645-12634/io.givenow.app I/ParseLogInterceptor: Method : POST
01-19 17:31:24.181 6645-12634/io.givenow.app I/ParseLogInterceptor: Headers : {X-Parse-Application-Id=*redacted*, X-Parse-App-Display-Version=0.3.2, X-Parse-Installation-Id=1443bd16-cf3b-4f51-aff8-b0bba90192ef, Content-Length=48, X-Parse-OS-Version=4.3, User-Agent=Parse Android SDK 1.12.0 (io.givenow.app/6) API Level 18, Content-Type=application/json, X-Parse-Client-Key=*redacted*, X-Parse-Client-Version=a1.12.0, X-Parse-Session-Token=r:aRBob7yeDe4FKBp9LHFOLrJp4, X-Parse-App-Build-Version=6}
01-19 17:31:24.181 6645-12634/io.givenow.app I/ParseLogInterceptor: Body : {
                                                                        "order": "priority",
                                                                        "limit": "9",
                                                                        "_method": "GET"
                                                                    }
01-19 17:31:24.181 6645-12634/io.givenow.app I/ParseLogInterceptor: --------------
01-19 17:31:24.191 6645-12634/io.givenow.app I/ParseLogInterceptor: Type : Error
01-19 17:31:24.191 6645-12634/io.givenow.app I/ParseLogInterceptor: Request-Id : 6
01-19 17:31:24.191 6645-12634/io.givenow.app I/ParseLogInterceptor: Error : The target server failed to respond
01-19 17:31:24.191 6645-12634/io.givenow.app I/ParseLogInterceptor: --------------
01-19 17:31:26.263 6645-12672/io.givenow.app I/ParseLogInterceptor: Type : Request
01-19 17:31:26.263 6645-12672/io.givenow.app I/ParseLogInterceptor: Request-Id : 7
01-19 17:31:26.263 6645-12672/io.givenow.app I/ParseLogInterceptor: Url : https://api.parse.com/1/classes/DonationCategory
01-19 17:31:26.263 6645-12672/io.givenow.app I/ParseLogInterceptor: Method : POST
01-19 17:31:26.263 6645-12672/io.givenow.app I/ParseLogInterceptor: Headers : {X-Parse-Application-Id=*redacted*, X-Parse-App-Display-Version=0.3.2, X-Parse-Installation-Id=1443bd16-cf3b-4f51-aff8-b0bba90192ef, Content-Length=48, X-Parse-OS-Version=4.3, User-Agent=Parse Android SDK 1.12.0 (io.givenow.app/6) API Level 18, Content-Type=application/json, X-Parse-Client-Key=*redacted*, X-Parse-Client-Version=a1.12.0, X-Parse-Session-Token=r:aRBob7yeDe4FKBp9LHFOLrJp4, X-Parse-App-Build-Version=6}
01-19 17:31:26.273 6645-12672/io.givenow.app I/ParseLogInterceptor: Body : {
                                                                        "order": "priority",
                                                                        "limit": "9",
                                                                        "_method": "GET"
                                                                    }
01-19 17:31:26.273 6645-12672/io.givenow.app I/ParseLogInterceptor: --------------
01-19 17:31:27.084 6645-12689/io.givenow.app I/ParseLogInterceptor: Type : Response
01-19 17:31:27.084 6645-12689/io.givenow.app I/ParseLogInterceptor: Request-Id : 7
01-19 17:31:27.084 6645-12689/io.givenow.app I/ParseLogInterceptor: Status-Code : 200
01-19 17:31:27.084 6645-12689/io.givenow.app I/ParseLogInterceptor: Reason-Phrase : OK
01-19 17:31:27.084 6645-12689/io.givenow.app I/ParseLogInterceptor: Headers : {X-Runtime=0.036934, Date=Wed, 20 Jan 2016 01:31:21 GMT, Access-Control-Allow-Origin=*, Content-Length=1772, Content-Encoding=gzip, X-Parse-Platform=G1, Access-Control-Allow-Methods=*, Connection=keep-alive, Content-Type=application/json; charset=utf-8, Server=nginx/1.6.0}
01-19 17:31:27.084 6645-12689/io.givenow.app I/ParseLogInterceptor: Body : {
                                                                        "results": [
                                                                            {
                                                                                "updatedAt": "2015-12-03T02:36:07.878Z",
                                                                                "description_en": "Usable smartphones with charger (minor damages are fine, screen should be readable)",
                                                                                "name_en": "Smartphones",
                                                                                "priority": 1,
                                                                                "objectId": "VIpnivgheS",
                                                                                "createdAt": "2015-10-15T19:41:07.516Z",
                                                                                "image": {
                                                                                    "__type": "File",
                                                                                    "url": "http:\/\/files.parsetfss.com\/211d3173-3c6e-4dee-b1d5-ff3165b998f2\/tfss-66c004fa-09e9-4d34-920a-287dc59d4510-iphone-android.png",
                                                                                    "name": "tfss-66c004fa-09e9-4d34-920a-287dc59d4510-iphone-android.png"
                                                                                },
                                                                                "name_de": "Smartphones",
                                                                                "description_de": "Benutzbare Handys mit Ladegeräten (kleinere Schäden sind okay, der Bildschirm sollte lesbar sein)"
                                                                            },
                                                                            {
                                                                                "updatedAt": "2015-12-03T02:37:10.375Z",
                                                                                "description_en": "clean and warm blankets please!",
                                                                                "name_en": "Blankets",
                                                                                "priority": 2,
                                                                                "objectId": "AueHgAtywz",
                                                                                "createdAt": "2015-10-15T12:38:38.222Z",
                                                                                "image": {
                                                                                    "__type": "File",
                                                                                    "url": "http:\/\/files.parsetfss.com\/211d3173-3c6e-4dee-b1d5-ff3165b998f2\/tfss-28ce952c-471c-48aa-99a7-9e1f10b0285e-blanket.jpg",
                                                                                    "name": "tfss-28ce952c-471c-48aa-99a7-9e1f10b0285e-blanket.jpg"
                                                                                },
                                                                                "name_de": "Decken",
                                                                                "description_de": "saubere und warme Decken (zB  Wolldecken,Rettungsdecken, etc.)"
                                                                            },
                                                                            {
                                                                                "updatedAt": "2015-12-03T02:36:46.921Z",
                                                                                "description_en": "Usable travel bags (duffle bags, travel gear, backpacks, etc)",
                                                                                "name_en": "Travel bags",
                                                                                "priority": 3,
                                                                                "objectId": "Gjnp4N9oSl",
                                                                                "createdAt": "2015-10-15T17:19:57.291Z",
                                                                                "image": {
                                                                                    "__type": "File",
                                                                                    "url": "http:\/\/files.parsetfss.com\/211d3173-3c6e-4dee-b1d5-ff3165b998f2\/tfss-bade19e2-21c9-462d-874f-b0a2bcb8c467-travelbags.jpg",
                                                                                    "name": "tfss-bade19e2-21c9-462d-874f-b0a2bcb8c467-travelbags.jpg"
                                                                                },
                                                                                "name_de": "Reisetaschen",
                                                                                "description_de": "Benutzbare Reisetaschen (Rollkoffer, Rucksaecke etc)"
                                                                            },
                                                                            {
                                                                                "updatedAt": "2015-12-03T02:36:27.488Z",
                                                                                "description_en": "Usable sleeping bags (for shelters)",
                                                                                "name_en": "Sleeping Bags",
                                                                                "priority": 4,
                                                                                "objectId": "8ofEYmjccK",
                                                                                "createdAt": "2015-10-15T17:19:59.586Z",
                                                                                "image": {
                                                                                    "__type": "File",
                                                                                    "url": "http:\/\/files.parsetfss.com\/211d3173-3c6e-4dee-b1d5-ff3165b998f2\/tfss-ef351e82-d88f-4594-9058-8c1aab34faf6-rectangular-sleeping-bag.jpg",
                                                                                    "name": "tfss-ef351e82-d88f-4594-9058-8c1aab34faf6-rectangular-sleeping-bag.jpg"
                                                                                },
                                                                                "name_de": "Schlafsäcke",
                                                                                "description_de": "Benutzbare Schlafsäcke (für Notunterkünfte) "
                                                                            },
                                                                            {
                                                                                "updatedAt": "2015-12-03T02:34:40.973Z",
                                                                                "description_en": "Best would be 2h tickets AB, also exist as a 4 ticket pack",
                                                                                "name_en": "Train Tickets",
                                                                                "priority": 5,
                                                                                "objectId": "qMchIKGIxl",
                                                                                "createdAt": "2015-10-15T19:47:22.953Z",
                                                                                "image": {
                                                                                    "__type": "File",
                                                                                    "url": "http:\/\/files.parsetfss.com\/211d3173-3c6e-4dee-b1d5-ff3165b998f2\/tfss-028e721c-335f-4906-84d4-ba0accb3ee0c-tickets.jpg",
                                                                                    "name": "tfss-028e721c-335f-4906-84d4-ba0accb3ee0c-tickets.jpg"
                                                                                },
                                                                                "name_de": "Fahrkarten BVG",
                                                                                "description_de": "Am besten 2 Stunden Tickets AB, gibt es auch im 4er Pack"
                                                                            },
                                                                            {
                                                                                "updatedAt": "2015-12-03T02:33:59.277Z",
                                                                                "description_en": "Everything for babies : baby lotion , baby food , baby oil , baby care ,
01-19 17:31:27.084 6645-12689/io.givenow.app I/ParseLogInterceptor:  baby powder , wipes, shampoo, baby carriages",
                                                                                "name_en": "Baby products",
                                                                                "priority": 6,
                                                                                "objectId": "54Y3ADAnZR",
                                                                                "createdAt": "2015-10-15T19:50:10.737Z",
                                                                                "image": {
                                                                                    "__type": "File",
                                                                                    "url": "http:\/\/files.parsetfss.com\/211d3173-3c6e-4dee-b1d5-ff3165b998f2\/tfss-10ce1485-e2de-4400-a966-0d31582295c8-baby.jpg",
                                                                                    "name": "tfss-10ce1485-e2de-4400-a966-0d31582295c8-baby.jpg"
                                                                                },
                                                                                "name_de": "Baby Produkte",
                                                                                "description_de": "Alles fuer Kleinkinder: Windeln, Babylotion, Babynahrung, Babyöl, Babypflege, Babypuder, Feuchttücher, Shampoo, Kinderwägen"
                                                                            },
                                                                            {
                                                                                "updatedAt": "2015-12-03T02:33:34.409Z",
                                                                                "description_en": "Deo , shower gel (travel size) , razors , toothbrushes , toothpaste , shaving cream , shampoo",
                                                                                "name_en": "Hygiene articles",
                                                                                "priority": 7,
                                                                                "objectId": "kX6tuMa389",
                                                                                "createdAt": "2015-10-15T19:54:34.207Z",
                                                                                "image": {
                                                                                    "__type": "File",
                                                                                    "url": "http:\/\/files.parsetfss.com\/211d3173-3c6e-4dee-b1d5-ff3165b998f2\/tfss-1bba78f1-0209-41eb-ab7c-353f9553f62d-hygiene.jpg",
                                                                                    "name": "tfss-1bba78f1-0209-41eb-ab7c-353f9553f62d-hygiene.jpg"
                                                                                },
                                                                                "name_de": "Hygiene Artikel",
                                                                                "description_de": "Deo, Duschgel (Reisegroesse), Rasierer, Zahnbürsten, Zahnpasta, Rasierschaum, Shampoo, "
                                                                            },
                                                                            {
                                                                                "updatedAt": "2015-12-03T02:34:20.120Z",
                                                                                "description_en": "Warm winter shoes for man und kinder",
                                                                                "name_en": "Winter Shoes",
                                                                                "priority": 8,
                                                                                "objectId": "9Ja4nb0L3e",
                                                                                "createdAt": "2015-10-15T20:25:38.278Z",
                                                                                "image": {
                                                                                    "__type": "File",
                                                                                    "url": "http:\/\/files.parsetfss.com\/211d3173-3c6e-4dee-b1d5-ff3165b998f2\/tfss-95b8090f-b7a4-4853-85be-6436fe0e14e2-herrenschuhe.jpg",
                                                                                    "name": "tfss-95b8090f-b7a4-4853-85be-6436fe0e14e2-herrenschuhe.jpg"
                                                                                },
                                                                                "name_de": "Winter Schuhe",
                                                                                "description_de": "Warme Winter Schuhe für Männer und Kinder"
                                                                            },
                                                                            {
                                                                                "updatedAt": "2015-12-03T02:32:45.579Z",
                                                                                "description_en": "Useful things (no old clothes)",
                                                                                "name_en": "Other",
                                                                                "priority": 9,
                                                                                "objectId": "C7cmV6u8vu",
                                                                                "createdAt": "2015-10-15T19:57:57.508Z",
                                                                                "image": {
                                                                                    "__type": "File",
                                                                                    "url": "http:\/\/files.parsetfss.com\/211d3173-3c6e-4dee-b1d5-ff3165b998f2\/tfss-27805aea-5af7-410c-9560-87744124550a-piq_10230_400x400.png",
                                                                                    "name": "tfss-27805aea-5af7-410c-9560-87744124550a-piq_10230_400x400.png"
                                                                                },
                                                                                "name_de": "Anderes",
                                                                                "description_de": "Nuetzliche Sachen (keine alten Klamotten)"
                                                                            }
                                                                        ]
                                                                    }
01-19 17:31:27.084 6645-12689/io.givenow.app I/ParseLogInterceptor: --------------

@aphexcx
Copy link
Author

aphexcx commented Jan 20, 2016

Should be noted that like in #326 (comment), I'm also trying to query for 9 items and running into failure. Weird edge case!

@Evin1-
Copy link

Evin1- commented Jan 20, 2016

Having the same issue testing with a Samsung Galaxy S2. API 16.
Fixed when going back to version 1.11

@wangmengyan95 wangmengyan95 added the type:bug Impaired feature or lacking behavior that is likely assumed label Jan 20, 2016
@wangmengyan95
Copy link
Contributor

Hi @aphexcx, I can repo this issue. It seems like a valid bug. I will dig into this issue and update the status.

@wangmengyan95
Copy link
Contributor

The cause of this problem is related gzip response stream. There are two reasons:

  1. In 1.12.0, we introduce a new way to initialize Parse. However, we introduce a bug for that feature. Previously, we only add ParseDecompressInterceptor when developers add external ParseNetworkInterceptor. However, in 1.12.0, we always add ParseDecompressInterceptor. ParseDecompressInterceptor is used for decompressing the gzip response stream. It will check the response header Content-Encoding and decompress if necessary.
  2. For Android API >= 19 version, we use URLConnection which is powered by OKHttp internally. When the response is a gzip stream, the libraries will automatically unzip the stream and remove the hear Content-Encoding: gzip.
    For Android API < 19, we use ApacheHttp internally. When the response is a gzip stream, we unzip the stream but we do not remove the header Content-Encoding: gzip.

Thus, in 1.12.0, when we use ApacheHttp, since we always have ParseDecompressInterceptor, we will unzip the gzip response stream twice which will throw the exception at the second time.
For ParseLogInterceptor, the interceptor will unzip the stream and remove the header Content-Encoding, thus, when we use the interceptor to check the request and response, this issue is gone.
It seems #346, #326 are all related to this bug.
cc @grantland @richardjrossiii

@alexblack
Copy link

A lot of my users are facing this bug too, whats the solution? Fixed in next release?

@aphexcx
Copy link
Author

aphexcx commented Jan 23, 2016

The solution for now is simply to rollback to Parse 1.11.0. Looks like he
just committed a fix for this, so I assume 1.12.1 isn't too far off:)

On Fri, Jan 22, 2016, 15:31 Alex Black [email protected] wrote:

A lot of my users are facing this bug too, whats the solution? Fixed in
next release?


Reply to this email directly or view it on GitHub
#355 (comment)
.

@wangmengyan95
Copy link
Contributor

Hi @aphexcx and @aphexcx, the fix is included in 1.13.0.

@johnernest02
Copy link

I'm still experiencing i/o failure in 1.13.1

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

Successfully merging a pull request may close this issue.

6 participants