Repository: flutter
Issue: [webview] [android] App crashes with libmonochrome.so
Labels: c: crash,platform-android,p: webview,package,a: production,P3,team-android,triaged-android

<img width="721" alt="image" src="https://user-images.githubusercontent.com/14144080/130429718-fe934ee4-1fc4-46a8-8d5c-6b1ab6fa486f.png">

<details>
<summary>flutter doctor -v</summary>

```console
[✓] Flutter (Channel stable, 2.0.1, on macOS 11.5 20G71 darwin-x64, locale
    zh-Hans-CN)
    • Flutter version 2.0.1 at /Users/jiangpingwei/Downloads/flutter
    • Framework revision c5a4b4029c (6 months ago), 2021-03-04 09:47:48 -0800
    • Engine revision 40441def69
    • Dart version 2.12.0

[!] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
    • Android SDK at /Users/jiangpingwei/Library/Android/sdk
    • Platform android-30, build-tools 30.0.3
    • ANDROID_HOME = /Users/jiangpingwei/Library/Android/sdk
    • Java binary at: /Library/Internet
      Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/java
    • Java version Java(TM) SE Runtime Environment (build 1.8.0_181-b13)
    ! Some Android licenses not accepted.  To resolve this, run: flutter doctor
      --android-licenses

[✓] Xcode - develop for iOS and macOS
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 12.4, Build version 12D4e
    • CocoaPods version 1.10.1

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[!] Android Studio (version 2020.3)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    ✗ Unable to find bundled Java version.
    • Try updating or re-installing Android Studio.

[✓] VS Code (version 1.52.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.20.0

[✓] Connected device (2 available)
    • PDHM00 (mobile) • b1c393d9 • android-arm64  • Android 11 (API 30)
```
</details>

# crash log:


```console
DequeueBuffer time out on com.imdada.portalmobile/com.imdada.portalmobile.MainActivity, count=1, avg=18 ms, max=18 ms.
--
12608-19 16:37:33.106 12502 12524 I da.portalmobil: Waiting for a blocking GC ProfileSaver
12708-19 16:37:33.113 12502 12524 I da.portalmobil: WaitForGcToComplete blocked ProfileSaver on HeapTrim for 7.149ms
12808-19 16:37:33.439 12502 12529 W RenderInspector: DequeueBuffer time out on com.imdada.portalmobile/com.imdada.portalmobile.MainActivity, count=1, avg=21 ms, max=21 ms.
12908-19 16:37:33.656 12502 12529 W RenderInspector: DequeueBuffer time out on com.imdada.portalmobile/com.imdada.portalmobile.MainActivity, count=1, avg=16 ms, max=16 ms.
13008-19 16:37:35.844 12502 12529 W RenderInspector: DequeueBuffer time out on com.imdada.portalmobile/com.imdada.portalmobile.MainActivity, count=1, avg=17 ms, max=17 ms.
13108-19 16:37:39.536 12502 12529 W RenderInspector: DequeueBuffer time out on com.imdada.portalmobile/com.imdada.portalmobile.MainActivity, count=1, avg=17 ms, max=17 ms.
13208-19 16:37:39.803 12502 12529 W RenderInspector: DequeueBuffer time out on com.imdada.portalmobile/com.imdada.portalmobile.MainActivity, count=1, avg=20 ms, max=20 ms.
13308-19 16:37:39.907 12502 12529 W RenderInspector: DequeueBuffer time out on com.imdada.portalmobile/com.imdada.portalmobile.MainActivity, count=1, avg=24 ms, max=24 ms.
13408-19 16:37:40.259 12502 12502 D MIUIInput: [KeyEvent] ViewRootImpl KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_BACK, scanCode=0, metaState=0, flags=0x8, repeatCount=0, eventTime=47030838, downTime=47030838, deviceId=-1, source=0x101, displayId=0 }
13508-19 16:37:40.312 12502 12502 D MIUIInput: [KeyEvent] ViewRootImpl KeyEvent { action=ACTION_UP, keyCode=KEYCODE_BACK, scanCode=0, metaState=0, flags=0x8, repeatCount=0, eventTime=47030838, downTime=47030838, deviceId=-1, source=0x101, displayId=0 }
13608-19 16:37:41.482 12502 12529 W RenderInspector: DequeueBuffer time out on com.imdada.portalmobile/com.imdada.portalmobile.MainActivity, count=1, avg=17 ms, max=17 ms.
13708-19 16:37:41.951 20498 20498 W .android.camera: type=1400 audit(0.0:73462): avc: denied { read } for name="u:object_r:vendor_displayfeature_prop:s0" dev="tmpfs" ino=19753 scontext=u:r:platform_app:s0:c512,c768 tcontext=u:object_r:vendor_displayfeature_prop:s0 tclass=file permissive=0 app=com.imdada.portalmobile
13808-19 16:37:42.311 20498 20498 W .android.camera: type=1400 audit(0.0:73463): avc: denied { read } for name="u:object_r:vendor_displayfeature_prop:s0" dev="tmpfs" ino=19753 scontext=u:r:platform_app:s0:c512,c768 tcontext=u:object_r:vendor_displayfeature_prop:s0 tclass=file permissive=0 app=com.imdada.portalmobile
13908-19 16:37:48.078 12502 12514 I da.portalmobil: NativeAlloc concurrent copying GC freed 1799(142KB) AllocSpace objects, 0(0B) LOS objects, 49% free, 3174KB/6349KB, paused 55us total 168.230ms
14008-19 16:37:48.218 12502 12514 I da.portalmobil: NativeAlloc concurrent copying GC freed 1575(141KB) AllocSpace objects, 0(0B) LOS objects, 49% free, 3177KB/6354KB, paused 108us total 104.028ms
14108-19 16:37:48.465 12502 12514 I da.portalmobil: NativeAlloc concurrent copying GC freed 968(59KB) AllocSpace objects, 0(0B) LOS objects, 49% free, 3196KB/6391KB, paused 96us total 130.446ms
14208-19 16:37:48.672 12502 12514 I da.portalmobil: NativeAlloc concurrent copying GC freed 1698(93KB) AllocSpace objects, 0(0B) LOS objects, 49% free, 3216KB/6432KB, paused 74us total 170.573ms
14308-19 16:37:49.115 12502 12514 I da.portalmobil: NativeAlloc concurrent copying GC freed 1228(72KB) AllocSpace objects, 0(0B) LOS objects, 49% free, 3177KB/6354KB, paused 46us total 103.642ms
14408-19 16:37:49.399 12502 12514 I da.portalmobil: NativeAlloc concurrent copying GC freed 1273(71KB) AllocSpace objects, 0(0B) LOS objects, 49% free, 3197KB/6395KB, paused 45us total 116.250ms
14508-19 16:37:49.920 12502 12514 I da.portalmobil: NativeAlloc concurrent copying GC freed 741(46KB) AllocSpace objects, 0(0B) LOS objects, 49% free, 3195KB/6390KB, paused 49us total 138.510ms
14608-19 16:37:50.111 12502 12514 I da.portalmobil: NativeAlloc concurrent copying GC freed 1740(108KB) AllocSpace objects, 0(0B) LOS objects, 49% free, 3201KB/6402KB, paused 108us total 163.392ms
14708-19 16:37:50.296 12502 12502 W System.err: java.lang.IllegalArgumentException: pointerIndex out of range
14808-19 16:37:50.302 12502 12502 W System.err: at android.view.MotionEvent.nativeGetPointerId(Native Method)
14908-19 16:37:50.302 12502 12502 W System.err: at android.view.MotionEvent.getPointerId(MotionEvent.java:2368)
15008-19 16:37:50.302 12502 12502 W System.err: at J.N.Mcw1yi1C(Native Method)
15108-19 16:37:50.302 12502 12502 W System.err: at org.chromium.ui.base.EventForwarder.i(chromium-TrichromeWebViewGoogle.apk-stable-410410683:31)
15208-19 16:37:50.302 12502 12502 W System.err: at org.chromium.ui.base.EventForwarder.g(chromium-TrichromeWebViewGoogle.apk-stable-410410683:17)
15308-19 16:37:50.302 12502 12502 W System.err: at Qr.onTouchEvent(chromium-TrichromeWebViewGoogle.apk-stable-410410683:13)
15408-19 16:37:50.302 12502 12502 W System.err: at com.android.webview.chromium.WebViewChromium.onTouchEvent(chromium-TrichromeWebViewGoogle.apk-stable-410410683:7)
15508-19 16:37:50.302 12502 12502 W System.err: at android.webkit.WebView.onTouchEvent(WebView.java:2691)
15608-19 16:37:50.302 12502 12502 W System.err: at android.view.View.dispatchTouchEvent(View.java:14381)
15708-19 16:37:50.302 12502 12502 W System.err: at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3145)
15808-19 16:37:50.302 12502 12502 W System.err: at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2816)
15908-19 16:37:50.302 12502 12502 W System.err: at io.flutter.plugin.platform.PlatformViewsController$1.onTouch(Unknown Source:103)
16008-19 16:37:50.302 12502 12502 W System.err: at io.flutter.embedding.engine.systemchannels.PlatformViewsChannel$1.touch(Unknown Source:195)
16108-19 16:37:50.302 12502 12502 W System.err: at io.flutter.embedding.engine.systemchannels.PlatformViewsChannel$1.onMethodCall(Unknown Source:137)
16208-19 16:37:50.302 12502 12502 W System.err: at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(Unknown Source:17)
16308-19 16:37:50.302 12502 12502 W System.err: at io.flutter.embedding.engine.dart.DartMessenger.handleMessageFromDart(Unknown Source:57)
16408-19 16:37:50.302 12502 12502 W System.err: at io.flutter.embedding.engine.FlutterJNI.handlePlatformMessage(Unknown Source:4)
16508-19 16:37:50.302 12502 12502 W System.err: at android.os.MessageQueue.nativePollOnce(Native Method)
16608-19 16:37:50.302 12502 12502 W System.err: at android.os.MessageQueue.next(MessageQueue.java:335)
16708-19 16:37:50.302 12502 12502 W System.err: at android.os.Looper.loop(Looper.java:193)
16808-19 16:37:50.302 12502 12502 W System.err: at android.app.ActivityThread.main(ActivityThread.java:8061)
16908-19 16:37:50.302 12502 12502 W System.err: at java.lang.reflect.Method.invoke(Native Method)
17008-19 16:37:50.302 12502 12502 W System.err: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:656)
17108-19 16:37:50.302 12502 12502 W System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:967)
17208-19 16:37:50.348 12502 12502 F chromium: [FATAL:jni_android.cc(249)] Please include Java exception stack in crash report
17308-19 16:37:50.591 21348 21348 F crashpad: dlopen: dlopen failed: library "libandroidicu.so" not found: needed by /system/lib64/libharfbuzz_ng.so in namespace (default)
```

I can't solve it, please help me.