question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Android] Fixing Libjsc.so not Found with hermes engine true #2455

See original GitHub issue

cc @bmunkholm (sorry, i’m not following the issue template, since this is a fixing of https://github.com/realm/realm-js/issues/2455)

https://github.com/realm/realm-js/issues/2455 is locked i can’t add a new comment there,

but i’m able to get realm working with hermes enabled,

Fixing https://github.com/facebook/react-native/issues/25537#issuecomment-509180637 : open build.gradle (app/build.gradle) and add following code:

def useIntlJsc = false

and in dependencies add following code:

if (useIntlJsc) {
     implementation 'org.webkit:android-jsc-intl:+'
} else {
     implementation 'org.webkit:android-jsc:+'
}

Screenshot :

image

snippet:

const info = this.state.realm
      ? 'Number of dogs in this Realm: ' + this.state.realm.objects('Dog').length
      : 'Loading...';

    console.log('info' , info)
    const isHermes = () => global.HermesInternal !== null
    console.log('hermes' , isHermes())

PS : I don’t know what caused issue when i’m add useIntlJsc in the future, becaused i’m not expeert about it, but now i can add realm with hermes enabled without any error (libjsc.so not found error)

ENV: node : v10.19.0 npm : 6.13.4 “react-native”: “0.61.5”, “realm”: “^5.0.3”

EDIT: I’ve tested in debug mode, when i tried to tested in release mode i get the following error: image

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
flyskywhycommented, Dec 4, 2020

Edit your project/android/app/build.gradle from

    if (enableHermes) {
        def hermesPath = "../../node_modules/hermes-engine/android/";
        debugImplementation files(hermesPath + "hermes-debug.aar")
        releaseImplementation files(hermesPath + "hermes-release.aar")
    } else {
        implementation jscFlavor
    }

to

    if (enableHermes) {
        def hermesPath = "../../node_modules/hermes-engine/android/";
        debugImplementation files(hermesPath + "hermes-debug.aar")
        releaseImplementation files(hermesPath + "hermes-release.aar")
        implementation jscFlavor
    } else {
        implementation jscFlavor
    }
0reactions
ianpwardcommented, Jul 7, 2020

@binbinla It is not part of the plan right now but we are going into quarterly planning right now and will consider it - unfortunately it is a large amount of work - you can follow #2455 for updates

Read more comments on GitHub >

github_iconTop Results From Across the Web

Getting library "libjsc.so" not found after upgrading React ...
This issue only comes when you have Hermes engine enabled. Here is my fix for this I was facing this issue, in my...
Read more >
Using Hermes - React Native
Edit your android/app/gradle.properties file and make sure hermesEnabled is true: # Use this property to enable or disable the Hermes JS engine.
Read more >
How to: enable Hermes JavaScript engine in your React ...
The first thing to do is to set the enableHermes option to true in the React Native project configuration. This is typically done...
Read more >
React Native Upgrade Helper
If you have the hermes-engine dependency you need to upgrade to 0.7.2 see release here if you are on a previous version you...
Read more >
react-native-pdf - npm
A react native PDF view component, support ios and android platform. Latest version: 6.6.2, last published: 3 months ago.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found