{ "id": "117792", "key": "TIMOB-14717", "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": { "id": "5", "description": "All attempts at reproducing this issue failed, or not enough information was available to reproduce the issue. Reading the code produces no clues as to why this behavior would occur. If more information appears later, please reopen the issue.", "name": "Cannot Reproduce" }, "resolutiondate": "2013-07-31T16:02:25.000+0000", "created": "2013-07-30T23:08:08.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "blackberry", "crash", "properties" ], "versions": [ { "id": "15478", "description": "Release 3.1.1", "name": "Release 3.1.1", "archived": true, "released": true, "releaseDate": "2013-06-17" } ], "issuelinks": [], "assignee": { "name": "penrique", "key": "penrique", "displayName": "Pedro Enrique", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-16T20:25:49.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": "10230", "name": "BlackBerry", "description": "BlackBerry Platform" } ], "description": "The following line (alone) will crash the BlackBerry simulator if the property cannot be found. (In this case, the property name is \"Credentials\".)\r\n\r\n{code:javascript}var storedCredentials = JSON.parse(Ti.App.Properties.getString(\"Credentials\"));{code}\r\n\r\nHowever, if we set the property/value pair using setString() and then try getString(), everything works fine. For example, this will work:\r\n\r\n{code:javascript}// Build json string\r\noCredentials = new Object();\r\noCredentials.username = \"some username\";\r\noCredentials.password = \"some password\";\r\nvar stringCredentials = JSON.stringify(oCredentials);\r\n\t\t\t\t\r\n// Save credentials\r\nTi.App.Properties.setString(\"Credentials\", stringCredentials);\r\n\r\n// Read the credentials\r\nvar storedCredentials = JSON.parse(Ti.App.Properties.getString(\"Credentials\"));{code}", "attachment": [], "flagged": false, "summary": "BlackBerry: Crash with Ti.App.Properties.getString()", "creator": { "name": "bbar", "key": "bbar", "displayName": "Brent Barbata", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "bbar", "key": "bbar", "displayName": "Brent Barbata", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Blackberry 10 Simulator (on Windows 8). Titanium Studio, build: 3.1.1.201306112235.", "comment": { "comments": [ { "id": "264160", "author": { "name": "penrique", "key": "penrique", "displayName": "Pedro Enrique", "active": false, "timeZone": "America/Los_Angeles" }, "body": "I do not see a crash, I see message\r\n{code}\r\nUnexpected token u\r\n{code}\r\n\r\nThis appears when trying to JSON.stringify an undefined value. Same thing happens in a node.js console:\r\n\r\n{code}\r\n> JSON.parse(undefined)\r\nSyntaxError: Unexpected token u\r\n at Object.parse (native)\r\n at repl:1:7\r\n at REPLServer.self.eval (repl.js:109:21)\r\n at Interface. (repl.js:248:12)\r\n at Interface.EventEmitter.emit (events.js:96:17)\r\n at Interface._onLine (readline.js:200:10)\r\n at Interface._line (readline.js:518:8)\r\n at Interface._ttyWrite (readline.js:736:14)\r\n at ReadStream.onkeypress (readline.js:97:10)\r\n at ReadStream.EventEmitter.emit (events.js:126:20)\r\n> \r\n{code}", "updateAuthor": { "name": "penrique", "key": "penrique", "displayName": "Pedro Enrique", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2013-07-31T16:02:25.000+0000", "updated": "2013-07-31T16:02:25.000+0000" }, { "id": "412875", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as BlackBerry is no longer supported by us.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-16T20:25:49.000+0000", "updated": "2017-03-16T20:25:49.000+0000" } ], "maxResults": 2, "total": 2, "startAt": 0 } } }