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.

Crash on 64-bit armv8 device which have Mediatek MT6735P chipset with Cortex-A53 CPU

See original GitHub issue

Bug description: Crash on 64-bit armv8 devices with below stack trace. Checked with few different Android System WebView versions including latest beta version (77.0.3865.73).

E/unknown:ReactNative: Exception in native call
    android.content.res.Resources$NotFoundException: String resource ID #0x3040003
        at android.content.res.HwResources.getText(HwResources.java:1287)
        at android.content.res.Resources.getString(Resources.java:431)
        at com.android.org.chromium.content.browser.ContentViewCore.setContainerView(ContentViewCore.java:709)
        at com.android.org.chromium.content.browser.ContentViewCore.initialize(ContentViewCore.java:633)
        at com.android.org.chromium.android_webview.AwContents.createAndInitializeContentViewCore(AwContents.java:685)
        at com.android.org.chromium.android_webview.AwContents.setNewAwContents(AwContents.java:834)
        at com.android.org.chromium.android_webview.AwContents.<init>(AwContents.java:670)
        at com.android.org.chromium.android_webview.AwContents.<init>(AwContents.java:605)
        at com.android.webview.chromium.WebViewChromium.initForReal(WebViewChromium.java:319)
        at com.android.webview.chromium.WebViewChromium.access$100(WebViewChromium.java:104)
        at com.android.webview.chromium.WebViewChromium$1.run(WebViewChromium.java:271)
        at com.android.webview.chromium.WebViewChromium$WebViewChromiumRunQueue.drainQueue(WebViewChromium.java:131)
        at com.android.webview.chromium.WebViewChromium$WebViewChromiumRunQueue$1.run(WebViewChromium.java:118)
        at com.android.org.chromium.base.ThreadUtils.runOnUiThread(ThreadUtils.java:144)
        at com.android.webview.chromium.WebViewChromium$WebViewChromiumRunQueue.addTask(WebViewChromium.java:115)
        at com.android.webview.chromium.WebViewChromium.init(WebViewChromium.java:268)
        at android.webkit.WebView.<init>(WebView.java:597)
        at android.webkit.WebView.<init>(WebView.java:531)
        at android.webkit.WebView.<init>(WebView.java:514)
        at android.webkit.WebView.<init>(WebView.java:501)
        at android.webkit.WebView.<init>(WebView.java:491)
        at com.reactnativecommunity.webview.RNCWebViewManager$RNCWebView.<init>(RNCWebViewManager.java:902)
        at com.reactnativecommunity.webview.RNCWebViewManager.createRNCWebViewInstance(RNCWebViewManager.java:154)
        at com.reactnativecommunity.webview.RNCWebViewManager.createViewInstance(RNCWebViewManager.java:160)
        at com.reactnativecommunity.webview.RNCWebViewManager.createViewInstance(RNCWebViewManager.java:104)
        at com.facebook.react.uimanager.ViewManager.createViewInstanceWithProps(ViewManager.java:119)
        at com.facebook.react.uimanager.ViewManager.createViewWithProps(ViewManager.java:66)
        at com.facebook.react.uimanager.NativeViewHierarchyManager.createView(NativeViewHierarchyManager.java:259)
        at com.facebook.react.uimanager.UIViewOperationQueue$CreateViewOperation.execute(UIViewOperationQueue.java:198)
        at com.facebook.react.uimanager.UIViewOperationQueue$DispatchUIFrameCallback.dispatchPendingNonBatchedOperations(UIViewOperationQueue.java:1036)
        at com.facebook.react.uimanager.UIViewOperationQueue$DispatchUIFrameCallback.doFrameGuarded(UIViewOperationQueue.java:1007)
        at com.facebook.react.uimanager.GuardedFrameCallback.doFrame(GuardedFrameCallback.java:29)
        at com.facebook.react.modules.core.ReactChoreographer$ReactChoreographerDispatcher.doFrame(ReactChoreographer.java:172)
        at com.facebook.react.modules.core.ChoreographerCompat$FrameCallback$1.doFrame(ChoreographerCompat.java:84)
        at android.view.Choreographer$CallbackRecord.run(Choreographer.java:798)
        at android.view.Choreographer.doCallbacks(Choreographer.java:603)
        at android.view.Choreographer.doFrame(Choreographer.java:571)
        at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:786)
        at android.os.Handler.handleCallback(Handler.java:815)
        at android.os.Handler.dispatchMessage(Handler.java:104)
        at android.os.Looper.loop(Looper.java:194)
        at android.app.ActivityThread.main(ActivityThread.java:5667)
        at java.lang.reflect.Method.invoke(Native Method)
        at java.lang.reflect.Method.invoke(Method.java:372)
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:962)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:757)

To Reproduce: Create a project with react-native init AwesomeProject --0.60.5 Install the the react-native-webview using React Native WebView Getting Started Guide

Expected behavior:

Open the relevant web page in in app web view

Screenshots/Videos:

Screenshot_2019-09-10-15-55-18

Environment:

  • OS: Ubuntu
  • OS version: Linux 5.0 Ubuntu 18.04.3 LTS (Bionic Beaver)
  • react-native version: 0.60.5
  • react-native-webview version: ^7.0.4

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:8

github_iconTop GitHub Comments

29reactions
mikehardycommented, Oct 18, 2019

In MainActivity, this will probably work around your crash, if you are using androidx.appcompat:appcompat:1.1.0:



    // Workaround appcompat-1.1.0 bug https://issuetracker.google.com/issues/141132133
    @Override
    public void applyOverrideConfiguration(Configuration overrideConfiguration) {
        if (Build.VERSION.SDK_INT >= 21 && Build.VERSION.SDK_INT <= 25) {
            return;
        }
        super.applyOverrideConfiguration(overrideConfiguration);
    }
28reactions
greancommented, Jan 10, 2020

@mikehardy Your solution worked For those who doesn´t know java well, don’t forget to add those imports in order to make the workaround compile. import android.content.res.Configuration; import android.os.Build;

Read more comments on GitHub >

github_iconTop Results From Across the Web

Crash on 64-bit armv8 device which have Mediatek MT6735P ...
Crash on 64-bit armv8 device which have Mediatek MT6735P chipset with Cortex-A53 CPU ... Crash on 64-bit armv8 devices with below stack trace....
Read more >
Crash on 64-bit armv8 device which have Mediatek MT6735P ...
Crash on 64-bit armv8 device which have Mediatek MT6735P chipset with ... have Mediatek MT6735P chipset with Cortex-A53 CPU on Sep 10, 2019....
Read more >
ARM Cortex-A53 vs MediaTek MT6735P: What is the difference?
What is the difference between MediaTek MT6735P and ARM Cortex-A53? Find out which is better and their overall performance in the mobile chipset...
Read more >
Cortex-A53 - Arm Developer
The Cortex-A53 processor is a high efficiency processor that implements the Armv8-A architecture.
Read more >
Mediatek MT6735P vs Mediatek MT6750S vs Mediatek ...
Mediatek Helio X10 MT6795 2.2 GHz 8 / 8 Cortex‑A53 Mediatek Helio P35 MT6765 1.8 ‑ 2.3 GHz 8 / 8 Cortex‑A53 Mediatek Helio P22T...
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