{ "id": "140196", "key": "TIMOB-18969", "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": null, "resolutiondate": null, "created": "2014-11-22T00:48:48.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [ "actionbar", "android", "evaljs", "lollipop", "timeout" ], "versions": [], "issuelinks": [], "assignee": null, "updated": "2018-02-28T19:55:37.000+0000", "status": { "description": "The issue is open and ready for the assignee to start work on it.", "name": "Open", "id": "1", "statusCategory": { "id": 2, "key": "new", "colorName": "blue-gray", "name": "To Do" } }, "components": [ { "id": "10202", "name": "Android", "description": "Android Platform" } ], "description": "Unless I'm just plain doing something wrong, something is broken on 5.0 (using Ti 3.3.0 or 3.4.1 — doesn't matter which.)\r\n\r\nWhat I need to do is, after the home/back button is tapped on the ActionBar, have the app call into the WebView's JS code. But it seems that on Android 5.0, any evalJS() after onHomeIconItemSelected() is called will result in a timeout.\r\n\r\napp.js, test.html, and test.js: http://pastebin.com/HCGXjEsY\r\n\r\nWorks on Android 4.4; subsequently broken on a device just upgraded to 5.0.\r\n\r\nOn Android 4.4, the output is the expected result:\r\n\r\n[INFO] : 'mytest'\r\n[INFO] : doTest()\r\n\r\nBut on Android 5.0, the output is:\r\n\r\n[INFO] : 'mytest'\r\n[WARN] : TiWebViewBinding: (KrollRuntimeThread) [50477,50477] Timeout waiting to evaluate JS\r\n\r\nNote that doing it as an event isn't necessary to cause the timeout; I'm doing that because it caused other problems previously, so the way to overcome any context-related issues seemed to be to let the app handle it not in a UI callback. Replacing win.fireEvent('mytest') with view.evalJS('doTest()') directly makes no difference — the evalJS() call still times out.\r\n\r\nCan this be confirmed as indeed failing (newly) on 5.0? And if so is there a known workaround?", "attachment": [], "flagged": false, "summary": "Android: ActionBar.onHomeIconItemSelected() breaks evalJS() on Android 5.0", "creator": { "name": "kt", "key": "kt", "displayName": "KT", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "kt", "key": "kt", "displayName": "KT", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Android 5.0, Ti 3.3.0 or 3.4.1", "comment": { "comments": [], "maxResults": 2, "total": 2, "startAt": 0 } } }