{ "id": "142112", "key": "AC-795", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "12217", "key": "AC", "name": "Appcelerator - INBOX", "projectCategory": { "id": "10000", "description": "", "name": "Customer Service" } }, "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2015-06-29T17:12:36.000+0000", "created": "2014-12-29T15:22:51.000+0000", "labels": [ "TCSupportTriage" ], "versions": [], "issuelinks": [], "assignee": { "name": "rtlechuga", "key": "rtlechuga", "displayName": "Radamantis Torres-Lechuga", "active": false, "timeZone": "Asia/Dubai" }, "updated": "2016-03-08T07:37:04.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "14548", "name": "Titanium SDK & CLI", "description": "Please enter tickets related to the MobileSDK here." } ], "description": "TiDownloadManager doesn't seem to properly handle redirects on Android Lollipop. This is the exception I get:\r\n\r\n{code}\r\nERROR] TiDownloadManager: (pool-4-thread-1) [916,916] Exception downloading https://graph.facebook.com/100008778152788/picture?width=200&height=200\r\n[ERROR] TiDownloadManager: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean java.lang.String.startsWith(java.lang.String)' on a null object reference\r\n[ERROR] TiDownloadManager: \tat com.android.okhttp.internal.http.StatusLine.(StatusLine.java:24)\r\n[ERROR] TiDownloadManager: \tat com.android.okhttp.Response$Builder.statusLine(Response.java:419)\r\n[ERROR] TiDownloadManager: \tat com.android.okhttp.internal.http.JavaApiConverter.createOkResponse(JavaApiConverter.java:116)\r\n[ERROR] TiDownloadManager: \tat com.android.okhttp.internal.http.ResponseCacheAdapter.get(ResponseCacheAdapter.java:53)\r\n[ERROR] TiDownloadManager: \tat com.android.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:190)\r\n[ERROR] TiDownloadManager: \tat com.android.okhttp.internal.http.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:373)\r\n[ERROR] TiDownloadManager: \tat com.android.okhttp.internal.http.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:323)\r\n[ERROR] TiDownloadManager: \tat com.android.okhttp.internal.http.HttpURLConnectionImpl.getInputStream(HttpURLConnectionImpl.java:190)\r\n[ERROR] TiDownloadManager: \tat com.android.okhttp.internal.http.DelegatingHttpsURLConnection.getInputStream(DelegatingHttpsURLConnection.java:210)\r\n[ERROR] TiDownloadManager: \tat com.android.okhttp.internal.http.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:25)\r\n[ERROR] TiDownloadManager: \tat java.net.URL.openStream(URL.java:470)\r\n[ERROR] TiDownloadManager: \tat org.appcelerator.titanium.util.TiDownloadManager$DownloadJob.run(TiDownloadManager.java:135)\r\n[ERROR] TiDownloadManager: \tat java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)\r\n[ERROR] TiDownloadManager: \tat java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)\r\n[ERROR] TiDownloadManager: \tat java.lang.Thread.run(Thread.java:818)\r\n{code}\r\n\r\nAttached you can find a single window application in which two image views are used to display remote images. The second of the two uses some facebook redirect to get the actual image url, and TiDownloadManager crashes while fetching the data.", "attachment": [ { "id": "53368", "filename": "redirect.tgz", "author": { "name": "landimatte", "key": "landimatte", "displayName": "Matteo Landi", "active": true, "timeZone": "Europe/Berlin" }, "created": "2014-12-29T15:22:51.000+0000", "size": 4085569, "mimeType": "application/x-gzip" } ], "flagged": false, "summary": "TiDownloadManager crashes with links returning redirects (302)", "creator": { "name": "landimatte", "key": "landimatte", "displayName": "Matteo Landi", "active": true, "timeZone": "Europe/Berlin" }, "subtasks": [], "reporter": { "name": "landimatte", "key": "landimatte", "displayName": "Matteo Landi", "active": true, "timeZone": "Europe/Berlin" }, "environment": "Dev OS: OS X Yosemite\r\nDeploy OS: Android Lollipop (either emulator or device)\r\nTitanium: 3.4.1.GA", "comment": { "comments": [ { "id": "346040", "author": { "name": "buddyguards", "key": "buddyguards", "displayName": "grebulon", "active": true, "timeZone": "Asia/Jerusalem" }, "body": "To work around this, call setUseCaches(false) on the URL connection before opening the stream, but I don't know why this happens.", "updateAuthor": { "name": "buddyguards", "key": "buddyguards", "displayName": "grebulon", "active": true, "timeZone": "Asia/Jerusalem" }, "created": "2015-03-16T09:20:52.000+0000", "updated": "2015-03-16T09:20:52.000+0000" }, { "id": "347917", "author": { "name": "buddyguards", "key": "buddyguards", "displayName": "grebulon", "active": true, "timeZone": "Asia/Jerusalem" }, "body": "This is caused by a bug in TiCacheResponse.\r\nI reported this in a separate issue - TC-5388\r\nAlso see: http://stackoverflow.com/a/29147399/2603965", "updateAuthor": { "name": "buddyguards", "key": "buddyguards", "displayName": "grebulon", "active": true, "timeZone": "Asia/Jerusalem" }, "created": "2015-03-31T09:53:29.000+0000", "updated": "2015-03-31T09:53:29.000+0000" }, { "id": "353201", "author": { "name": "arnaud_besnier", "key": "arnaud_besnier", "displayName": "Arnaud Besnier", "active": true, "timeZone": "Europe/Berlin" }, "body": "Any update for this issue?\r\n\r\nOr do we have to implement our own image cache?", "updateAuthor": { "name": "arnaud_besnier", "key": "arnaud_besnier", "displayName": "Arnaud Besnier", "active": true, "timeZone": "Europe/Berlin" }, "created": "2015-05-21T13:55:30.000+0000", "updated": "2015-05-21T13:55:30.000+0000" }, { "id": "353210", "author": { "name": "buddyguards", "key": "buddyguards", "displayName": "grebulon", "active": true, "timeZone": "Asia/Jerusalem" }, "body": "This is the same as item TC-5388 which has just been fixed for 4.0.1", "updateAuthor": { "name": "buddyguards", "key": "buddyguards", "displayName": "grebulon", "active": true, "timeZone": "Asia/Jerusalem" }, "created": "2015-05-21T15:39:27.000+0000", "updated": "2015-05-21T15:39:27.000+0000" } ], "maxResults": 7, "total": 7, "startAt": 0 } } }