{
"id": "155950",
"key": "TIMOB-23125",
"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": "17706",
"name": "Release 5.4.0",
"archived": false,
"released": true,
"releaseDate": "2016-08-11"
}
],
"resolution": {
"id": "1",
"description": "A fix for this issue is checked into the tree and tested.",
"name": "Fixed"
},
"resolutiondate": "2016-06-28T03:45:07.000+0000",
"created": "2016-03-24T14:24:04.000+0000",
"priority": {
"name": "Critical",
"id": "1"
},
"labels": [
"gallery",
"image",
"media",
"qe-5.4.0"
],
"versions": [
{
"id": "17684",
"name": "Release 5.2.1",
"archived": false,
"released": true,
"releaseDate": "2016-03-25"
}
],
"issuelinks": [
{
"id": "51190",
"type": {
"id": "10020",
"name": "Depends",
"inward": "is dependent of",
"outward": "depends on"
},
"outwardIssue": {
"id": "159070",
"key": "TIMOB-23115",
"fields": {
"summary": "Windows: ImageView.image doesn't handle Ti.File/Blob",
"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": "High",
"id": "2"
},
"issuetype": {
"id": "4",
"description": "An improvement or enhancement to an existing feature or task.",
"name": "Improvement",
"subtask": false
}
}
}
},
{
"id": "52088",
"type": {
"id": "10003",
"name": "Relates",
"inward": "relates to",
"outward": "relates to"
},
"outwardIssue": {
"id": "161396",
"key": "TIMOB-23568",
"fields": {
"summary": "Windows: JSON.stringify against Blob causes app freeze",
"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": "Medium",
"id": "3"
},
"issuetype": {
"id": "1",
"description": "A problem which impairs or prevents the functions of the product.",
"name": "Bug",
"subtask": false
}
}
}
}
],
"assignee": {
"name": "kiguchi",
"key": "kota",
"displayName": "Kota Iguchi",
"active": false,
"timeZone": "America/Los_Angeles"
},
"updated": "2016-06-28T17:08:07.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": "It's affected 5.2.0\r\n\r\nError code: -1;\r\nError message: 'Failed to load content from file'\r\n\r\n*index.js:*\r\n{code:javascript}\r\nfunction onTest() {\r\n\tTitanium.Media.openPhotoGallery({\r\n \t\tmediaTypes: [Ti.Media.MEDIA_TYPE_PHOTO],\r\n\t\tsuccess: function(e) {\r\n\t\t\t$.imageView.image = e.media;\r\n\t\t},\r\n\t\terror: function(error) {\t\t\t\r\n\t\t\tTitanium.UI.createAlertDialog({\r\n\t\t\t\ttitle: error.code,\r\n\t\t\t\tmessage: error.error,\r\n\t\t\t\tok: 'ok'\r\n\t\t\t}).show();\r\n\t\t}\r\n\t});\r\n}\r\n\r\n$.win.open();\r\n{code}\r\n\r\n*index.xml:*\r\n{noformat}\r\n\r\n \r\n\t\t \r\n\t\t \r\n\t\t \t\r\n\t\t \r\n \r\n\r\n{noformat}",
"attachment": [],
"flagged": false,
"summary": "Windows: getting photo from gallery fails",
"creator": {
"name": "zozo4kin",
"key": "zozo4kin",
"displayName": "Zakhar Zhuravlev",
"active": true,
"timeZone": "America/Los_Angeles"
},
"subtasks": [],
"reporter": {
"name": "zozo4kin",
"key": "zozo4kin",
"displayName": "Zakhar Zhuravlev",
"active": true,
"timeZone": "America/Los_Angeles"
},
"environment": null,
"closedSprints": [
{
"id": 641,
"state": "closed",
"name": "2016 Sprint 12 SDK",
"startDate": "2016-06-04T00:30:28.612Z",
"endDate": "2016-06-18T00:30:00.000Z",
"completeDate": "2016-06-20T04:25:16.065Z",
"originBoardId": 114
},
{
"id": 614,
"state": "closed",
"name": "2016 Sprint 07 SDK",
"startDate": "2016-03-26T00:38:56.432Z",
"endDate": "2016-04-09T00:38:00.000Z",
"completeDate": "2016-04-11T04:41:08.231Z",
"originBoardId": 114
},
{
"id": 649,
"state": "closed",
"name": "2016 Sprint 13 SDK",
"startDate": "2016-06-18T00:25:17.303Z",
"endDate": "2016-07-02T00:25:00.000Z",
"completeDate": "2016-07-04T04:25:16.889Z",
"originBoardId": 114
}
],
"comment": {
"comments": [
{
"id": "381139",
"author": {
"name": "kiguchi",
"key": "kota",
"displayName": "Kota Iguchi",
"active": false,
"timeZone": "America/Los_Angeles"
},
"body": "There are two issues related to this. One is you needed to configure {{picturesLibrary}} capability in {{tiapp.xml}} to enable permission to access Windows photo library. The other issue is TIMOB-23115, because of that {{ImageView}} doesn't accept {{Blob}}. So this issue actually depends on TIMOB-23115. Also we'll need to update the document so we can find appropriate configuration easily.\r\n\r\n{code:xml|title=tiapp.xml}\r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n{code}",
"updateAuthor": {
"name": "kiguchi",
"key": "kota",
"displayName": "Kota Iguchi",
"active": false,
"timeZone": "America/Los_Angeles"
},
"created": "2016-03-31T06:11:29.000+0000",
"updated": "2016-03-31T06:11:29.000+0000"
},
{
"id": "381260",
"author": {
"name": "kiguchi",
"key": "kota",
"displayName": "Kota Iguchi",
"active": false,
"timeZone": "America/Los_Angeles"
},
"body": "Confirmed that latest CI build (5.4.0.v20160331110910) fixes the issue. You can checkout latest build via {{ti sdk install -b master -d}}. Note that you'll need to set {{picturesLibrary}} to your {{tiapp.xml}} to get access to Windows pictures library like blow.\r\n\r\n{code:xml|title=tiapp.xml}\r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n{code}",
"updateAuthor": {
"name": "kiguchi",
"key": "kota",
"displayName": "Kota Iguchi",
"active": false,
"timeZone": "America/Los_Angeles"
},
"created": "2016-04-01T02:19:46.000+0000",
"updated": "2016-04-01T02:19:46.000+0000"
},
{
"id": "388210",
"author": {
"name": "jlongton",
"key": "jlongton",
"displayName": "Josh Longton",
"active": true,
"timeZone": "Europe/London"
},
"body": "I am still able to reproduce this issue using:\r\n\r\n*Device:* Windows Phone 10.0\r\n*Node.js Version:* 4.4.4\r\n*npm Version:* 4.2.7-2\r\n*Titanium SDK:* 5.4.0.v20160608165242\r\n*Appcelerator CLI Version:* 5.4.0-15\r\n*Appcelerator Studio:* 4.6.0.201605201934\r\n\r\nI have added the code below the the TiApp and used the demo code in the comments above:\r\n\r\n{code:java}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n{code}\r\n\r\n\r\n*Reopening ticket*",
"updateAuthor": {
"name": "jlongton",
"key": "jlongton",
"displayName": "Josh Longton",
"active": true,
"timeZone": "Europe/London"
},
"created": "2016-06-13T17:40:19.000+0000",
"updated": "2016-06-13T17:42:25.000+0000"
},
{
"id": "388264",
"author": {
"name": "kiguchi",
"key": "kota",
"displayName": "Kota Iguchi",
"active": false,
"timeZone": "America/Los_Angeles"
},
"body": "Turns out it's a regression.\r\n\r\n5_4_X: https://github.com/appcelerator/titanium_mobile_windows/pull/742\r\nmaster: https://github.com/appcelerator/titanium_mobile_windows/pull/743",
"updateAuthor": {
"name": "kiguchi",
"key": "kota",
"displayName": "Kota Iguchi",
"active": false,
"timeZone": "America/Los_Angeles"
},
"created": "2016-06-14T04:32:25.000+0000",
"updated": "2016-06-14T04:32:25.000+0000"
},
{
"id": "388545",
"author": {
"name": "cwilliams",
"key": "cwilliams",
"displayName": "Christopher Williams",
"active": true,
"timeZone": "America/New_York"
},
"body": "Sounds like Ewan was able to confirm the fix, so I merged the fixes to 5_4_X and master.",
"updateAuthor": {
"name": "cwilliams",
"key": "cwilliams",
"displayName": "Christopher Williams",
"active": true,
"timeZone": "America/New_York"
},
"created": "2016-06-17T13:23:44.000+0000",
"updated": "2016-06-17T13:23:44.000+0000"
},
{
"id": "389186",
"author": {
"name": "jlongton",
"key": "jlongton",
"displayName": "Josh Longton",
"active": true,
"timeZone": "Europe/London"
},
"body": "I am still able to reproduce this issue application crashes or just shows a black screen using:\r\n\r\n*Device:* Windows Phone 10.0, 8.1\r\n*Node.js Version:* 4.4.4\r\n*npm Version:* 4.2.7-2\r\n*Titanium SDK:* 5.4.0.v20160627120037\r\n*Appcelerator CLI Version:* 5.4.0-18\r\n*Appcelerator Studio:* 4.7.0.201606150733 \r\n\r\n*App.js*\r\n{code:java}\r\nvar window = Ti.UI.createWindow({\r\n exitOnClose: true,\r\n});\r\nvar viewParent = Ti.UI.createView({\r\n width: '60%',\r\n height: '41%',\r\n top: '1%'\r\n});\r\n\r\nvar imageTaken = Ti.UI.createImageView({\r\n width: Ti.UI.FILL,\r\n height: Ti.UI.FILL,\r\n});\r\n\r\nvar cameraImage = Ti.UI.createButton({\r\n title: \"Choose Photos\",\r\n bottom: '0%',\r\n height: '20%',\r\n font: {\r\n fontSize: 15,\r\n fontWeight: \"bold\"\r\n },\r\n width: Ti.UI.FILL,\r\n});\r\n\r\nviewParent.add(imageTaken);\r\nviewParent.add(cameraImage);\r\nwindow.add(viewParent);\r\n\r\ncameraImage.addEventListener('click', function (e) {\r\n\r\n Ti.Media.openPhotoGallery({\r\n autoHide: true,\r\n mediaTypes: [Ti.Media.MEDIA_TYPE_PHOTO],\r\n success: function (e) {\r\n if (e.mediaType === Ti.Media.MEDIA_TYPE_PHOTO) {\r\n imageTaken.image = e.media;\r\n Ti.API.info(JSON.stringify(e));\r\n Ti.API.info(imageTaken.image);\r\n }\r\n },\r\n cancel: function () {\r\n },\r\n error: function (err) {\r\n Ti.API.error(err);\r\n }\r\n });\r\n\r\n});\r\nwindow.open();\r\n{code}\r\n\r\n*Added to the Tiapp.xml*\r\n{code:java}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n{code}\r\n\r\n\r\n\r\n*Reopening*",
"updateAuthor": {
"name": "jlongton",
"key": "jlongton",
"displayName": "Josh Longton",
"active": true,
"timeZone": "Europe/London"
},
"created": "2016-06-27T22:36:50.000+0000",
"updated": "2016-06-27T22:36:50.000+0000"
},
{
"id": "389216",
"author": {
"name": "kiguchi",
"key": "kota",
"displayName": "Kota Iguchi",
"active": false,
"timeZone": "America/Los_Angeles"
},
"body": "[~jlongton] I was able to reproduce the crash, and it turns out it was because of {{JSON.stringify}} against {{Blob}}.\r\n\r\nWhen I remove {{JSON.stringify}} from {{success}} callback, it went through well for me. Can you try following?\r\n\r\n{code}\r\n success: function (e) {\r\n if (e.mediaType === Ti.Media.MEDIA_TYPE_PHOTO) {\r\n imageTaken.image = e.media;\r\n }\r\n },\r\n{code}\r\n\r\nSo if that's the case, it is because of {{Blob}}, not because of {{Ti.Media.openPhotoGallery}}. I would resolve this ticket, and create new ticket for Blob: TIMOB-23568",
"updateAuthor": {
"name": "kiguchi",
"key": "kota",
"displayName": "Kota Iguchi",
"active": false,
"timeZone": "America/Los_Angeles"
},
"created": "2016-06-28T03:45:07.000+0000",
"updated": "2016-06-28T03:45:07.000+0000"
},
{
"id": "389281",
"author": {
"name": "jlongton",
"key": "jlongton",
"displayName": "Josh Longton",
"active": true,
"timeZone": "Europe/London"
},
"body": "Verified as fixed.\r\nTested on:\r\nMicrosoft Lumia 640 (8.1)\r\nMicrosoft Lumia 640 (10)\r\nWindows 10 Pro\r\nStudio: 4.7.0.201606150733\r\nTi SDK: 5.4.0.v20160627224205\r\nAppc NPM: 4.2.7-2\r\nApp CLI: 5.4.0-20\r\nNode v4.4.4\r\n*Closing Ticket.*",
"updateAuthor": {
"name": "jlongton",
"key": "jlongton",
"displayName": "Josh Longton",
"active": true,
"timeZone": "Europe/London"
},
"created": "2016-06-28T17:07:57.000+0000",
"updated": "2016-06-28T17:07:57.000+0000"
}
],
"maxResults": 12,
"total": 12,
"startAt": 0
}
}
}