{ "id": "169710", "key": "TIMOB-25241", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [ { "id": "17609", "description": "", "name": "Release 7.0.0", "archived": false, "released": true, "releaseDate": "2017-12-07" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2017-11-15T04:28:06.000+0000", "created": "2017-09-07T00:08:33.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "android", "httpclient" ], "versions": [ { "id": "18414", "description": "", "name": "Release 6.2.0", "archived": false, "released": true, "releaseDate": "2017-09-13" } ], "issuelinks": [ { "id": "56684", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "171919", "key": "TIMOB-26203", "fields": { "summary": "Android: Prevent exception in Log for HTTP response", "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" } }, "priority": { "name": "Medium", "id": "3" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } }, { "id": "55883", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "168141", "key": "TIMOB-24811", "fields": { "summary": "LiveView causes multiple instances of same module when requiring using different paths", "status": { "description": "A resolution has been taken, and it is awaiting verification by reporter. From here issues are either reopened, or are closed.", "name": "Resolved", "id": "5", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "priority": { "name": "Critical", "id": "1" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2018-07-12T21:07:14.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": "10202", "name": "Android", "description": "Android Platform" } ], "description": "*Reproduce Step*\r\n1. create an app\r\n2. add these to {{index.js/app.js}}\r\n{code}\r\nfunction getReadyStateNameFrom(httpClient) {\r\n\tswitch (httpClient.readyState) {\r\n\t\tcase httpClient.UNSENT: return \"UNSENT\";\r\n\t\tcase httpClient.OPENED: return \"OPENED\";\r\n\t\tcase httpClient.HEADERS_RECEIVED: return \"HEADERS_RECEIVED\";\r\n\t\tcase httpClient.LOADING: return \"LOADING\";\r\n\t\tcase httpClient.DONE: return \"DONE\";\r\n\t}\r\n\treturn \"Unknown\";\r\n}\r\nvar request = Ti.Network.createHTTPClient({\r\n\tonload : function() {\r\n\t\tconsole.log('onload: ');\r\n\t\tconsole.log('readyState: ' + getReadyStateNameFrom(request));\r\n\t},\r\n\tonerror : function(e) {\r\n\t\tconsole.log('onerror: ', e);\r\n\t\tconsole.log('readyState: ' + getReadyStateNameFrom(request));\r\n\t}\r\n});\r\nvar url = \"http://www.appcelerator.com/test.js\";\r\nrequest.open(\"GET\", url);\r\nrequest.send();\r\n{code}\r\n3. run the app\r\n\r\n*Actual Output*\r\niOS\r\nHTTP error responses is returned to the onerror handler\r\n{code}\r\n[INFO] onerror: {\r\n[INFO] code = 404;\r\n[INFO] error = \"HTTP error\";\r\n[INFO] source = \"[object TiNetworkHTTPClient]\";\r\n[INFO] success = 0;\r\n[INFO] type = error;\r\n[INFO] }\r\n[INFO] readyState: DONE\r\n{code}\r\n\r\n*Android*\r\nFollowing output is logged as an eror in the application log.\r\n{code}\r\n[ERROR] TiHTTPClient: (TiHttpClient-1) [22,967] HTTP Error (java.io.IOException): 404 : Not Found\r\n[ERROR] TiHTTPClient: java.io.IOException: 404 : Not Found\r\n[ERROR] TiHTTPClient: \tat ti.modules.titanium.network.TiHTTPClient$ClientRunnable.run(TiHTTPClient.java:1283)\r\n[ERROR] TiHTTPClient: \tat java.lang.Thread.run(Thread.java:761)\r\n[INFO] onerror: {\"source\":{\"username\":null,\"status\":404,\"location\":\"http://www.appcelerator.com/test.js\",\"readyState\":3,\"domain\":null,\"statusText\":\"Not Found\",\"validatesSecureCertificate\":false,\"password\":null,\"connected\":false,\"autoEncodeUrl\":true,\"connectionType\":\"GET\",\"autoRedirect\":true,\"responseData\":{\"height\":0,\"type\":2,\"mimeType\":\"text/html\",\"text\":\"\\n\\n\\n\\t\\n\\t\\n\\t\\n\\t\\n\\tNothing found for Test Js\\n\\t\\n \\n \\n\\t \\n \\n \\n\\t\\n\\t\\n \\n\\t\\n \\n \\n\\t\\n\\t\\n\\t\\n \\n\\t\\n\\t\\n\\t\\t\\n\\n\\n\\n\\n\\t\\t