{ "id": "140651", "key": "TIMOB-19333", "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": [], "resolution": null, "resolutiondate": null, "created": "2014-11-27T03:12:04.000+0000", "priority": { "name": "None", "id": "6" }, "labels": [], "versions": [], "issuelinks": [ { "id": "48412", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "133990", "key": "TIMOB-17502", "fields": { "summary": "iOS: URLSession Module returns blob instead of file location - causing low memory crash", "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": "48411", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "149729", "key": "TIMOB-19334", "fields": { "summary": "iOS: URLSession - large file download in the background - some events are not fired and other issues.", "status": { "description": "The issue is open and ready for the assignee to start work on it.", "name": "Open", "id": "1", "statusCategory": { "id": 2, "key": "new", "colorName": "blue-gray", "name": "To Do" } }, "priority": { "name": "None", "id": "6" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": null, "updated": "2018-02-28T19:55:17.000+0000", "status": { "description": "The issue is open and ready for the assignee to start work on it.", "name": "Open", "id": "1", "statusCategory": { "id": 2, "key": "new", "colorName": "blue-gray", "name": "To Do" } }, "components": [ { "id": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "If the system terminates the app during a download, after the download finishes (the app remains not running), there are some problems:\r\n\r\n1. backgroundtransfer is the last event fired (should be the first)\r\n\r\n2. downloadcompleted event handler doesn't get the file blob (evt.data.size==0)\r\n\r\nIf the system terminates the app during a download, before the download finishes, you launch the app and cancel the download, there is one problem:\r\n\r\n1. The partially downloaded file is remained in the storage, not cleaned up. UPDATE: With SDK 4.1.0, it seems the partially downloaded file is cleaned up in this scenario.\r\n\r\nThese issues didn't exist in previous SDKs, as I've tested it before.\r\n\r\nTo simulate system terminating the app:\r\n\r\n1. download a large enough file\r\n\r\n2. during the download, using the Studio to build the app to the device\r\n\r\n3. App installed successfully on the device, causing the running instance terminated by the system\r\n\r\n4. test the above two scenarios.", "attachment": [ { "id": "52979", "filename": "app.zip", "author": { "name": "shawnlan", "key": "shawnlan", "displayName": "Shawn Lan", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-12-03T02:00:56.000+0000", "size": 8485566, "mimeType": "application/zip" } ], "flagged": false, "summary": "iOS: URLSession Module not working properly if system terminates the app during download", "creator": { "name": "shawnlan", "key": "shawnlan", "displayName": "Shawn Lan", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "shawnlan", "key": "shawnlan", "displayName": "Shawn Lan", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "SDK 3.4.1, iOS 8", "comment": { "comments": [ { "id": "333988", "author": { "name": "sliang", "key": "sliang", "displayName": "Shuo Liang", "active": true, "timeZone": "Asia/Harbin" }, "body": "Hi,\r\n\r\nPlease provide a simple test case for this problem, that will be helpful to address the issues. Thanks.\r\n\r\nRegard,\r\nShuo", "updateAuthor": { "name": "sliang", "key": "sliang", "displayName": "Shuo Liang", "active": true, "timeZone": "Asia/Harbin" }, "created": "2014-11-27T04:00:32.000+0000", "updated": "2014-11-27T04:00:32.000+0000" }, { "id": "334462", "author": { "name": "shawnlan", "key": "shawnlan", "displayName": "Shawn Lan", "active": true, "timeZone": "America/Los_Angeles" }, "body": "okay I attached a simple test app.", "updateAuthor": { "name": "shawnlan", "key": "shawnlan", "displayName": "Shawn Lan", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-12-03T02:01:47.000+0000", "updated": "2014-12-03T02:01:47.000+0000" }, { "id": "360587", "author": { "name": "shawnlan", "key": "shawnlan", "displayName": "Shawn Lan", "active": true, "timeZone": "America/Los_Angeles" }, "body": "The reason for the first issue is that in my app the session is created right away at launch. I do so because I need to update the download progress to the users.\r\n\r\nIf I don't need the session to be created at launch, then I can just create session after \"backgroundtransfer\" is fired. That way, the first issue is gone.\r\n\r\nEven so it's still a bug. The \"backgroundtransfer\" should always be the first to fire no matter what. And like I said, I need the session be created at launch. \r\n\r\nUPDATE: downloadcompleted event handler doesn't get the file blob (evt.data.size==0) --- this issue seems fixed with SDK 4.1.0 (or with latest iOS version)", "updateAuthor": { "name": "shawnlan", "key": "shawnlan", "displayName": "Shawn Lan", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2015-08-20T23:22:31.000+0000", "updated": "2015-08-20T23:34:17.000+0000" } ], "maxResults": 6, "total": 6, "startAt": 0 } } }