{ "id": "133309", "key": "AC-1256", "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": "11", "description": "Is not a bug in our product", "name": "Not Our Bug" }, "resolutiondate": "2014-07-18T06:58:09.000+0000", "created": "2014-07-17T06:24:01.000+0000", "labels": [ "android" ], "versions": [], "issuelinks": [], "assignee": { "name": "sliang", "key": "sliang", "displayName": "Shuo Liang", "active": true, "timeZone": "Asia/Harbin" }, "updated": "2016-03-08T07:37:38.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": "When doing a GET request with Titanium.Network.HTTPClient, on iOS when I get a timeout it calls the onerror callback, I handle it and the app moves on, but on android it calls the onerror callback but then throws these errors and my app basically stops what it is doing there:\r\n\r\n{code}\r\n[ERROR] : TiHttpClient: (TiHttpClient-4) [5036,16911] HTTP Error (java.net.SocketTimeoutException): java.net.SocketTimeoutException\r\n[ERROR] : TiHttpClient: java.net.SocketTimeoutException\r\n[ERROR] : TiHttpClient: \tat java.net.PlainSocketImpl.read(PlainSocketImpl.java:488)\r\n[ERROR] : TiHttpClient: \tat java.net.PlainSocketImpl.access$000(PlainSocketImpl.java:37)\r\n[ERROR] : TiHttpClient: \tat java.net.PlainSocketImpl$PlainSocketInputStream.read(PlainSocketImpl.java:237)\r\n[ERROR] : TiHttpClient: \tat org.apache.http.impl.io.AbstractSessionInputBuffer.fillBuffer(AbstractSessionInputBuffer.java:103)\r\n[ERROR] : TiHttpClient: \tat org.apache.http.impl.io.AbstractSessionInputBuffer.readLine(AbstractSessionInputBuffer.java:191)\r\n[ERROR] : TiHttpClient: \tat org.apache.http.impl.conn.DefaultResponseParser.parseHead(DefaultResponseParser.java:82)\r\n[ERROR] : TiHttpClient: \tat org.apache.http.impl.io.AbstractMessageParser.parse(AbstractMessageParser.java:174)\r\n[ERROR] : TiHttpClient: \tat org.apache.http.impl.AbstractHttpClientConnection.receiveResponseHeader(AbstractHttpClientConnection.java:180)\r\n[ERROR] : TiHttpClient: \tat org.apache.http.impl.conn.DefaultClientConnection.receiveResponseHeader(DefaultClientConnection.java:235)\r\n[ERROR] : TiHttpClient: \tat org.apache.http.impl.conn.AbstractClientConnAdapter.receiveResponseHeader(AbstractClientConnAdapter.java:259)\r\n[ERROR] : TiHttpClient: \tat org.apache.http.protocol.HttpRequestExecutor.doReceiveResponse(HttpRequestExecutor.java:279)\r\n[ERROR] : TiHttpClient: \tat org.apache.http.protocol.HttpRequestExecutor.execute(HttpRequestExecutor.java:121)\r\n[ERROR] : TiHttpClient: \tat org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:428)\r\n[ERROR] : TiHttpClient: \tat org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:555)\r\n[ERROR] : TiHttpClient: \tat org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:653)\r\n[ERROR] : TiHttpClient: \tat org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:637)\r\n[ERROR] : TiHttpClient: \tat ti.modules.titanium.network.TiHTTPClient$ClientRunnable.run(TiHTTPClient.java:1287)\r\n[ERROR] : TiHttpClient: \tat java.lang.Thread.run(Thread.java:818)\r\n{code}\r\n\r\nI can continue using the app after that, however the processing that was happening with the HTTPClient calls doesn't finish properly.", "attachment": [], "flagged": false, "summary": "HTTPClient breaking app on timeout on Android", "creator": { "name": "rooby", "key": "rooby", "displayName": "Reuben Turk", "active": true, "timeZone": "Australia/Sydney" }, "subtasks": [], "reporter": { "name": "rooby", "key": "rooby", "displayName": "Reuben Turk", "active": true, "timeZone": "Australia/Sydney" }, "environment": "Titanium Studio, build: 3.2.3.201404181442\r\nCLI version 3.2.3, Titanium SDK version 3.2.3.GA\r\nAndroid\r\nUsing emulator titanium_1_WVGA800", "comment": { "comments": [ { "id": "314589", "author": { "name": "sliang", "key": "sliang", "displayName": "Shuo Liang", "active": true, "timeZone": "Asia/Harbin" }, "body": "Hi,\r\n\r\nWould you please provider us a simple test case for this problem, that will be really helpful to address the problem.\r\n\r\nRegards,\r\nShuo", "updateAuthor": { "name": "sliang", "key": "sliang", "displayName": "Shuo Liang", "active": true, "timeZone": "Asia/Harbin" }, "created": "2014-07-17T06:42:06.000+0000", "updated": "2014-07-17T06:42:06.000+0000" }, { "id": "314608", "author": { "name": "sliang", "key": "sliang", "displayName": "Shuo Liang", "active": true, "timeZone": "Asia/Harbin" }, "body": "HI,\r\n\r\nNever mind, Please ignore the last comment. I made a test case myself.\r\n\r\nCan you tell me what's your meaning of \"however the processing that was happening with the HTTPClient calls doesn't finish properly\". During my test case, all the actions of error call back will be triggered(even the error pop out in console), and app will keep running. So could you please explain \"doesn't finish properly\". thanks\r\n\r\nRegards\r\nShuo", "updateAuthor": { "name": "sliang", "key": "sliang", "displayName": "Shuo Liang", "active": true, "timeZone": "Asia/Harbin" }, "created": "2014-07-17T08:12:30.000+0000", "updated": "2014-07-17T08:12:30.000+0000" }, { "id": "314771", "author": { "name": "rooby", "key": "rooby", "displayName": "Reuben Turk", "active": true, "timeZone": "Australia/Sydney" }, "body": "Thanks for your response.\r\n\r\nActually after some further debugging it is an issue with my code.\r\nThe program does continue on after these errors as expected.\r\n\r\nThis can be closed as cannot reproduce or something.\r\n", "updateAuthor": { "name": "rooby", "key": "rooby", "displayName": "Reuben Turk", "active": true, "timeZone": "Australia/Sydney" }, "created": "2014-07-18T06:31:03.000+0000", "updated": "2014-07-18T06:31:03.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }