{ "id": "167918", "key": "TIMOB-24737", "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": "17608", "name": "Release 6.1.0", "archived": false, "released": true, "releaseDate": "2017-05-26" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2017-05-26T18:46:12.000+0000", "created": "2017-05-25T18:06:38.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [ "android", "regression", "webview" ], "versions": [ { "id": "17608", "name": "Release 6.1.0", "archived": false, "released": true, "releaseDate": "2017-05-26" } ], "issuelinks": [], "assignee": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-06-14T17:58:45.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": "*Edit from [~jquick]:*\r\nThe stack-trace indicates that this is actually a WebView bug, not a ListView bug. Please see my comment below this post.\r\n\r\n*Original Post:*\r\nPlease check/test 6.1.0.Rc on Android with Listview error, console log attached with file.\r\n\r\nThis error occurs when I use 6.1.0.RC with a listview in our production app. \r\nSwitching back to 6.0.4.GA, the error goes away.\r\n\r\nVersion I was testing with \r\n6.1.0.v20170524102117\r\n\r\niOS does not seem to be affected. Only on Android.\r\n\r\nCannot share full code as production code. \r\n\r\nListview has a headerView.\r\nListItem is...\r\n{code:js}\r\nvar listitem = {\r\n\ttemplate: 'template',\r\n\ttitle: {text: item.title},\r\n\tsubtitle: {text: item.subtitle},\r\n\tproperties: {\r\n\t\taccessoryType: Ti.UI.LIST_ACCESSORY_TYPE_DISCLOSURE,\r\n\t\titemId: item.itemId,\r\n\t\tmodname: item.modname,\r\n\t\tresourcetype: item.template\r\n\t}\r\n};\r\n{code}\r\n\r\nOutput:\r\n{code:bash}\r\n[WARN] : W/System.err: java.lang.IllegalArgumentException: Unable to convert null to boolean.\r\n[WARN] : W/System.err: \tat org.appcelerator.titanium.util.TiConvert.toBoolean(TiConvert.java:357)\r\n[WARN] : W/System.err: \tat ti.modules.titanium.ui.WebViewProxy.getDisableContextMenu(WebViewProxy.java:354)\r\n[WARN] : W/System.err: \tat org.appcelerator.kroll.runtime.v8.V8Object.nativeFireEvent(Native Method)\r\n[WARN] : W/System.err: \tat org.appcelerator.kroll.runtime.v8.V8Object.fireEvent(V8Object.java:62)\r\n[WARN] : W/System.err: \tat org.appcelerator.kroll.KrollProxy.doFireEvent(KrollProxy.java:872)\r\n[WARN] : W/System.err: \tat org.appcelerator.kroll.KrollProxy.handleMessage(KrollProxy.java:1095)\r\n[WARN] : W/System.err: \tat org.appcelerator.titanium.proxy.TiViewProxy.handleMessage(TiViewProxy.java:360)\r\n[WARN] : W/System.err: \tat ti.modules.titanium.ui.widget.listview.ListViewProxy.handleMessage(ListViewProxy.java:320)\r\n[WARN] : W/System.err: \tat android.os.Handler.dispatchMessage(Handler.java:98)\r\n[WARN] : W/System.err: \tat android.os.Looper.loop(Looper.java:148)\r\n[WARN] : W/System.err: \tat org.appcelerator.kroll.KrollRuntime$KrollRuntimeThread.run(KrollRuntime.java:118)\r\n[ERROR] : TiExceptionHandler: (main) [103,25598] ----- Titanium Javascript Runtime Error -----\r\n[ERROR] : TiExceptionHandler: (main) [0,25598] - In ti:/titanium.js:207,24\r\n[ERROR] : TiExceptionHandler: (main) [0,25598] - Message: Uncaught Unable to convert null to boolean.\r\n[ERROR] : TiExceptionHandler: (main) [0,25598] - Source: \t\t\tserialized[k] = this[k];\r\n[DEBUG] : ViewRootImpl: #1 mView = com.android.internal.policy.PhoneWindow$DecorView{99b1dd3 V.E...... R.....I. 0,0-0,0}\r\n[ERROR] : V8Exception: Exception occurred at ti:/titanium.js:207: Uncaught Unable to convert null to boolean.\r\n[ERROR] : V8Exception: Unable to convert null to boolean.\r\n[WARN] : TiBlob: (KrollRuntimeThread) [41,25639] getNativePath not supported for non-file blob types.\r\n[WARN] : TiBlob: (KrollRuntimeThread) [0,25639] getFile not supported for non-file blob types.\r\n{code}", "attachment": [], "flagged": false, "summary": "Android: Reading property \"WebView.disableContextMenu\" causes crash if never assigned", "creator": { "name": "threethirds", "key": "threethirds", "displayName": "Anthony Chung", "active": true, "timeZone": "Australia/Sydney" }, "subtasks": [], "reporter": { "name": "threethirds", "key": "threethirds", "displayName": "Anthony Chung", "active": true, "timeZone": "Australia/Sydney" }, "environment": null, "comment": { "comments": [ { "id": "420453", "author": { "name": "threethirds", "key": "threethirds", "displayName": "Anthony Chung", "active": true, "timeZone": "Australia/Sydney" }, "body": "In the production scenario where error is occuring: The headerview being applied to listsection headerview in this scenario is an Android webview.", "updateAuthor": { "name": "threethirds", "key": "threethirds", "displayName": "Anthony Chung", "active": true, "timeZone": "Australia/Sydney" }, "created": "2017-05-25T18:13:46.000+0000", "updated": "2017-05-25T18:13:46.000+0000" }, { "id": "420503", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "Looks like an issue inside the Web-View (do you embed one in your list-view)? Especially, do you use the {{disableContextMenu}} property? If you use the web-view inside the list-view, but don't use the above property, it may be something with default-values.", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2017-05-26T14:05:32.000+0000", "updated": "2017-05-26T14:05:32.000+0000" }, { "id": "420517", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I've confirmed that this is a WebView bug. It crashes when reading the \"WebView.disableContextMenu\" property if the property was never assigned.\r\n\r\nThe following code reproduces this issue:\r\n\r\n{code:javascript}\r\nvar window = Ti.UI.createWindow();\r\nvar webView = Ti.UI.createWebView(\r\n{\r\n\turl: \"https://appcelerator.com\",\r\n//\tdisableContextMenu: true,\r\n});\r\nwindow.add(webView);\r\nwindow.open();\r\n\r\n// Crashes when accessing \"disableContextMenu\" if property was never assigned.\r\nTi.API.info(\"- webView.disableContextMenu: \" + webView.disableContextMenu.toString());\r\n{code}\r\n\r\nWe're looking into fixing this bug now. Thanks for reporting this issue.\r\n\r\n*Work-around:*\r\nSet the \"disableContextMenu\" property to true/false in your createWebView() function call.\r\n", "updateAuthor": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-05-26T16:24:43.000+0000", "updated": "2017-05-26T16:25:30.000+0000" }, { "id": "420518", "author": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~jquick] Sorry, I forgot to mark it as {{In Progress}} when I assigned it to myself. It's an easy fix, I'm not sure if this issue is a regression though.\r\n\r\nmaster: https://github.com/appcelerator/titanium_mobile/pull/9092\r\n6_1_X: https://github.com/appcelerator/titanium_mobile/pull/9093", "updateAuthor": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-05-26T16:45:54.000+0000", "updated": "2017-05-26T16:48:32.000+0000" }, { "id": "421968", "author": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as fix is verified in 6.1.0.GA, 6.1.1.v20170609153006 and 6.2.0.v20170612114319. Test and other information can be found at: \r\nmaster: https://github.com/appcelerator/titanium_mobile/pull/9092\r\n6_1_X: https://github.com/appcelerator/titanium_mobile/pull/9093 ", "updateAuthor": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-06-14T17:58:38.000+0000", "updated": "2017-06-14T17:58:38.000+0000" } ], "maxResults": 5, "total": 5, "startAt": 0 } } }