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

App Crashes on first launch because of libjsi.so. Works fine afterwards #37379

Closed
pkpardeep482 opened this issue May 11, 2023 · 2 comments
Closed
Labels
Needs: Author Feedback Resolution: Duplicate Type: Unsupported Version Issues reported to a version of React Native that is no longer supported

Comments

@pkpardeep482
Copy link

Description

Android Version: 13
React-native Version: 0.67.4

Use Case
I am using react-native as a DFM (dynamic feature module). At the start of the app user presses the button and loads react-native-bundle. On the initial launch of the bundle, app crashes because of a given error. But after that, it works fine. I tried this on Android 12-13. in previous versions, it's working fine.

Crash Log
java.lang.UnsatisfiedLinkError: dlopen failed: library "libjsi.so" not found: needed by /data/app/~~98uHUDVJkOckraTndfTRww==/<package_name>-oCQfY_oFJrHz4wmdWuO_lA==/split_config.arm64_v8a.apk!/lib/arm64-v8a/libhermes.so in namespace classloader-namespace
at java.lang.Runtime.loadLibrary0(Runtime.java:1077)
at java.lang.Runtime.loadLibrary0(Runtime.java:998)
at java.lang.System.loadLibrary(System.java:1661)
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:869)
at com.facebook.hermes.reactexecutor.HermesExecutor.loadLibrary(HermesExecutor.java:25)
at com.facebook.hermes.reactexecutor.HermesExecutor.(HermesExecutor.java:19)
at com.facebook.hermes.reactexecutor.HermesExecutorFactory.create(HermesExecutorFactory.java:29)
at com.facebook.react.ReactInstanceManager$5.run(ReactInstanceManager.java:1105)
at java.lang.Thread.run(Thread.java:1012)

*Dynamic Feature Module Delivery Type: On-Demand

React Native Version

0.67.4

Output of npx react-native info

System:
OS: macOS 13.2
CPU: (8) x64 Apple M1
Memory: 12.00 MB / 16.00 GB
Shell: 5.8.1 - /bin/zsh
Binaries:
Node: 16.14.2 - /var/folders/vy/w4j9sp917msbvp4zjkx0tf3r0000gn/T/yarn--1683800181861-0.4752874941746914/node
Yarn: 1.22.19 - /var/folders/vy/w4j9sp917msbvp4zjkx0tf3r0000gn/T/yarn--1683800181861-0.4752874941746914/yarn
npm: Not Found
Watchman: 2022.10.03.00 - /opt/homebrew/bin/watchman
Managers:
CocoaPods: 1.12.0 - /Users/pardeepkumar/.rvm/gems/ruby-2.7.2/bin/pod
SDKs:
iOS SDK:
Platforms: DriverKit 22.2, iOS 16.2, macOS 13.1, tvOS 16.1, watchOS 9.1
Android SDK:
API Levels: 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33
Build Tools: 29.0.2, 30.0.2, 30.0.3, 31.0.0, 32.0.0, 32.1.0, 33.0.0, 33.0.1
System Images: android-33 | Google APIs ARM 64 v8a
Android NDK: Not Found
IDEs:
Android Studio: 2021.3 AI-213.7172.25.2113.9014738
Xcode: 14.2/14C18 - /usr/bin/xcodebuild
Languages:
Java: 11.0.11 - /usr/bin/javac
npmPackages:
@react-native-community/cli: Not Found
react: 17.0.2 => 17.0.2
react-native: 0.67.4 => 0.67.4
react-native-macos: Not Found
npmGlobalPackages:
react-native: Not Found

Steps to reproduce

Load bundle using
ReactInstanceManager.builder()
.setApplication(getApplication())
.setCurrentActivity(this)
.setBundleAssetName("index.android.bundle")
.setJSMainModulePath("index")
.setJSBundleFile("assets://index.android.bundle")
.addPackages(packages)
.setJavaScriptExecutorFactory(new HermesExecutorFactory())
.setUseDeveloperSupport(BuildConfig.DEBUG)
.setInitialLifecycleState(LifecycleState.RESUMED)
.build();

Snack, code example, screenshot, or link to a repository

none

@github-actions github-actions bot added the Type: Unsupported Version Issues reported to a version of React Native that is no longer supported label May 11, 2023
@github-actions
Copy link

⚠️ Unsupported Version of React Native
ℹ️ It looks like your issue or the example you provided uses an unsupported version of React Native. Due to the number of issues we receive, we're currently only accepting new issues against one of the supported versions. Please upgrade to latest and verify if the issue persists (alternatively, create a new project and repro the issue in it). If you cannot upgrade, please open your issue on StackOverflow to get further community support.

@cortinico
Copy link
Contributor

Closing as a duplicate of #36971

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs: Author Feedback Resolution: Duplicate Type: Unsupported Version Issues reported to a version of React Native that is no longer supported
Projects
None yet
Development

No branches or pull requests

2 participants