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.

UnsatisfiedLinkError with Flipper 0.55.0

See original GitHub issue

🐛 Bug Report

We’re trying to upgrade from Stetho to Flipper for the first time as we were previously blocked by https://github.com/facebook/flipper/issues/660

I’m able to build after excluding fbjni from flipper and flipper-network-plugin but I’m getting runtime crashes:

Caused by: java.lang.UnsatisfiedLinkError: couldn't find DSO to load: libflipper.so caused by: dlopen failed: cannot locate symbol "_ZNSt6__ndk112__next_primeEj" referenced by "/data/data/xxxxxxx/lib-main/libflipper.so"... result: 0
        at com.facebook.soloader.SoLoader.doLoadLibraryBySoName(SoLoader.java:896)
        at com.facebook.soloader.SoLoader.loadLibraryBySoNameImpl(SoLoader.java:725)
        at com.facebook.soloader.SoLoader.loadLibraryBySoName(SoLoader.java:649)
        at com.facebook.soloader.SoLoader.loadLibrary(SoLoader.java:629)
        at com.facebook.soloader.SoLoader.loadLibrary(SoLoader.java:577)
        at com.facebook.flipper.android.EventBase.<clinit>(EventBase.java:19)
        at com.facebook.flipper.android.FlipperThread.run(FlipperThread.java:25)

To Reproduce

Unfortunately I can’t provide a complete sample, but this is how we’re adding the Flipper dependencies:

    debugImplementation ('com.facebook.flipper:flipper:0.55.0') {
        exclude group: 'com.facebook.fbjni', module: 'fbjni'
    }
    debugImplementation 'com.facebook.soloader:soloader:0.9.0'
    debugImplementation ('com.facebook.flipper:flipper-network-plugin:0.55.0') {
        exclude group: 'com.facebook.fbjni', module: 'fbjni'
    }

It looks like the missing symbol should be in libc++_shared.so which as far as I can tell is ending up in the final APK properly, so not totally sure what’s weird about our setup.

Environment

  • Mac OSX 10.15.6
  • AGP 4.0.1
  • Flipper 0.55.0
  • SoLoader 0.9.0
  • React Native 0.63.1
  • Android Stock emulator, various API levels (27, 29, 30)

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:2
  • Comments:10 (4 by maintainers)

github_iconTop GitHub Comments

3reactions
janweigelcommented, Sep 7, 2020

Same problem here. I’m getting the same runtime error as mentioned above.

Flipper 0.55.0 SoLoader 0.9.0 React Native: 0.62.2

1reaction
shashachucommented, Sep 10, 2020

@passy I wasn’t able to pin it to 0.0.2 just in the gradle files, but I made local builds of flipper and the flipper network plugin with 97adea5 reverted and indeed it doesn’t crash, so it does appear to be the fbjni 0.0.4 version upgrade.

Read more comments on GitHub >

github_iconTop Results From Across the Web

java.lang.UnsatisfiedLinkError: couldn't find DSO to load ...
I am a beginner in react-native. So I don't know what other details files I need to post here. Do let me know...
Read more >
How to Handle the UnsatisfiedLinkError Runtime Error in Java
The Java java.lang.UnsatisfiedLinkError is thrown when a program uses a native libaray but is unable to find it at runtime for some reason....
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