{ "id": "162845", "key": "MOD-2286", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10034", "key": "MOD", "name": "Appcelerator Modules", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [ { "id": "17524", "name": "Release 6.0.0", "archived": false, "released": true, "releaseDate": "2016-11-14" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2016-08-29T03:49:09.000+0000", "created": "2016-08-26T23:20:09.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "facebook", "graph", "mutating" ], "versions": [ { "id": "17275", "name": "Release 5.1.2", "archived": false, "released": true, "releaseDate": "2016-01-06" }, { "id": "17710", "name": "Release 5.3.0", "archived": false, "released": true, "releaseDate": "2016-06-04" }, { "id": "17723", "name": "Release 5.4.0", "archived": false, "released": true, "releaseDate": "2016-08-11" }, { "id": "17734", "name": "Release 5.2.1", "archived": false, "released": true, "releaseDate": "2016-03-25" } ], "issuelinks": [], "assignee": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "updated": "2018-08-06T17:49:12.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": "14521", "name": "Facebook" } ], "description": "When using the method {{requestWithGraphPath}} to send images to the graph, we unpack the blobs to {{NSData}} types internally. So far so good, but while doing that, we fast-iterate through the dictionary of parameters and mutate the value if it is a blob. That needs to be fixed. \r\n\r\nMore infos: http://stackoverflow.com/questions/39152131/appcelerator-facebook-module-error-posting-photo-on-ios\r\n\r\n*Expected behavior*: The {{requestWithGraphPath}} method succeeds, a new photo is uploaded to Facebook\r\n*Actual behavior*: The app fails with a {{*** Collection <__NSDictionaryM: 0x14ee27430> was mutated while being enumerated.}} error", "attachment": [], "flagged": false, "summary": "Ti.Facebook iOS: Sending Ti.Blob's in requestWithGraphPath throws mutating-error", "creator": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "subtasks": [], "reporter": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "environment": null, "closedSprints": [ { "id": 704, "state": "closed", "name": "2016 Sprint 18 SDK", "startDate": "2016-08-27T00:18:36.960Z", "endDate": "2016-09-10T00:18:00.000Z", "completeDate": "2016-09-09T20:26:13.865Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "394541", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "PR: https://github.com/appcelerator-modules/ti.facebook/pull/61\r\n\r\nDemo:\r\n{code:javascript}\r\nvar fb = require(\"facebook\");\r\nfb.initialize();\r\n\r\nvar win = Ti.UI.createWindow({\r\n backgroundColor: \"#fff\"\r\n});\r\nvar btn = Ti.UI.createButton({\r\n title: (fb.loggedIn) ? \"Request write permissions and submit\" : \"Login\"\r\n});\r\n \r\nbtn.addEventListener(\"click\", function() {\r\n if (fb.loggedIn) {\r\n requestPublishPermissions();\r\n } else {\r\n fb.permissions = ['email'];\r\n fb.authorize();\r\n }\r\n});\r\n \r\nfb.addEventListener(\"login\", function(_e) {\r\n if (!_e.success) {\r\n btn.setTitle(\"Login\");\r\n Ti.API.error(\"Login cancelled/failed!\");\r\n Ti.API.error(_e);\r\n return;\r\n } else {\r\n Ti.API.info(\"Login succeeded\");\r\n btn.setTitle(\"Request write permissions and submit\");\r\n } \r\n});\r\n\r\nfunction requestPublishPermissions() {\r\n fb.requestNewPublishPermissions(['publish_actions'], fb.AUDIENCE_ONLY_ME, function(e) {\r\n if (!e.success) {\r\n alert(\"Publish permissions denied!\");\r\n return;\r\n }\r\n \r\n var blob = Ti.UI.createView({\r\n width: 500,\r\n height: 500,\r\n backgroundColor: \"green\"\r\n }).toImage();\r\n \r\n var args = {\r\n picture: blob,\r\n caption: \"Great green view\"\r\n };\r\n \r\n fb.requestWithGraphPath('me/photos', args, \"POST\", showRequestResult);\r\n });\r\n\r\n}\r\n\r\nfunction showRequestResult(e) {\r\n alert(\"Photo has been submitted, check your facebook photo album\");\r\n Ti.API.info(e);\r\n}\r\n \r\nwin.add(btn);\r\nwin.open();\r\n{code}\r\n\r\nA compiled version of the module is attached to the PR.\r\n\r\n[~cng] I would like to have this in 6.0.0, let me know if that's ok and I'll prepare the SDK-PR's.", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-08-26T23:25:56.000+0000", "updated": "2016-08-27T11:13:47.000+0000" }, { "id": "394597", "author": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "body": "CR and FT passed. APPROVED. (Good fix btw). Please back port for 6.0.0. And also indicate *Expected Result* and any additional helpful information in your test so that QE can verify easily later.", "updateAuthor": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2016-08-29T03:48:42.000+0000", "updated": "2016-08-29T03:48:42.000+0000" }, { "id": "394621", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "Information updated, new Ti.Facebook version released on Github, prepackaged module updated for master and 6_0_X.", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-08-29T07:49:36.000+0000", "updated": "2016-08-29T07:49:36.000+0000" }, { "id": "440063", "author": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Cleaning up older fixed issues. If this issue should not have been closed as fixed, please reopen.", "updateAuthor": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-08-06T17:49:12.000+0000", "updated": "2018-08-06T17:49:12.000+0000" } ], "maxResults": 4, "total": 4, "startAt": 0 } } }