{ "id": "153885", "key": "TIMOB-27293", "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": "20832", "name": "Release 8.3.0", "archived": false, "released": true, "releaseDate": "2019-11-25" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2019-10-30T18:22:42.000+0000", "created": "2015-12-16T14:08:50.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "android", "engSchedule", "httpclient" ], "versions": [ { "id": "17072", "name": "Release 5.1.2", "archived": false, "released": true, "releaseDate": "2016-01-12" }, { "id": "20791", "name": "Release 8.0.2", "archived": false, "released": true, "releaseDate": "2019-06-18" } ], "issuelinks": [], "assignee": { "name": "ybanev", "key": "ybanev", "displayName": "Yordan Banev", "active": true, "timeZone": "Europe/Athens" }, "updated": "2019-10-30T18:22:42.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": "When initiating an XHR request on Android, and providing the onsendstream callback function, the progress within the payload (e.progress) will always be 1.\r\n\r\nExpected is the actual progress as a number between 0.0 and 1.0\r\n\r\n", "attachment": [], "flagged": false, "summary": "Android: HTTPClient onsendstream \"progress\" is always set to 1.0", "creator": { "name": "topener", "key": "topener", "displayName": "Rene Pot", "active": true, "timeZone": "Europe/Berlin" }, "subtasks": [], "reporter": { "name": "topener", "key": "topener", "displayName": "Rene Pot", "active": true, "timeZone": "Europe/Berlin" }, "environment": "Android, tested with TiSDK 5.0.2.GA and 5.1.2.RC\r\nTISDK 8.0.2.GA", "closedSprints": [ { "id": 1169, "state": "closed", "name": "2019 Sprint 22", "startDate": "2019-10-21T15:38:21.747Z", "endDate": "2019-11-03T15:38:00.000Z", "completeDate": "2019-11-04T18:36:57.022Z", "originBoardId": 114 }, { "id": 1165, "state": "closed", "name": "2019 Sprint 20", "startDate": "2019-09-23T15:38:43.949Z", "endDate": "2019-10-06T15:38:00.000Z", "completeDate": "2019-10-07T18:33:11.953Z", "originBoardId": 114 }, { "id": 1168, "state": "closed", "name": "2019 Sprint 21", "startDate": "2019-10-07T18:35:57.052Z", "endDate": "2019-10-20T18:35:00.000Z", "completeDate": "2019-10-21T15:38:00.182Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "373199", "author": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "body": "Hello [~topener], Please provide a complete test case which demonstrate your problem. We will try to regenerate the issue. Also please provide the log and your full configuration. Make sure you follow the [documentation|http://docs.appcelerator.com/platform/latest/#!/api/Titanium.Network.HTTPClient-property-onsendstream] of uploading file. Thanks.", "updateAuthor": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "created": "2015-12-17T09:50:06.000+0000", "updated": "2015-12-17T09:50:06.000+0000" }, { "id": "378293", "author": { "name": "amurcia", "key": "amurcia", "displayName": "Anna", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I'm still having this problem in Ti SDK 5.1.2.GA", "updateAuthor": { "name": "amurcia", "key": "amurcia", "displayName": "Anna", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-03-01T13:35:20.000+0000", "updated": "2016-03-01T13:35:20.000+0000" }, { "id": "378565", "author": { "name": "amurcia", "key": "amurcia", "displayName": "Anna", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Reopen this ticket please, it doesn't work now", "updateAuthor": { "name": "amurcia", "key": "amurcia", "displayName": "Anna", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-03-03T09:33:32.000+0000", "updated": "2016-03-03T09:33:32.000+0000" }, { "id": "417461", "author": { "name": "dethier1958", "key": "dethier1958", "displayName": "Daniel Ethier", "active": true, "timeZone": "America/Chicago" }, "body": "I am seeing this issue as well. I will see if I can come up with a simple example. I believe I am following the documentation (setting onsendstream before calling open, is there something else?). Please re-open. I am using SDK 6.0.3 ...", "updateAuthor": { "name": "dethier1958", "key": "dethier1958", "displayName": "Daniel Ethier", "active": true, "timeZone": "America/Chicago" }, "created": "2017-04-16T00:52:16.000+0000", "updated": "2017-04-16T00:52:39.000+0000" }, { "id": "450010", "author": { "name": "mobile@informatica.aci.it", "key": "mobile@informatica.aci.it", "displayName": "ACI Informatica", "active": true, "timeZone": "Europe/Rome" }, "body": "I can reproduce with this code and Ti SDK 8.0.2 (an 1+ MB image in assets/images folder is required to test or just use an equivalent size string):\r\n\r\n{code:title=index.js}\r\nvar win = Ti.UI.createWindow();\r\nvar progress = Ti.UI.createProgressBar({\r\n width:200,\r\n min:0,\r\n max:1,\r\n value:0, \r\n tintColor : \"red\"\r\n});\r\nwin.add(progress);\r\n\r\nvar timestamp = Date.now();\r\nvar file = Ti.Filesystem.getFile(Ti.Filesystem.resourcesDirectory, '/images/img.jpg'); // app/assets/images/img.jpg\r\nvar base64String = Ti.Utils.base64encode(file).toString();\r\n\r\nwin.addEventListener('open', function() {\r\n\tvar xhr = Ti.Network.createHTTPClient({\r\n\t\tonload : function() {\r\n\t\t\tvar time_passed = Math.floor((Date.now() - timestamp) / 1000);\r\n\t\t\tTi.API.info('Seconds passed:', time_passed, 'SUCCESS');\r\n\t\t},\r\n\t\tonsendstream : _.throttle(function(e) {\r\n\t\t\tvar time_passed = Math.floor((Date.now() - timestamp) / 1000);\r\n\t\t\tTi.API.info('Seconds passed:', time_passed + ', progress:', e.progress);\r\n\t\t\tprogress.setValue(e.progress);\r\n\t\t}, 250)\r\n\t});\r\n\txhr.open('POST', 'https://httpbin.org/post');\r\n\txhr.send(base64String);\r\n});\r\n\r\nwin.open();\r\n{code}", "updateAuthor": { "name": "mobile@informatica.aci.it", "key": "mobile@informatica.aci.it", "displayName": "ACI Informatica", "active": true, "timeZone": "Europe/Rome" }, "created": "2019-07-23T15:16:07.000+0000", "updated": "2019-07-23T15:16:07.000+0000" }, { "id": "450126", "author": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "body": "Hello [~jquick], The issue is reproducible with SDK 8.0.2.GA. With the above sample code and a >1MB image file in the assets/android/images/ directory the progress always shows 1. And after sometime it shows success. Thanks.\r\n\r\n{code}\r\n[INFO] Seconds passed: 1, progress: 1\r\n[INFO] Seconds passed: 1, progress: 1\r\n[INFO] Seconds passed: 1, progress: 1\r\n[INFO] Seconds passed: 3, progress: 1\r\n[INFO] Seconds passed: 3, progress: 1\r\n[INFO] Seconds passed: 3, progress: 1\r\n[INFO] Seconds passed: 3, progress: 1\r\n[INFO] Seconds passed: 4, progress: 1\r\n[INFO] Seconds passed: 4, progress: 1\r\n[INFO] Seconds passed: 23 SUCCESS\r\n{code}\r\n\r\n ", "updateAuthor": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "created": "2019-07-29T15:12:07.000+0000", "updated": "2019-07-29T15:12:07.000+0000" }, { "id": "450728", "author": { "name": "ybanev", "key": "ybanev", "displayName": "Yordan Banev", "active": true, "timeZone": "Europe/Athens" }, "body": "PR: https://github.com/appcelerator/titanium_mobile/pull/11168", "updateAuthor": { "name": "ybanev", "key": "ybanev", "displayName": "Yordan Banev", "active": true, "timeZone": "Europe/Athens" }, "created": "2019-08-22T15:22:00.000+0000", "updated": "2019-08-22T15:22:00.000+0000" }, { "id": "451480", "author": { "name": "ssekhri", "key": "ssekhri", "displayName": "Satyam Sekhri", "active": true, "timeZone": "America/Los_Angeles" }, "body": "FR passed.", "updateAuthor": { "name": "ssekhri", "key": "ssekhri", "displayName": "Satyam Sekhri", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2019-09-18T18:24:16.000+0000", "updated": "2019-09-18T18:24:16.000+0000" }, { "id": "451779", "author": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "body": "Moving back out of QE test, because unit tests fail with this PR.", "updateAuthor": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "created": "2019-10-02T20:27:49.000+0000", "updated": "2019-10-02T20:27:49.000+0000" }, { "id": "452172", "author": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "body": "merged to master", "updateAuthor": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "created": "2019-10-21T19:31:03.000+0000", "updated": "2019-10-21T19:31:03.000+0000" }, { "id": "452386", "author": { "name": "ssekhri", "key": "ssekhri", "displayName": "Satyam Sekhri", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Verified on:\r\nMac OS 10.14.6\r\nTi SDK: 8.3.0.v20191030085531\r\nAppc CLI: 7.1.1\r\nNode: 10.5.0\r\nJDK: 1.8.0_162\r\nStudio: 5.1.4.201909061933\r\nDevice: Nexus4 (v5.1.1), Pixel3(v10.0) emulator", "updateAuthor": { "name": "ssekhri", "key": "ssekhri", "displayName": "Satyam Sekhri", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2019-10-30T18:22:42.000+0000", "updated": "2019-10-30T18:22:42.000+0000" } ], "maxResults": 14, "total": 14, "startAt": 0 } } }