ammarahm-ed / react-native-mmkv-storage

An ultra fast (0.0002s read/write), small & encrypted mobile key-value storage framework for React Native written in C++ using JSI
https://rnmmkv.now.sh
MIT License
1.59k stars 111 forks source link

[Bug] Android app crashing when using withEncryption() in version 10.0.3 #359

Open rkostrab opened 3 weeks ago

rkostrab commented 3 weeks ago

Describe the bug I am using mmkv for redux persist. I am initalizing it like this:

const storage = new MMKVLoader().withEncryption().initialize();

...and this causes app crash. I see this in logcat:

java_vm_ext.cc:598] JNI DETECTED ERROR IN APPLICATION: GetStringUTFChars received NULL jstring
java_vm_ext.cc:598]     in call to GetStringUTFChars
java_vm_ext.cc:598]     from void com.facebook.jni.NativeRunnable.run()
runtime.cc:708] Runtime aborting...

if I remove encryption: const storage = new MMKVLoader().initialize();

... then app is working normally

Platform Information: