Skip to content

Increased number of ANRs after updating to Android 12 platform #1650

Open
@DavidTalevski

Description

@DavidTalevski

Bug Report

Problem

Google Android Vitals are reporting an increased amount of ANRs after updating to the Cordova Android 12 platform.

Information

I am unsure if the ANRs are caused by the new Cordova platform update or by the new Android SDK version. Since I was unable to find any issue similar to this, I decided to open one here. Any information related to this ANR would be most helpful, as I am unable to reproduce it. I am also curious if any other developers are experiencing the same thing.

Google stack trace

"main" tid=1 Blocked
  at android.content.res.AssetManager.getResourceValue (AssetManager.java:545)
  at android.content.res.ResourcesImpl.getValue (ResourcesImpl.java:232)
  at android.content.res.Resources.getInteger (Resources.java:1192)
  at org.chromium.ui.base.DeviceFormFactor.isTablet (chromium-TrichromeWebViewGoogle.aab-stable-579016630:9)
  at J.N.Mq8l4Aae (Native method)
  at org.chromium.android_webview.AwContents.A (chromium-TrichromeWebViewGoogle.aab-stable-579016630:373)
  at org.chromium.android_webview.AwContents.<init> (chromium-TrichromeWebViewGoogle.aab-stable-<US_SOCIAL_SECURITY_NUMBER>:383)
  at com.android.webview.chromium.k.run (chromium-TrichromeWebViewGoogle.aab-stable-579016630:111)
  at WV.QB0.b (chromium-TrichromeWebViewGoogle.aab-stable-579016630:20)
  at WV.PB0.run (chromium-TrichromeWebViewGoogle.aab-stable-579016630:3)
  at org.chromium.base.task.PostTask.d (chromium-TrichromeWebViewGoogle.aab-stable-579016630:11)
  at WV.QB0.a (chromium-TrichromeWebViewGoogle.aab-stable-579016630:28)
  at com.android.webview.chromium.WebViewChromiumFactoryProvider.a (chromium-TrichromeWebViewGoogle.aab-stable-579016630:3)
  at com.android.webview.chromium.WebViewChromium.init (chromium-TrichromeWebViewGoogle.aab-stable-579016630:332)
  at android.webkit.WebView.<init> (WebView.java:443)
  at android.webkit.WebView.<init> (WebView.java:363)
  at android.webkit.WebView.<init> (WebView.java:345)
  at android.webkit.WebView.<init> (WebView.java:332)
  at org.apache.cordova.engine.SystemWebView.<init> (SystemWebView.java:47)
  at org.apache.cordova.engine.SystemWebView.<init> (SystemWebView.java:43)
  at org.apache.cordova.engine.SystemWebViewEngine.<init> (SystemWebViewEngine.java:76)
  at java.lang.reflect.Constructor.newInstance0 (Native method)
  at java.lang.reflect.Constructor.newInstance (Constructor.java:343)
  at org.apache.cordova.CordovaWebViewImpl.createEngine (CordovaWebViewImpl.java:82)
  at org.apache.cordova.CordovaActivity.makeWebViewEngine (CordovaActivity.java)
  at org.apache.cordova.CordovaActivity.makeWebView (CordovaActivity.java)
  at org.apache.cordova.CordovaActivity.init (CordovaActivity.java:153)
  at org.apache.cordova.CordovaActivity.loadUrl (CordovaActivity.java:234)
  at com.appname.MainActivity.onCreate (MainActivity.java:40)
  at android.app.Activity.performCreate (Activity.java:8050)
  at android.app.Activity.performCreate (Activity.java:8030)
  at android.app.Instrumentation.callActivityOnCreate (Instrumentation.java:1329)
  at android.app.ActivityThread.performLaunchActivity (ActivityThread.java:3648)
  at android.app.ActivityThread.handleLaunchActivity (ActivityThread.java:3832)
  at android.app.servertransaction.LaunchActivityItem.execute (LaunchActivityItem.java:103)
  at android.app.servertransaction.TransactionExecutor.executeCallbacks (TransactionExecutor.java:135)
  at android.app.servertransaction.TransactionExecutor.execute (TransactionExecutor.java:95)
  at android.app.ActivityThread$H.handleMessage (ActivityThread.java:2247)
  at android.os.Handler.dispatchMessage (Handler.java:106)
  at android.os.Looper.loopOnce (Looper.java:201)
  at android.os.Looper.loop (Looper.java:288)
  at android.app.ActivityThread.main (ActivityThread.java:7881)
  at java.lang.reflect.Method.invoke (Native method)
  at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:568)
  at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1045)

Environment, Platform, Device

The ANR details specify that this ANR has been reported on Android 11, Android 12 and Android 13 devices. Here are some of the specific devices: BLU M0176_ND, NUU T0801LAV2, samsung a20p, samsung gta4lwifi, motorola borneo.

Version information

cordova 12.0.0
android 12.0.0

Checklist

  • I searched for existing GitHub issues
  • I updated all Cordova tooling to most recent version
  • I included all the necessary information above

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions