Jitsi-meet: [BUG] App crashes when hermes is enabled

Created on 6 Jan 2020  路  13Comments  路  Source: jitsi/jitsi-meet

Description

We use JitsiMeet SDK on our app Rocket.Chat.ReactNative and recently enabled hermes engine, but when we try to open a call, App Crashes with this error from JitsiMeet SDK:
couldn't find DSO to load: libjscexecutor.so caused by: dlopen failed: library "libjsc.so" not found

A reproducible demo is here.

I tried update JitsiMeet SDK to 2.5 and 2.6, without success.

I fixed it using a self-builded sdk with these changes on ReactInstanceManagerHolder.java:
a
I think you can check if hermes is enabled or disabled to use different JS Executor Factory.

Environment details

JitsiMeet Android SDK 2.4.0
React Native 0.61.5
Hermes enabled

Most helpful comment

Hi @saghul , I'm using sdk v2.6.0 and am trying to use the SDK without enabling Hermes at the moment too.
Would it be sufficient to undo the changes in these 2 PR (https://github.com/jitsi/jitsi-meet/pull/4977/files & https://github.com/jitsi/jitsi-meet/pull/5032/files) to revert the use of Hermes?

@SeveHo this worked for me.

All 13 comments

Hi @djorkaeffalexandre ! Your workaround is correct until we migrate to Hermes. We might do that for the next release (2.6).

Hi @saghul , I am facing a similar issue after using the latest source. I am trying to integrate Jitsi-meet SDK with my app and the app keeps crashing if I try to launch Jitsi with the aar that I build locally. Anyway it works great if I use the downloaded aar file. Please help.

java.lang.UnsatisfiedLinkError: couldn't find DSO to load: libhermes.so
at com.facebook.soloader.SoLoader.doLoadLibraryBySoName(SoLoader.java:738)
at com.facebook.soloader.SoLoader.loadLibraryBySoName(SoLoader.java:591)
at com.facebook.soloader.SoLoader.loadLibrary(SoLoader.java:529)
at com.facebook.soloader.SoLoader.loadLibrary(SoLoader.java:484)
at com.facebook.hermes.reactexecutor.HermesExecutor.(HermesExecutor.java:20)
at com.facebook.hermes.reactexecutor.HermesExecutorFactory.create(HermesExecutorFactory.java:27)
at com.facebook.react.ReactInstanceManager$5.run(ReactInstanceManager.java:952)
at java.lang.Thread.run(Thread.java:919)

Thanks!

As I said in https://github.com/jitsi/jitsi-meet/issues/4971#issuecomment-571603048 you'll need to wait until we release a new SDK using Hermes.

Thanks @saghul , I resolved it by importing the aar file directly into my application.

Hey folks, we just released SDK version 2.6.0: https://github.com/jitsi/jitsi-meet-release-notes/blob/master/CHANGELOG-MOBILE-SDKS.md#260-2020-02-07 which now switches to using the Hermes engine.

I'm closing this now, please open a new issue, should you run into problems. Cheers!

Hey @saghul I have the same problem with the self build sdk v2.6.0. But in my case hermes is disabled. Do you have an idea how to deals with this now? I thought upgrading would help but I'm a bit clueless now.

RN: 61.5
SDK: 2.6.0 based on tag https://github.com/jitsi/jitsi-meet/releases/tag/android-sdk-2.6.0

SDK 2.6 uses Hermes so that鈥檚 the only supported engine now.

What problem are you facing?

My problem is that I can not use hermes in my app currently but it seems that the sdk requires my application to use hermes. I assume this because I get this error when creating a session:

JitsiMeetSDK: JitsiMeetUncaughtExceptionHandler FATAL ERROR
JitsiMeetSDK: java.lang.UnsatisfiedLinkError: couldn't find DSO to load: libhermes.so
JitsiMeetSDK:  at com.facebook.soloader.SoLoader.doLoadLibraryBySoName(SoLoader.java:738)
JitsiMeetSDK:  at com.facebook.soloader.SoLoader.loadLibraryBySoName(SoLoader.java:591)
JitsiMeetSDK:  at com.facebook.soloader.SoLoader.loadLibrary(SoLoader.java:529)
JitsiMeetSDK:  at com.facebook.soloader.SoLoader.loadLibrary(SoLoader.java:484)
JitsiMeetSDK:  at com.facebook.hermes.reactexecutor.HermesExecutor.<clinit>(HermesExecutor.java:20)
JitsiMeetSDK:  at com.facebook.hermes.reactexecutor.HermesExecutorFactory.create(HermesExecutorFactory.java:27)
JitsiMeetSDK:  at com.facebook.react.ReactInstanceManager$5.run(ReactInstanceManager.java:952)
JitsiMeetSDK:  at java.lang.Thread.run(Thread.java:764)

So my question is: Shouldn't hermes bundle the packages while building the the sdk instead of requiring my application to provide hermes libraries during runtime?

The SDK does depend on Hermes, but if you app doesn鈥檛 use it it may get excluded from the build.

Our SDK is currently targeted at native apps, using it from another RN app is not very well supported, as this case shows. It does work, mostly, but there are limitations, like this one.

I'm using version 2.6.1 (with my own RN app) and now I have this issue:

java.lang.RuntimeException: java.lang.RuntimeException: Duplicate class com.facebook.hermes.BuildConfig found in modules classes.jar (com.facebook:hermes:0.2.1) and classes.jar (hermes-debug.aar)

any ideas?

Don't know if I explain this correctly but try to exclude hermes from the jitsi sdk as your own application already provides the dependency:

In android/app/build.gradle add:

implementation ('org.jitsi.react:jitsi-meet-sdk:2.6.0') {
      exclude group: 'com.facebook',module:'hermes'
      transitive = true
}

Hi @saghul , I'm using sdk v2.6.0 and am trying to use the SDK without enabling Hermes at the moment too.
Would it be sufficient to undo the changes in these 2 PR (https://github.com/jitsi/jitsi-meet/pull/4977/files & https://github.com/jitsi/jitsi-meet/pull/5032/files) to revert the use of Hermes?

Hi @saghul , I'm using sdk v2.6.0 and am trying to use the SDK without enabling Hermes at the moment too.
Would it be sufficient to undo the changes in these 2 PR (https://github.com/jitsi/jitsi-meet/pull/4977/files & https://github.com/jitsi/jitsi-meet/pull/5032/files) to revert the use of Hermes?

@SeveHo this worked for me.

Was this page helpful?
0 / 5 - 0 ratings