{ "id": "90060", "key": "TIMOB-8732", "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": "3", "description": "The problem is a duplicate of an existing issue.", "name": "Duplicate" }, "resolutiondate": "2012-05-15T11:50:35.000+0000", "created": "2012-04-13T17:47:43.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "api" ], "versions": [ { "id": "12593", "name": "Release 2.0.0", "archived": false, "released": true, "releaseDate": "2012-03-30" }, { "id": "13070", "description": "Release 1.8 Service Pack 2", "name": "Release 1.8.2", "archived": true, "released": true, "releaseDate": "2012-02-29" } ], "issuelinks": [ { "id": "17272", "type": { "id": "10002", "name": "Duplicate", "inward": "is duplicated by", "outward": "duplicates" }, "outwardIssue": { "id": "88845", "key": "TIMOB-8308", "fields": { "summary": "Android: Javascript array [] seems to have some inconsistence behavior compared to iOS", "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 } } } } ], "assignee": { "name": "joshroesslein", "key": "joshroesslein", "displayName": "Josh Roesslein", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-10T19:14: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": "10202", "name": "Android", "description": "Android Platform" } ], "description": "When JavaScript objects are accessed from webview, ljava.lang.object error is thrown. Javascript objects are defined in a js file, which is then passed to html page using fireevent. The values are retrieved correctly in iOS.\r\n\r\nsnippet of JS file:\r\n{code}var win = Ti.UI.currentWindow;\r\n\r\nvar activity_obj = {\r\n\tscreen_name: [],\r\n\tidea_title : []\r\n};\r\n\r\nactivity_obj.screen_name[0] = 'bhushan';\r\nactivity_obj.screen_name[1] = 'bhaskar';\r\nactivity_obj.screen_name[2] = 'deore';\r\n\r\nactivity_obj.idea_title[0] = 'android';\r\nactivity_obj.idea_title[1] = 'iphone';\r\nactivity_obj.idea_title[2] = 'app';\r\n\r\nvar webView = Ti.UI.createWebView({\r\n\turl:'webview_logging.html',\r\n\theight:400\r\n\r\n});\r\nwin.add(webView);\r\n\r\nwebView.addEventListener('load', function(e) {\r\n\t\tTi.App.fireEvent('data', activity_obj);\t\r\n});\r\n\r\n{code}\r\n\r\nSnippet of html file:\r\n{code}\r\n\t\r\n\t\tWebview Logging\r\n\t\t\r\n\r\n\t\t\r\n\t\r\n\t\r\n\t\t
\r\n\t\t\tド標準第5版の刊行を大いに\r\n\t\t
\r\n\t\t\r\n\t\r\n{code}\r\n\r\nAlso attached crash log, and other js files, as a complete project.\r\n\r\nSteps to reproduce: Below are attached app.js and other files. Create a new project in titanium.create source folder under resources, and place all files excluding app.js. replace app.js with attached app.js. \r\n\r\nRun the project, and see the console.", "attachment": [ { "id": "27049", "filename": "app.js", "author": { "name": "dgandhi", "key": "dgandhi", "displayName": "Devang Gandhi", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-04-13T17:47:44.000+0000", "size": 421, "mimeType": "text/javascript" }, { "id": "27044", "filename": "log.txt", "author": { "name": "dgandhi", "key": "dgandhi", "displayName": "Devang Gandhi", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-04-13T17:47:43.000+0000", "size": 47676, "mimeType": "text/plain" }, { "id": "27045", "filename": "webview_logging.html", "author": { "name": "dgandhi", "key": "dgandhi", "displayName": "Devang Gandhi", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-04-13T17:47:43.000+0000", "size": 602, "mimeType": "text/html" }, { "id": "27046", "filename": "webview_repaint.js", "author": { "name": "dgandhi", "key": "dgandhi", "displayName": "Devang Gandhi", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-04-13T17:47:43.000+0000", "size": 526, "mimeType": "text/javascript" }, { "id": "27047", "filename": "webview.js", "author": { "name": "dgandhi", "key": "dgandhi", "displayName": "Devang Gandhi", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-04-13T17:47:43.000+0000", "size": 1005, "mimeType": "text/javascript" }, { "id": "27048", "filename": "xml2json.js", "author": { "name": "dgandhi", "key": "dgandhi", "displayName": "Devang Gandhi", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-04-13T17:47:44.000+0000", "size": 889, "mimeType": "text/javascript" } ], "flagged": false, "summary": "Android: Custom JavaScript objects sent in events to a WebView throw errors", "creator": { "name": "dgandhi", "key": "dgandhi", "displayName": "Devang Gandhi", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "dgandhi", "key": "dgandhi", "displayName": "Devang Gandhi", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Titanium Studio: 1.8.2, 2.0\r\nAndroid SDK: 2.2", "comment": { "comments": [ { "id": "194870", "author": { "name": "joshroesslein", "key": "joshroesslein", "displayName": "Josh Roesslein", "active": true, "timeZone": "America/Los_Angeles" }, "body": "This looks to be a duplicate of TIMOB-8308. Ran test case on latest master (2.1) CI and works fine.\r\n", "updateAuthor": { "name": "joshroesslein", "key": "joshroesslein", "displayName": "Josh Roesslein", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-05-15T11:49:55.000+0000", "updated": "2012-05-15T11:49:55.000+0000" }, { "id": "411303", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as duplicate.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-10T19:14:07.000+0000", "updated": "2017-03-10T19:14:07.000+0000" } ], "maxResults": 2, "total": 2, "startAt": 0 } } }