Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

java.lang.UnsatisfiedLinkError dlopen failed: library "libhermes.so" not found #125

Open
waliahemanloop opened this issue Mar 27, 2024 · 2 comments

Comments

@waliahemanloop
Copy link

Hi, some users of our app are facing this repetetive crash on production. Here is some of the information we have gathered about this crash so far -

  1. Our RN version is 0.72.8
  2. Around 0.1% of our users are facing this
  3. We do NOT have Hermes turned on, we are using JSC
  4. Attaching a screenshot of the stack trace of the crash from Firebase Crashlytics
  5. Based on the stack-trace, we have identified the function where we think the problem lies (attaching a snippet below), it's in the classReactInstanceManagerBuilder -> where hermes is being used as a fallback if loading JSC fails.

So the question now is, under what circumstances would loading JSC fail? And what can be done to fix this ? Any help or pointers in the right direction would be much appreciated.

`private JavaScriptExecutorFactory getDefaultJSExecutorFactory(String appName, String deviceName, Context applicationContext) {
if (this.jsEngineResolutionAlgorithm == null) {
FLog.w(TAG, "You're not setting the JS Engine Resolution Algorithm. We'll try to load JSC first, and if it fails we'll fallback to Hermes");

        try {
            ReactInstanceManager.initializeSoLoaderIfNecessary(applicationContext);
            JSCExecutor.loadLibrary();
            return new JSCExecutorFactory(appName, deviceName);
        } catch (UnsatisfiedLinkError var5) {
            if (var5.getMessage().contains("__cxa_bad_typeid")) {
                throw var5;
            } else {
                HermesExecutor.loadLibrary();
                return new HermesExecutorFactory();
            }
        }
    } else if (this.jsEngineResolutionAlgorithm == JSEngineResolutionAlgorithm.HERMES) {
        HermesExecutor.loadLibrary();
        return new HermesExecutorFactory();
    } else {
        JSCExecutor.loadLibrary();
        return new JSCExecutorFactory(appName, deviceName);
    }
}`
Screenshot 2024-03-27 at 10 23 10 AM
@AkshayMor
Copy link

@waliahemanloop did you find any solution to fix the crash?

@kaushil111
Copy link

Having the same issue!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants