{ "id": "171137", "key": "TIMOB-25789", "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": "19882", "name": "Release 8.0.0", "archived": false, "released": true, "releaseDate": "2019-03-14" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2018-12-10T21:28:26.000+0000", "created": "2018-02-20T07:30:45.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "parity" ], "versions": [ { "id": "17609", "description": "", "name": "Release 7.0.0", "archived": false, "released": true, "releaseDate": "2017-12-07" } ], "issuelinks": [ { "id": "56327", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "171135", "key": "TIMOB-25788", "fields": { "summary": "Windows: Fix windowsBroken HttpClient tests", "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": "7", "description": "gh.issue.story.desc", "name": "Story", "subtask": false } } } } ], "assignee": { "name": "kiguchi", "key": "kota", "displayName": "Kota Iguchi", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2018-12-11T12:27:34.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": "12642", "name": "Windows", "description": "Windows authoring support" } ], "description": "HttpClient {{callbackTestForGETMethod}} and {{callbackTestForPOSTMethod}} [unit test|https://github.com/appcelerator/titanium-mobile-mocha-suite/blob/master/Resources/ti.network.httpclient.test.js#L377] shows {{onreadystatechange}} should be called right after {{ondatastream/onsendstream}} event to keep parity with iOS/Android.\r\n\r\n{code:javascript}\r\nvar win = Ti.UI.createWindow({\r\n backgroundColor: 'white'\r\n});\r\n\r\nwin.addEventListener('open', function () {\r\n var xhr = Ti.Network.createHTTPClient(),\r\n attempts = 3,\r\n sendStreamFinished = false,\r\n buffer;\r\n xhr.setTimeout(3e4);\r\n\r\n xhr.onreadystatechange = function () {\r\n Ti.API.info('onreadystatechange sendStreamFinished: ' + sendStreamFinished + ' DONE? ' + (this.readyState === this.DONE));\r\n if (this.readyState === this.DONE && sendStreamFinished) {\r\n Ti.API.info('finish');\r\n }\r\n };\r\n xhr.onsendstream = function (e) {\r\n Ti.API.info('onsendstream');\r\n Ti.API.info(e.progress + ' be.ok');\r\n if (e.progress >= 0.99) {\r\n sendStreamFinished = true;\r\n }\r\n };\r\n xhr.onerror = function (e) {\r\n if (attempts-- > 0) {\r\n Ti.API.warn('failed, attempting to retry request...');\r\n xhr.send();\r\n } else {\r\n Ti.API.warn(JSON.stringify(e, null, 2));\r\n Ti.API.warn(e.error || this.responseText);\r\n }\r\n };\r\n buffer = Ti.createBuffer({\r\n length: 1024 * 10\r\n }).toBlob();\r\n xhr.open('POST', 'http://www.httpbin.org/post');\r\n xhr.send({\r\n data: buffer,\r\n username: 'fgsandford1000',\r\n password: 'sanford1000',\r\n message: 'check me out'\r\n });\r\n});\r\n\r\nwin.open();\r\n{code}\r\n\r\nExpected: {{finish}} should be printed.", "attachment": [], "flagged": false, "summary": "Windows: HttpClient.onreadystatechange should be called right after ondatastream/onsendstream", "creator": { "name": "kiguchi", "key": "kota", "displayName": "Kota Iguchi", "active": false, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "kiguchi", "key": "kota", "displayName": "Kota Iguchi", "active": false, "timeZone": "America/Los_Angeles" }, "environment": null, "closedSprints": [ { "id": 1000, "state": "closed", "name": "2018 Sprint 04 SDK", "startDate": "2018-02-12T04:23:01.913Z", "endDate": "2018-02-26T04:23:00.000Z", "completeDate": "2018-02-26T19:36:01.769Z", "originBoardId": 114 }, { "id": 1065, "state": "closed", "name": "2016 Sprint 17 SDK", "startDate": "2018-08-13T17:39:36.846Z", "endDate": "2018-08-27T17:39:00.000Z", "completeDate": "2018-08-29T16:10:57.013Z", "originBoardId": 114 }, { "id": 1070, "state": "closed", "name": "2018 Sprint 18 SDK", "startDate": "2018-08-26T16:14:35.297Z", "endDate": "2018-09-09T16:14:00.000Z", "completeDate": "2018-09-11T20:59:21.495Z", "originBoardId": 114 }, { "id": 1103, "state": "closed", "name": "2018 Sprint 25", "startDate": "2018-12-02T16:29:21.531Z", "endDate": "2018-12-16T16:29:00.000Z", "completeDate": "2018-12-15T02:33:24.870Z", "originBoardId": 114 }, { "id": 1008, "state": "closed", "name": "2018 Sprint 06 SDK", "startDate": "2018-03-11T22:18:04.396Z", "endDate": "2018-03-25T22:18:00.000Z", "completeDate": "2018-03-25T21:52:36.683Z", "originBoardId": 216 }, { "id": 1073, "state": "closed", "name": "2018 Sprint 19 SDK", "startDate": "2018-09-09T21:02:56.422Z", "endDate": "2018-09-23T21:02:00.000Z", "completeDate": "2018-09-23T22:28:10.932Z", "originBoardId": 114 }, { "id": 1078, "state": "closed", "name": "2018 Sprint 20 SDK", "startDate": "2018-09-23T16:57:58.349Z", "endDate": "2018-10-07T16:57:00.000Z", "completeDate": "2018-10-07T23:31:40.476Z", "originBoardId": 114 }, { "id": 1018, "state": "closed", "name": "2018 Sprint 07 SDK", "startDate": "2018-03-25T21:59:36.637Z", "endDate": "2018-04-08T21:59:00.000Z", "completeDate": "2018-04-08T17:55:14.467Z", "originBoardId": 114 }, { "id": 1084, "state": "closed", "name": "2018 Sprint 21", "startDate": "2018-10-07T23:32:40.560Z", "endDate": "2018-10-21T23:32:00.000Z", "completeDate": "2018-10-21T23:19:05.460Z", "originBoardId": 114 }, { "id": 1021, "state": "closed", "name": "2018 Sprint 08 SDK", "startDate": "2018-04-08T17:57:36.122Z", "endDate": "2018-04-22T17:57:00.000Z", "completeDate": "2018-04-22T22:51:19.120Z", "originBoardId": 114 }, { "id": 1053, "state": "closed", "name": "2018 Sprint 15 SDK", "startDate": "2018-07-15T21:52:05.453Z", "endDate": "2018-07-29T21:52:00.000Z", "completeDate": "2018-07-29T22:25:11.723Z", "originBoardId": 114 }, { "id": 126, "state": "closed", "name": "2018 Sprint 05 SDK", "startDate": "2018-02-25T19:38:08.926Z", "endDate": "2018-03-11T18:38:00.000Z", "completeDate": "2018-03-11T22:06:01.520Z", "originBoardId": 100 }, { "id": 1088, "state": "closed", "name": "2018 Sprint 22", "startDate": "2018-10-21T23:20:52.653Z", "endDate": "2018-11-04T23:20:00.000Z", "completeDate": "2018-11-04T23:29:59.423Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "434697", "author": { "name": "kiguchi", "key": "kota", "displayName": "Kota Iguchi", "active": false, "timeZone": "America/Los_Angeles" }, "body": "https://github.com/appcelerator/titanium_mobile_windows/pull/1189", "updateAuthor": { "name": "kiguchi", "key": "kota", "displayName": "Kota Iguchi", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2018-02-21T09:08:22.000+0000", "updated": "2018-02-21T09:08:22.000+0000" }, { "id": "442519", "author": { "name": "kiguchi", "key": "kota", "displayName": "Kota Iguchi", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Seems like this makes LiveView unstable.", "updateAuthor": { "name": "kiguchi", "key": "kota", "displayName": "Kota Iguchi", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2018-10-11T12:02:36.000+0000", "updated": "2018-10-11T12:02:36.000+0000" }, { "id": "443614", "author": { "name": "kiguchi", "key": "kota", "displayName": "Kota Iguchi", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Attempt to fix issue with liveview: https://github.com/appcelerator/titanium_mobile_windows/pull/1318", "updateAuthor": { "name": "kiguchi", "key": "kota", "displayName": "Kota Iguchi", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2018-11-15T00:39:10.000+0000", "updated": "2018-11-15T00:39:10.000+0000" }, { "id": "444436", "author": { "name": "jlongton", "key": "jlongton", "displayName": "Josh Longton", "active": true, "timeZone": "Europe/London" }, "body": "*FR Passed*", "updateAuthor": { "name": "jlongton", "key": "jlongton", "displayName": "Josh Longton", "active": true, "timeZone": "Europe/London" }, "created": "2018-12-10T21:28:18.000+0000", "updated": "2018-12-10T21:28:18.000+0000" }, { "id": "444474", "author": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket, fix verified in SDK version 8.0.0.v20181210172243.\r\n\r\nTest and other information can be found at:\r\nhttps://github.com/appcelerator/titanium_mobile_windows/pull/1318", "updateAuthor": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-12-11T12:27:28.000+0000", "updated": "2018-12-11T12:27:28.000+0000" } ], "maxResults": 5, "total": 5, "startAt": 0 } } }