Title: Webview Crash With Android 8.1.0 / Chromium 67.0.3396.68 · Issue #1075 · NativeScript/android · GitHub
Open Graph Title: Webview Crash With Android 8.1.0 / Chromium 67.0.3396.68 · Issue #1075 · NativeScript/android
X Title: Webview Crash With Android 8.1.0 / Chromium 67.0.3396.68 · Issue #1075 · NativeScript/android
Description: Did you verify this is a real problem by searching the NativeScript Forum https://discourse.nativescript.org/t/webview-causes-app-crash-on-android-with-chrome-67-release/6202 Tell us about the problem With the latest chrome (67.0.3396.68...
Open Graph Description: Did you verify this is a real problem by searching the NativeScript Forum https://discourse.nativescript.org/t/webview-causes-app-crash-on-android-with-chrome-67-release/6202 Tell us about the prob...
X Description: Did you verify this is a real problem by searching the NativeScript Forum https://discourse.nativescript.org/t/webview-causes-app-crash-on-android-with-chrome-67-release/6202 Tell us about the prob...
Opengraph URL: https://github.com/NativeScript/android/issues/1075
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Webview Crash With Android 8.1.0 / Chromium 67.0.3396.68","articleBody":"Did you verify this is a real problem by searching the NativeScript Forum\r\nhttps://discourse.nativescript.org/t/webview-causes-app-crash-on-android-with-chrome-67-release/6202\r\n\r\nTell us about the problem\r\nWith the latest chrome (67.0.3396.68) update on Android 8.1.0 webview is crashing. \r\n\r\nPlease provide the following version numbers that your issue occurs with:\r\n- CLI: 3.4.2\r\n- tns-android: 3.4.2\r\n- Android: 8.1.0\r\n- Chromium: 67.0.3396.68\r\n\r\nAfter further debugging, \r\nInvoking of onReceivedError on webviewclient is causing the null pointer exception in Runtime.java (https://github.com/NativeScript/android-runtime/blob/v3.4.2/test-app/runtime/src/main/java/com/tns/Runtime.java), Line number 682: (String pname = p.getName();) \r\n\r\nAfter the chrome update on the device, the 2nd(android.webkit.WebResourceRequest) and 3rd (android.webkit.WebResourceError) parameters of function onReceivedError of WebViewClient received object whose class is having empty package. This causes line 679 of https://github.com/NativeScript/android-runtime/blob/v3.4.2/test-app/runtime/src/main/java/com/tns/Runtime.java [clazz.getPackage();] to return null. And subsequently this causes null pointer exception on line 682 of same file [ String pname = p.getName(); ] . \r\n\r\nPrinting the class names inside the function getTypeMetadata, with latest chrome as webview, gives class vS, class vR. \r\n\r\nBut in the device if I select to use android webview instead of chrome webview, it gives class as com.android.webview.chromium.xz, com.android.webview.chromium.WL. \r\n\r\nSo essentially the function getTypeMetadata is not handling classes with empty packages. \r\nSo instaed of:\r\n```\r\nPackage p = (mostOuterClass != null)\r\n ? mostOuterClass.getPackage()\r\n : clazz.getPackage();\r\nint packageCount = 1;\r\nString pname = p.getName();\r\n```\r\nchanging to:\r\n```\r\nPackage p = (mostOuterClass != null)\r\n ? mostOuterClass.getPackage()\r\n : clazz.getPackage();\r\nint packageCount = p != null ? 1 : 0;\r\nString pname = p != null ? p.getName() : \"\";\r\n```\r\nThis seems to be fixing the issue.","author":{"url":"https://github.com/sud80","@type":"Person","name":"sud80"},"datePublished":"2018-06-04T07:25:54Z","url":"https://github.com/NativeScript/android/issues/1075"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:d210a5b1-fe0c-cf75-b220-991525037633 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 833C:117C62:16E2576:1E83B03:6B014265 |
| html-safe-nonce | b1060090a13565acb5ac04097da535c9bbfc3b44fea52b117b59c71b4c12dc6b |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4MzNDOjExN0M2MjoxNkUyNTc2OjFFODNCMDM6NkIwMTQyNjUiLCJ2aXNpdG9yX2lkIjoiNjgwOTgzMTkyMTMzMDI0MjE1MCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 24063e1d74e863f107f2a1d2f08c15e5b8a2480da8e83765d5a81a16b51a38d5 |
| hovercard-subject-tag | issue:328937434 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/NativeScript/android/1075/issue_layout |
| twitter:image | https://opengraph.githubassets.com/bafb0742c1a2697e2eddb01f1ce23443344a0c576fb3dac6a2edb11a9b3f811d/NativeScript/android/issues/1075 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/bafb0742c1a2697e2eddb01f1ce23443344a0c576fb3dac6a2edb11a9b3f811d/NativeScript/android/issues/1075 |
| og:image:alt | Did you verify this is a real problem by searching the NativeScript Forum https://discourse.nativescript.org/t/webview-causes-app-crash-on-android-with-chrome-67-release/6202 Tell us about the prob... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | sud80 |
| hostname | github.com |
| expected-hostname | github.com |
| None | cc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c |
| turbo-cache-control | no-preview |
| go-import | github.com/NativeScript/android git https://github.com/NativeScript/android.git |
| octolytics-dimension-user_id | 7392261 |
| octolytics-dimension-user_login | NativeScript |
| octolytics-dimension-repository_id | 29137950 |
| octolytics-dimension-repository_nwo | NativeScript/android |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 29137950 |
| octolytics-dimension-repository_network_root_nwo | NativeScript/android |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 8c77c9e8439031ad54c75a250694842892f693e1 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width