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

dlopen failed: library "libreact_featureflagsjni.so" not found #50508

Open
tapz opened this issue Apr 6, 2025 · 2 comments
Open

dlopen failed: library "libreact_featureflagsjni.so" not found #50508

tapz opened this issue Apr 6, 2025 · 2 comments
Labels
Needs: Author Feedback Needs: Repro This issue could be improved with a clear list of steps to reproduce the issue.

Comments

@tapz
Copy link

tapz commented Apr 6, 2025

Description

I have SoLoader.init(this, OpenSourceMergedSoMapping) in my MainApp, but still this error started occurring after updating from 0.75 to 0.78.

 java.lang.UnsatisfiedLinkError: dlopen failed: library "libreact_featureflagsjni.so" not found
 	at java.lang.Runtime.loadLibrary0(Runtime.java:1081)
 	at java.lang.Runtime.loadLibrary0(Runtime.java:1003)
 	at java.lang.System.loadLibrary(System.java:1765)
 	at com.facebook.soloader.nativeloader.SystemDelegate.loadLibrary(SystemDelegate.java:24)
 	at com.facebook.soloader.nativeloader.NativeLoader.loadLibrary(NativeLoader.java:52)
 	at com.facebook.soloader.nativeloader.NativeLoader.loadLibrary(NativeLoader.java:30)
 	at com.facebook.soloader.SoLoader.loadLibrary(SoLoader.java:805)
 	at com.facebook.react.internal.featureflags.ReactNativeFeatureFlagsCxxInterop.<clinit>(ReactNativeFeatureFlagsCxxInterop.kt:28)
 	at com.facebook.react.internal.featureflags.ReactNativeFeatureFlagsCxxAccessor.override(ReactNativeFeatureFlagsCxxAccessor.kt:475)
 	at com.facebook.react.internal.featureflags.ReactNativeFeatureFlags.override(ReactNativeFeatureFlags.kt:316)
 	at com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.load(DefaultNewArchitectureEntryPoint.kt:42)
 	at com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.load$default(DefaultNewArchitectureEntryPoint.kt:29)
 	at net.heiiapp.heii.app.MainApplication.onCreate(MainApplication.kt:87)
 	at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1391)
 	at android.app.ActivityThread.handleBindApplication(ActivityThread.java:7698)
 	at android.app.ActivityThread.-$$Nest$mhandleBindApplication(Unknown Source:0)
 	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2500)
 	at android.os.Handler.dispatchMessage(Handler.java:109)
 	at android.os.Looper.loopOnce(Looper.java:232)
 	at android.os.Looper.loop(Looper.java:317)
 	at android.app.ActivityThread.main(ActivityThread.java:8934)
 	at java.lang.reflect.Method.invoke(Native Method)
 	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:591)
 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:911)

Steps to reproduce

  1. Build app

React Native Version

0.78.2

Affected Platforms

Runtime - Android

Output of npx @react-native-community/cli info

System:
  OS: macOS 15.3.2
  CPU: (12) arm64 Apple M2 Max
  Memory: 11.90 GB / 96.00 GB
  Shell:
    version: "5.9"
    path: /bin/zsh
Binaries:
  Node:
    version: 22.14.0
    path: ~/.nvm/versions/node/v22.14.0/bin/node
  Yarn:
    version: 1.22.19
    path: /opt/homebrew/bin/yarn
  npm:
    version: 10.9.2
    path: ~/.nvm/versions/node/v22.14.0/bin/npm
  Watchman:
    version: 2025.03.10.00
    path: /opt/homebrew/bin/watchman
Managers:
  CocoaPods:
    version: 1.16.2
    path: /opt/homebrew/bin/pod
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 24.4
      - iOS 18.4
      - macOS 15.4
      - tvOS 18.4
      - visionOS 2.4
      - watchOS 11.4
  Android SDK:
    API Levels:
      - "34"
      - "35"
    Build Tools:
      - 34.0.0
      - 35.0.0
    Android NDK: Not Found
IDEs:
  Android Studio: 2024.3 AI-243.22562.218.2431.13114758
  Xcode:
    version: 16.3/16E140
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 23.0.2
    path: /opt/homebrew/opt/openjdk/bin/javac
  Ruby:
    version: 2.6.10
    path: /usr/bin/ruby
npmPackages:
  "@react-native-community/cli":
    installed: 18.0.0
    wanted: ^18.0.0
  react:
    installed: 19.0.0
    wanted: 19.0.0
  react-native:
    installed: 0.78.2
    wanted: 0.78.2
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: true
iOS:
  hermesEnabled: Not found
  newArchEnabled: false

Stacktrace or Logs

java.lang.UnsatisfiedLinkError: dlopen failed: library "libreact_featureflagsjni.so" not found
 	at java.lang.Runtime.loadLibrary0(Runtime.java:1081)
 	at java.lang.Runtime.loadLibrary0(Runtime.java:1003)
 	at java.lang.System.loadLibrary(System.java:1765)
 	at com.facebook.soloader.nativeloader.SystemDelegate.loadLibrary(SystemDelegate.java:24)
 	at com.facebook.soloader.nativeloader.NativeLoader.loadLibrary(NativeLoader.java:52)
 	at com.facebook.soloader.nativeloader.NativeLoader.loadLibrary(NativeLoader.java:30)
 	at com.facebook.soloader.SoLoader.loadLibrary(SoLoader.java:805)
 	at com.facebook.react.internal.featureflags.ReactNativeFeatureFlagsCxxInterop.<clinit>(ReactNativeFeatureFlagsCxxInterop.kt:28)
 	at com.facebook.react.internal.featureflags.ReactNativeFeatureFlagsCxxAccessor.override(ReactNativeFeatureFlagsCxxAccessor.kt:475)
 	at com.facebook.react.internal.featureflags.ReactNativeFeatureFlags.override(ReactNativeFeatureFlags.kt:316)
 	at com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.load(DefaultNewArchitectureEntryPoint.kt:42)
 	at com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.load$default(DefaultNewArchitectureEntryPoint.kt:29)
 	at net.heiiapp.heii.app.MainApplication.onCreate(MainApplication.kt:87)
 	at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1391)
 	at android.app.ActivityThread.handleBindApplication(ActivityThread.java:7698)
 	at android.app.ActivityThread.-$$Nest$mhandleBindApplication(Unknown Source:0)
 	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2500)
 	at android.os.Handler.dispatchMessage(Handler.java:109)
 	at android.os.Looper.loopOnce(Looper.java:232)
 	at android.os.Looper.loop(Looper.java:317)
 	at android.app.ActivityThread.main(ActivityThread.java:8934)
 	at java.lang.reflect.Method.invoke(Native Method)
 	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:591)
 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:911)

Reproducer

https://github.com

Screenshots and Videos

No response

@react-native-bot react-native-bot added Needs: Author Feedback Needs: Repro This issue could be improved with a clear list of steps to reproduce the issue. labels Apr 6, 2025
@react-native-bot
Copy link
Collaborator

Warning

Missing reproducer: We could not detect a reproducible example in your issue report. Please provide either:

@shubhamguptadream11
Copy link
Collaborator

It would be very helpful if you provide a valid reproducer to help on this. You can refer to this template: https://github.com/react-native-community/reproducer-react-native/generate

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs: Author Feedback Needs: Repro This issue could be improved with a clear list of steps to reproduce the issue.
Projects
None yet
Development

No branches or pull requests

3 participants