{ "id": "124521", "key": "TIMOB-16150", "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": "15817", "description": "2014 Sprint 01", "name": "2014 Sprint 01", "archived": true, "released": true, "releaseDate": "2014-01-17" }, { "id": "15819", "description": "2014 Sprint 01 Core", "name": "2014 Sprint 01 Core", "archived": true, "released": true, "releaseDate": "2014-01-17" }, { "id": "15422", "description": "Release 3.3.0", "name": "Release 3.3.0", "archived": false, "released": true, "releaseDate": "2014-07-16" } ], "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": "2014-01-13T21:42:19.000+0000", "created": "2014-01-08T12:38:47.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "supportTeam", "triage" ], "versions": [ { "id": "14982", "description": "Release 3.2.0", "name": "Release 3.2.0", "archived": false, "released": true, "releaseDate": "2013-12-19" } ], "issuelinks": [], "assignee": { "name": "ayeung", "key": "ayeung", "displayName": "Allen Yeung", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-31T21:53:25.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": "h2. Description\r\nwebview.evalJS returns error in case of android while it works fine for iOS.\r\nIt is used to call returnSomething() in webview which in turn return some text. for android it returns null with below warning :\r\n\r\n[WARN] : TiWebViewBinding: (KrollRuntimeThread) [1644,95408] Timeout waiting to evaluate JS\r\n\r\n\r\nh2. Test Case\r\napp.js\r\n{code}\r\nvar win = Titanium.UI.createWindow({\r\n backgroundColor : '#fff'\r\n});\r\n\r\nvar button = Ti.UI.createButton({\r\n title: \"Do something\",\r\n top: 10\r\n});\r\n\r\nbutton.addEventListener(\"click\", function() {\r\n Ti.API.info(\"button click\");\r\n var something = webview.evalJS(\"returnSomething()\");\r\n alert(\"Button click returned \" + something);\r\n});\r\n\r\nwin.add(button);\r\n\r\nvar webview = Titanium.UI.createWebView({\r\n top: 100,\r\n url: '/test.html' \r\n});\r\nwin.add(webview);\r\n\r\nwin.open();\r\n{code}\r\n\r\ntest.html\r\n{code}\r\n\r\n\r\n I am in test.html\r\n\r\n\r\n\r\n{code}\r\n\r\nh4. Expected output\r\n\r\nClicking the button labeled \"Do something\" should alert\r\n\"Button click returned something returned from test.html\"\r\n\r\nh4. Actual output\r\n\r\niOS: \r\nIt works fine.\r\n\r\nAndroid:\r\n[WARN] : TiWebViewBinding: (KrollRuntimeThread) [1644,95408] Timeout waiting to evaluate JS\r\n\r\nNote : Its reproducible for android 4.3 only\r\n", "attachment": [], "flagged": false, "summary": "Android: WebView evalJS causes error", "creator": { "name": "rsharma", "key": "rsharma", "displayName": "Rupesh Sharma", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "rsharma", "key": "rsharma", "displayName": "Rupesh Sharma", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Android : 4.3\r\nSDK 3.2.0GA", "comment": { "comments": [ { "id": "288018", "author": { "name": "ayeung", "key": "ayeung", "displayName": "Allen Yeung", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I tried this on Titanium SDK 3.2.0.GA:\r\n\r\nNexus 7 (4.3)\r\nNexus 5 (4.4)\r\nSamsung SII (2.3)\r\n\r\nI was unable to reproduce the issue. I always get the \"Button click returned something returned from test.html\" alert dialog.", "updateAuthor": { "name": "ayeung", "key": "ayeung", "displayName": "Allen Yeung", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-01-13T21:42:19.000+0000", "updated": "2014-01-13T21:42:19.000+0000" }, { "id": "288440", "author": { "name": "rsharma", "key": "rsharma", "displayName": "Rupesh Sharma", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Hi,\nThis issue is reproducible on android 4.3 version. I tested it on samsung galaxy s3.\n\nRegards,\nRupesh", "updateAuthor": { "name": "rsharma", "key": "rsharma", "displayName": "Rupesh Sharma", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-01-16T12:19:57.000+0000", "updated": "2014-01-16T12:19:57.000+0000" }, { "id": "290064", "author": { "name": "timanrebel", "key": "timanrebel", "displayName": "Timan Rebel", "active": true, "timeZone": "Europe/London" }, "body": "Rupesh, I have these errors as well. Against which Android API are you building?", "updateAuthor": { "name": "timanrebel", "key": "timanrebel", "displayName": "Timan Rebel", "active": true, "timeZone": "Europe/London" }, "created": "2014-01-28T20:34:05.000+0000", "updated": "2014-01-28T20:34:05.000+0000" }, { "id": "416545", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Unable to reproduce this issue, tested with the following environment; \r\nPixel (7.1) \r\nMacOS 10.11.6 (15G31) \r\nStudio 4.8.1.201612050850 \r\nTi SDK 6.0.2 GA \r\nAppc NPM 4.2.8 \r\nAppc CLI 6.1.0 \r\nTi CLI 5.0.11 \r\nAlloy 1.9.5 \r\nArrow 1.10.1 \r\nXcode 8.2 (8C38) \r\nNode v4.6.0 \r\nJava 1.7.0_80", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-31T21:53:25.000+0000", "updated": "2017-03-31T21:53:25.000+0000" } ], "maxResults": 5, "total": 5, "startAt": 0 } } }