{ "id": "63941", "key": "TIMOB-3309", "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": "11244", "name": "Release 1.7.0", "archived": true, "released": true, "releaseDate": "2011-06-13" }, { "id": "11251", "name": "Sprint 2011-16", "archived": true, "released": true, "releaseDate": "2011-04-25" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2011-05-18T09:16:39.000+0000", "created": "2011-04-15T03:41:51.000+0000", "priority": { "name": "Trivial", "id": "5" }, "labels": [ "defect", "ios", "klist", "release-1.7.0", "reported-1.7.0", "rplist" ], "versions": [], "issuelinks": [], "assignee": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2011-05-18T09:16:39.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": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "{html}
I've noticed several people trying to use certain properties\nthat will crash the app. One such example:
\nHD Ticket here: http://developer.appcelerator.com/helpdesk/view/76207
\nWill crash the app:
\n var data = {\n link: \"https://developer.mozilla.org/en/JavaScript\",\n name: \"Best online Javascript reference\",\n message: \"Use Mozilla's online Javascript reference\",\n caption: \"MDN Javascript Reference\",\n picture: \"https://developer.mozilla.org/media/img/mdn-logo.png\",\n description: \"This section of the site is dedicated to JavaScript-the-language, the parts that are not specific to web pages or other host environments...\",\n test: [ {foo: 'some test'} ]\n };\n Titanium.Facebook.requestWithGraphPath('me/feed', data, 'POST', function(e) {//...});
\n
\nException thrown: http://pastie.org/1651703
\nWill crash the app with no exception:
\n var data = {\n link: \"https://developer.mozilla.org/en/JavaScript\",\n name: \"Best online Javascript reference\",\n message: \"Use Mozilla's online Javascript reference\",\n caption: \"MDN Javascript Reference\",\n picture: \"https://developer.mozilla.org/media/img/mdn-logo.png\",\n description: \"This section of the site is dedicated to JavaScript-the-language, the parts that are not specific to web pages or other host environments...\",\n test: ['test']\n };\n Titanium.Facebook.requestWithGraphPath('me/feed', data, 'POST', function(e) {//...});
\n
\nWill not crash the app:
\n var data = {\n link: \"https://developer.mozilla.org/en/JavaScript\",\n name: \"Best online Javascript reference\",\n message: \"Use Mozilla's online Javascript reference\",\n caption: \"MDN Javascript Reference\",\n picture: \"https://developer.mozilla.org/media/img/mdn-logo.png\",\n description: \"This section of the site is dedicated to JavaScript-the-language, the parts that are not specific to web pages or other host environments...\",\n test: 'test'\n };\n Titanium.Facebook.requestWithGraphPath('me/feed', data, 'POST', function(e) {//...});
\n
\nEven though 'test' property is irrelevant to the graph API, this\nshould still not throw an exception from our side of things.\nFacebook does have a few properties that require an object literal\n/ dictionary.
A more relavent test is the following, since the privacy api's\nexpect this type of object:
\n\n var data = {\n privacy: { value: 'CUSTOM', friends: 'SELF' },\n name: \"Review this: Best online Javascript reference\",\n message: \"Use Mozilla's online Javascript reference\"\n };\n \n Ti.Facebook.requestWithGraphPath('me/feed', data, 'POST', function(e) {// ...});
\n
\nStack trace here: http://pastie.org/1723291
\nIf a property is an object literal / dictionary it will throw\nthe above exception. If it's an array, it will simply crash with no\nexception given.
The workaround for the above is as follows:
\n\n var data = {\n privacy: '{ value: \"CUSTOM\", friends: \"SELF\" }',\n name: \"Review this: Best online Javascript reference\",\n message: \"Use Mozilla's online Javascript reference\"\n };
\n
\nThis will work fine as long as the object literal is actually a\nstring.
klist'd, fixed reported-1.7.0 tag, set milestone to tbs
and assigned to Reggie