{ "id": "131170", "key": "TIMOB-17062", "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": "15422", "description": "Release 3.3.0", "name": "Release 3.3.0", "archived": false, "released": true, "releaseDate": "2014-07-16" }, { "id": "15972", "description": "Release 3.4.0", "name": "Release 3.4.0", "archived": false, "released": true, "releaseDate": "2014-09-28" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2014-06-05T20:07:04.000+0000", "created": "2014-06-03T08:17:06.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "module_network", "qe-3.3.0", "qe-testadded", "regression" ], "versions": [ { "id": "15422", "description": "Release 3.3.0", "name": "Release 3.3.0", "archived": false, "released": true, "releaseDate": "2014-07-16" } ], "issuelinks": [ { "id": "38048", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "130975", "key": "TIMOB-17036", "fields": { "summary": "iOS: Titanium.Network.HTTPClient must refuse subsequent calls to open", "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": "Critical", "id": "1" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2014-07-03T03:48:05.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": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "The onload callback is not triggered second time request of existing HTTPClient object.\r\nThis is *regression* since it does not occur in 3.2.3GA release. \r\nThe following code demonstrate the behavior more clearly. \r\n\r\n{code}\r\nvar win = Ti.UI.createWindow({backgroundColor:'white'});\r\nvar button = Ti.UI.createButton({\r\n\ttitle:'load',\r\n\ttop:'20%',\r\n\tbottom:'20%',\r\n\tleft:'20%',\r\n\tright:'20%'\r\n\t});\r\n\r\nwin.add( button );\r\n\r\nvar xhr;\t\r\nbutton.addEventListener('click', function () {\r\n\tbutton.title = 'parsing...';\r\n\tif(!xhr){\r\n\t\txhr = Titanium.Network.createHTTPClient({onload: function() {\r\n\t\t\tTi.API.info('onload');\r\n\t\t\tbutton.title = 'load';\t\r\n\t\t}});\r\n\t}\r\n\t\r\n //Abort existing call\r\n xhr.abort();\r\n\t\r\n // open the client\r\n xhr.open('GET', 'http://www.tfl.gov.uk/tfl/syndication/feeds/cycle-hire/livecyclehireupdates.xml');\r\n xhr.send();\r\n});\r\n\r\nwin.open();\t\t\r\n{code} \r\n*Expected Result:* Every time you click the \"load\" button, its text property should change to \"parsing...\" and restore back to \"load\" text.\r\n*Actual Result:* On the first time you click, it change back to \"load\". But in the second time it stays on \"parsing...\" and not coming back to the value \"load\".", "attachment": [], "flagged": false, "summary": "iOS: onload callback is not triggered second time for existing HTTPClient object", "creator": { "name": "kvelummaylum", "key": "kvelummaylum", "displayName": "Kajenthiran Velummaylum", "active": true, "timeZone": "Asia/Shanghai" }, "subtasks": [], "reporter": { "name": "kvelummaylum", "key": "kvelummaylum", "displayName": "Kajenthiran Velummaylum", "active": true, "timeZone": "Asia/Shanghai" }, "environment": "|| Component || Version ||\r\n| Appcelerator Studio | 3.3.0.201405271647 |\r\n| Titanium SDK | 3.3.0.v20140530163312 |\r\n| Node | 0.10.28 |\r\n| acs | 1.0.14 |\r\n| alloy | 1.4.0-beta |\r\n| npm | 1.4.9 | \r\n| CLI | 3.3.0-beta2 |\r\n| Titanium-code-processor | 1.1.1 |\r\n| OS | OSX 10.9.3 |\r\n| Device | iPhone 5S (iOS 7.1) |", "closedSprints": [ { "id": 105, "state": "closed", "name": "2014 Sprint 11 SDK", "startDate": "2014-05-27T21:43:32.338Z", "endDate": "2014-06-07T00:00:00.000Z", "completeDate": "2014-06-09T21:36:37.587Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "307694", "author": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Pull pending\r\nmaster - https://github.com/appcelerator/titanium_mobile/pull/5775\r\n3_3_X - https://github.com/appcelerator/titanium_mobile/pull/5776", "updateAuthor": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2014-06-05T17:56:41.000+0000", "updated": "2014-06-05T18:02:09.000+0000" }, { "id": "307974", "author": { "name": "ssekhri", "key": "ssekhri", "displayName": "Satyam Sekhri", "active": true, "timeZone": "America/Los_Angeles" }, "body": "The onload callback is triggered each time.\r\nVerified on:\r\n|| Component || Version ||\r\n| Appcelerator Studio | 3.3.0.201405271647 |\r\n| Titanium SDK | 3.3.0.v20140606154912 |\r\n| Node | 0.10.28 |\r\n| acs | 1.0.14 |\r\n| alloy | 1.4.0-beta2 |\r\n| npm | 1.4.9 | \r\n| CLI | 3.3.0-beta2 |\r\n| Titanium-code-processor | 1.1.1 |\r\n| OS | OSX 10.9.2 |\r\n| Device | iPhone 5S (iOS 7.1) |", "updateAuthor": { "name": "ssekhri", "key": "ssekhri", "displayName": "Satyam Sekhri", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-06-09T07:33:52.000+0000", "updated": "2014-06-09T07:33:52.000+0000" } ], "maxResults": 2, "total": 2, "startAt": 0 } } }