App crashing on launch
Description
We've recently migrated to rn 0.70.2 from 0.66.4, We've followed the react native upgrade helper carefully, gradle clean and build is successful but getting the below mentioned crash on launch, The below mentioned is the device logs
2022-10-22 02:06:48.818 13994-13994/E/AndroidRuntime: FATAL EXCEPTION: main
Process: , PID: 13994
java.lang.UnsatisfiedLinkError: couldn't find DSO to load: libhermes-executor-release.so
SoSource 0: com.facebook.soloader.ApkSoSource[root = /data/data/lib-main flags = 1]
SoSource 1: com.facebook.soloader.DirectorySoSource[root = /data/app/~~KqTwKck20JwuEDGLWd9cCA==/-vV4Bd2plYeSdYZ0-7lJBfg==/lib/arm64 flags = 0]
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/~~KqTwKck20JwuEDGLWd9cCA==/-vV4Bd2plYeSdYZ0-7lJBfg==/lib/arm64
result: 0
at com.facebook.soloader.SoLoader.doLoadLibraryBySoName(SoLoader.java:1127)
at com.facebook.soloader.SoLoader.loadLibraryBySoNameImpl(SoLoader.java:943)
at com.facebook.soloader.SoLoader.loadLibraryBySoName(SoLoader.java:855)
at com.facebook.soloader.SoLoader.loadLibrary(SoLoader.java:802)
at com.facebook.soloader.SoLoader.loadLibrary(SoLoader.java:772)
at com.facebook.hermes.reactexecutor.HermesExecutor.loadLibrary(HermesExecutor.java:30)
at com.facebook.hermes.reactexecutor.HermesExecutor.<clinit>(HermesExecutor.java:19)
at com.facebook.hermes.reactexecutor.HermesExecutor.loadLibrary(HermesExecutor.java:23)
at com.facebook.react.ReactInstanceManagerBuilder.getDefaultJSExecutorFactory(ReactInstanceManagerBuilder.java:393)
at com.facebook.react.ReactInstanceManagerBuilder.build(ReactInstanceManagerBuilder.java:343)
at com.facebook.react.ReactNativeHost.createReactInstanceManager(ReactNativeHost.java:96)
at com.facebook.react.ReactNativeHost.getReactInstanceManager(ReactNativeHost.java:42)
at com.facebook.react.ReactDelegate.loadApp(ReactDelegate.java:104)
at com.facebook.react.ReactActivityDelegate.loadApp(ReactActivityDelegate.java:111)
at com.facebook.react.ReactActivityDelegate.onCreate(ReactActivityDelegate.java:106)
at com.facebook.react.ReactActivity.onCreate(ReactActivity.java:46)
at com.gamezy.MainActivity.onCreate(MainActivity.kt:44)
at android.app.Activity.performCreate(Activity.java:8051)
at android.app.Activity.performCreate(Activity.java:8031)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1329)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3608)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3792)
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:2210)
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:7839)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1003)
Version
0.70.2
Output of npx react-native info
Build is successful in my case.
Steps to reproduce
- Follow the upgrade helper to migrate from old to new architecture
- App crashes on launch
Snack, code example, screenshot, or link to a repository
Can you share your build.gradle file?
What is happening for you is that the hermes-executor library are stripped away, not sure why without seeing your code.
@cortinico Could this be happening because of this:
packagingOptions { pickFirst 'lib/x86_64/libjsc.so' pickFirst 'lib/arm64-v8a/libjsc.so' pickFirst '**/armeabi-v7a/libc++_shared.so' pickFirst '**/x86/libc++_shared.so' pickFirst '**/arm64-v8a/libc++_shared.so' pickFirst '**/x86_64/libc++_shared.so' }
@cortinico Could this be happening because of this:
Not really as you don't have hermes-executor in your packagingOptions you posted
@TheTushar2696 did you have any luck in solving this? I am in exact same situation (update from 0.67 -> 0.70.5) , and nothing seems to help
This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 7 days.
This issue was closed because it has been stalled for 7 days with no activity.