react-native icon indicating copy to clipboard operation
react-native copied to clipboard

App crashing on launch

Open TheTushar2696 opened this issue 3 years ago • 2 comments

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

Screenshot 1944-08-01 at 7 20 26 PM

TheTushar2696 avatar Oct 23 '22 13:10 TheTushar2696

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 avatar Oct 24 '22 17:10 cortinico

@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' }

TheTushar2696 avatar Oct 25 '22 08:10 TheTushar2696

@cortinico Could this be happening because of this:

Not really as you don't have hermes-executor in your packagingOptions you posted

cortinico avatar Oct 28 '22 15:10 cortinico

@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

dobrea-v avatar Nov 12 '22 11:11 dobrea-v

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.

github-actions[bot] avatar May 11 '23 12:05 github-actions[bot]

This issue was closed because it has been stalled for 7 days with no activity.

github-actions[bot] avatar May 18 '23 18:05 github-actions[bot]