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 Crash on Android 12+ #312

Open
mohity777 opened this issue Feb 4, 2023 · 1 comment
Open

App Crash on Android 12+ #312

mohity777 opened this issue Feb 4, 2023 · 1 comment

Comments

@mohity777
Copy link

mohity777 commented Feb 4, 2023

Describe the bug
App gets crash as soon as app is launched

To Reproduce
Steps to reproduce the behavior:

  1. Install react-native-mmkv-storage 0.8.0
  2. Run App using react-native run-android
  3. Open App

Expected behavior
App should not crash

Screenshots
FATAL EXCEPTION: create_react_context
Process: in.mohalla.video, PID: 5585
java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol "__emutls_get_address" referenced by "/data/app/~~_YMS11acemf79gjweO5uNw==/in.mohalla.video-SHk_u7uZtPzBaImcJ_rWJQ==/lib/arm64/librnmmkv.so"...
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.ammarahmed.mmkv.RNMMKVModule.(RNMMKVModule.java:38)
at com.ammarahmed.mmkv.RNMMKVPackage.createNativeModules(RNMMKVPackage.java:17)
at com.facebook.react.ReactPackageHelper.getNativeModuleIterator(ReactPackageHelper.java:42)
at com.facebook.react.NativeModuleRegistryBuilder.processPackage(NativeModuleRegistryBuilder.java:42)
at com.facebook.react.ReactInstanceManager.processPackage(ReactInstanceManager.java:1425)
at com.facebook.react.ReactInstanceManager.processPackages(ReactInstanceManager.java:1396)
at com.facebook.react.ReactInstanceManager.createReactContext(ReactInstanceManager.java:1287)
at com.facebook.react.ReactInstanceManager.access$1100(ReactInstanceManager.java:136)
at com.facebook.react.ReactInstanceManager$5.run(ReactInstanceManager.java:1065)
at java.lang.Thread.run(Thread.java:1012)
Screenshot 2023-02-04 at 11 34 02 PM

Platform Information:

  • OS: Android 12+
  • React Native Version: 0.66.3
  • Library Version: 0.8.0

Additional context
I tried its alternative library react-native-mmkv that one is also crashing on android 12+.
related issue:

  1. dlopen: failed to load __emutls_get_address mrousavy/react-native-mmkv#487
  2. After upgrading 0.68.2 to 0.68.5 received runtime error facebook/react-native#35324
@rdjuric
Copy link

rdjuric commented Jul 27, 2023

I was having the same problem when updating from react-native 0.67.5 -> 0.72.3 using mmkv 0.8.0.

The problem on my case was that even thought I had ndkVersion = "23.1.7779620" on build.gradle, I was also setting it manually on /android/.localproperties to be version 21.x, like this
ndk.dir=C:\\Users\\Name\\AppData\\Local\\Android\\Sdk\\ndk\\21.x.xx

Changing this to match the version on build.grade (23.1.7779620) and then deleting the version 21 on the SDK manager solved the issue for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants