App crashing react native on Samsung Galaxy S9+ (star2qltesq), Android 8.0

柔情痞子 提交于 2019-12-11 15:14:30

问题


I have released an app to the play store using react native and its working fine but I got a crash with the following log in play console and I'm not sure what to make of it. The crash happens on Samsung Galaxy S9+ (star2qltesq) running Android 8.0

backtrace:
  #00  pc 000000000001a6f0  /system/lib/libc.so (strlen+11)
  #01  pc 0000000000761c39  /vendor/lib/libllvm-glnext.so (_ZN14MetaDataExport19duplicateSymbolDataEP20QGLC_GLSL_SYMBOLDATAPKS0_+208)
  #02  pc 0000000000766d87  /vendor/lib/libllvm-glnext.so (_ZN13ShaderObjects17loadProgramBinaryEP15CompilerContextPvjP23QGLC_LINKPROGRAM_RESULT+1486)
  #03  pc 00000000006e5495  /vendor/lib/libllvm-glnext.so (_ZN15CompilerContext17loadProgramBinaryEPvjP23QGLC_LINKPROGRAM_RESULT+108)
  #04  pc 00000000007787c1  /vendor/lib/libllvm-glnext.so (_Z21QGLCLoadProgramBinaryPvS_jP23QGLC_LINKPROGRAM_RESULT+52)
  #05  pc 0000000000152023  /vendor/lib/egl/libGLESv2_adreno.so (_ZN17EsxShaderCompiler21LoadProgramBinaryBlobEP10EsxContextP10EsxProgramPKvjP10EsxInfoLog+170)
  #06  pc 000000000013490d  /vendor/lib/egl/libGLESv2_adreno.so (_ZN10EsxProgram17LoadProgramBinaryEP10EsxContextjPKvi+158)
  #07  pc 00000000000ac389  /vendor/lib/egl/libGLESv2_adreno.so (_ZN10EsxContext15GlProgramBinaryEjjPKvi+134)
  #08  pc 0000000000097553  /vendor/lib/egl/libGLESv2_adreno.so (glProgramBinary+42)
  #09  pc 00000000017491ff  /data/app/com.android.chrome-HHWtCaxowbzF03n80oXarQ==/base.apk

Here is a snippet from app/build.gradle file

def enableSeparateBuildPerCPUArchitecture = true
def enableProguardInReleaseBuilds = false

android {
    compileSdkVersion 27
    buildToolsVersion '27.0.3'

    defaultConfig {
        applicationId "xx.xxxx.xxx"
        multiDexEnabled true
        minSdkVersion 16
        targetSdkVersion 27
        versionCode x
        versionName "x.x.x"

        packagingOptions {
            exclude "lib/arm64-v8a/libimagepipeline.so"
        }
    }

    splits {
        abi {
            reset()
            enable enableSeparateBuildPerCPUArchitecture
            universalApk true
            include "armeabi-v7a"
        }
    }

    applicationVariants.all { variant ->
        variant.outputs.each { output ->
            def versionCodes = ['armeabi-v7a': 1]
            def abi = output.getFilter(OutputFile.ABI)
            if (abi != null) {
                output.versionCodeOverride = versionCodes.get(abi) * 300000 + variant.versionCode
            }
        }
    }
}

Update

Upon further research it seems to be an issue with this specific device running a certain build. You can check out S9/S9+ specific WebView device crash report for more info. There were issues created on samsung forums which have not got any response yet

Issue 1

Issue 2

The solution according to the stackoverflow post linked above is to disable hardware acceleration for webview. I'm not using an webview in the react native app but considering react native is written in js which is probably running a chromium instance, does the same logic apply? If so, how do you disable hardware acceleration in react native?

来源:https://stackoverflow.com/questions/51356215/app-crashing-react-native-on-samsung-galaxy-s9-star2qltesq-android-8-0

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!