question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

HTML Option crashes the WebView on Android 6

See original GitHub issue

Description: On Android 6, within a WebView, using com.google.android.material:material version >= 1.1.0, the render of an html option will crash the app. This doesn’t happen on Android > 6.

Expected behaviour: HTML Option should be rendered without crashing the app.

Source code:

<form>
	<select>
		<option>Option One</option>
		<option>Option Two</option>
	</select>
</form>

Android API version: 23

Material Library version: 1.1.0-alpha06, 1.2.0-alpha04, any > 1.0.0.

Device: SAMSUNG-SM-G900V (or any running Android 6).

Stacktrace: 02-06 14:18:31.467 930-930/com.ft.news E/AndroidRuntime: FATAL EXCEPTION: main Process: com.ft.news, PID: 930 android.content.res.Resources$NotFoundException: Resource ID #0x0 at android.content.res.Resources.getValue(Resources.java:2558) at android.content.res.Resources.loadXmlResourceParser(Resources.java:4360) at android.content.res.Resources.getLayout(Resources.java:2372) at android.view.LayoutInflater.inflate(LayoutInflater.java:427) at android.widget.ArrayAdapter.createViewFromResource(ArrayAdapter.java:378) at android.widget.ArrayAdapter.getView(ArrayAdapter.java:369) at Hv.getView(PG:13) at android.widget.AbsListView.obtainView(AbsListView.java:2929) at android.widget.ListView.measureHeightOfChildren(ListView.java:1305) at android.widget.ListView.onMeasure(ListView.java:1212) at android.view.View.measure(View.java:20151) at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6330) at android.widget.FrameLayout.onMeasure(FrameLayout.java:194) at android.view.View.measure(View.java:20151) at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6330) at android.widget.FrameLayout.onMeasure(FrameLayout.java:194) at android.view.View.measure(View.java:20151) at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6330) at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1464) at android.widget.LinearLayout.measureVertical(LinearLayout.java:747) at android.widget.LinearLayout.onMeasure(LinearLayout.java:629) at android.view.View.measure(View.java:20151) at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6330) at android.widget.FrameLayout.onMeasure(FrameLayout.java:194) at android.view.View.measure(View.java:20151) at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6330) at android.widget.FrameLayout.onMeasure(FrameLayout.java:194) at android.view.View.measure(View.java:20151) at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6330) at android.widget.FrameLayout.onMeasure(FrameLayout.java:194) at com.android.internal.policy.PhoneWindow$DecorView.onMeasure(PhoneWindow.java:3158) at android.view.View.measure(View.java:20151) at android.view.ViewRootImpl.performMeasure(ViewRootImpl.java:2594) at android.view.ViewRootImpl.measureHierarchy(ViewRootImpl.java:1524) at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1841) at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1437) at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:7397) at android.view.Choreographer$CallbackRecord.run(Choreographer.java:920) at android.view.Choreographer.doCallbacks(Choreographer.java:695) at android.view.Choreographer.doFrame(Choreographer.java:631) at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:906) at android.os.Handler.handleCallback(Handler.java:739) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:158) at android.app.ActivityThread.main(ActivityThread.java:7224) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
eyedolcommented, Feb 21, 2020

Faced a similar issue and it’s coming from appcompat v1.1.0 which is shipped with material-components. However, there’s a potential fix for certain cases here https://stackoverflow.com/a/58355733

0reactions
cketchamcommented, Feb 20, 2020

If you want more information, it looks like this is the bug that was fixed in 1.2.0-alpha02 of appcompat: http://issuetracker.google.com/issues/141351441

Read more comments on GitHub >

github_iconTop Results From Across the Web

Here's how to fix those mysterious Android WebView crashes
Updated WebView app should fix crashes ... Tap the three-dot menu at the top right of this screen, then select "Uninstall updates.
Read more >
Why does Android OS 8 WebVew with HTML select tag crash ...
"When a SELECT tag is clicked, Android internally displays its options using a native AlertDialog. Webview must be created with an Activity ...
Read more >
PSA: Update Android System WebView to fix crashing apps
Open the Play Store app · Search for “Android System WebView“ · Select Update. If it doesn't say “Update,” skip this step ·...
Read more >
485031 - Crash in Android WebView while navigating away ...
Issue 485031: Crash in Android WebView while navigating away from page with ongoing ajax request that injects HTML in error handler.
Read more >
Android system Webview update is crashing apps on my S22 ...
This is the 3rd time this year this app updating has broken my device. Even a factory reset did not fix the issue....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found