ignite-cookbook
ignite-cookbook copied to clipboard
Ignite: Android Hermes libjscexecutor.so
Describe the bug
As the title says, I'm using a build variant called development
, which uses our release signing config and generally replicates a release build.
When I build the app locally in debug mode, it works fine. When I build the development build the app crashes immediately, and in Android Studio I see:
--------- beginning of crash
E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.appname.development, PID: 4513
java.lang.UnsatisfiedLinkError: couldn't find DSO to load: libjscexecutor.so
SoSource 0: com.facebook.soloader.DirectorySoSource[root = /data/app/~~yknNsxEbOR9vWgYxlcKx6g==/com.appname.development-uGOd6eC09Qm6p_dL_1XTtQ==/lib/arm64 flags = 0]
SoSource 1: com.facebook.soloader.DirectApkSoSource[root = /data/app/~~yknNsxEbOR9vWgYxlcKx6g==/com.appname.development-uGOd6eC09Qm6p_dL_1XTtQ==/base.apk!/lib/arm64-v8a]
SoSource 2: com.facebook.soloader.DirectorySoSource[root = /system/lib64 flags = 2]
SoSource 3: com.facebook.soloader.DirectorySoSource[root = /vendor/lib64 flags = 2]
Native lib dir: /data/app/~~yknNsxEbOR9vWgYxlcKx6g==/com.appname.development-uGOd6eC09Qm6p_dL_1XTtQ==/lib/arm64
result: 0
at com.facebook.soloader.SoLoader.doLoadLibraryBySoName(SoLoader.java:1098)
at com.facebook.soloader.SoLoader.loadLibraryBySoNameImpl(SoLoader.java:914)
at com.facebook.soloader.SoLoader.loadLibraryBySoName(SoLoader.java:826)
at com.facebook.soloader.SoLoader.loadLibrary(SoLoader.java:773)
at com.facebook.soloader.SoLoader.loadLibrary(SoLoader.java:743)
at com.facebook.react.jscexecutor.JSCExecutor.loadLibrary(JSCExecutor.java:24)
at com.facebook.react.jscexecutor.JSCExecutor.
Ignite version
7.15.0
Additional info
This ONLY happens when using Hermes, and only happened after I upgraded to RN 0.68.2 (from 0.66.3 I think, where it worked fine).
Relevant parts of build.gradle:
// React native config setup
project.ext.envConfigFiles = [
debug: ".env.development",
development: ".env.development",
qa: ".env.qa",
release: ".env.production",
]
// later...
buildTypes {
debug {
signingConfig signingConfigs.debug
applicationIdSuffix ".development"
}
development {
signingConfig signingConfigs.debug
applicationIdSuffix ".development"
matchingFallbacks = ['release']
minifyEnabled enableProguardInReleaseBuilds
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
}
qa {
signingConfig signingConfigs.release
applicationIdSuffix ".qa"
matchingFallbacks = ['release']
minifyEnabled enableProguardInReleaseBuilds
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
}
release {
// Caution! In production, you need to generate your own keystore file.
// see https://reactnative.dev/docs/signed-apk-android.
signingConfig signingConfigs.release
minifyEnabled enableProguardInReleaseBuilds
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
}
}
// applicationVariants are e.g. debug, release
applicationVariants.all { variant ->
variant.outputs.each { output ->
// For each separate APK per architecture, set a unique version code as described here:
// https://developer.android.com/studio/build/configure-apk-splits.html
// https://developer.android.com/studio/build/configure-apk-splits.html
def versionCodes = ["armeabi-v7a": 1, "x86": 2, "arm64-v8a": 3, "x86_64": 4]
def abi = output.getFilter(OutputFile.ABI)
if (abi != null) { // null for the universal-debug, universal-release variants
output.versionCodeOverride =
defaultConfig.versionCode * 1000 + versionCodes.get(abi)
}
}
}