-
-
Notifications
You must be signed in to change notification settings - Fork 235
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
[v1.3.1]: Cannot create MMKV instance when passing value to either "path" or "encryptionKey" #137
Comments
well what's the exception? you didn't show me an error message |
I've posted the error at the beginning of the issue. Here you are ERROR Error: Exception in HostFunction: , js engine: hermes |
there's no error message in there? is there a stack trace being printed? |
Hopefully those logs will help
|
maybe you can't write to /tmp/? Try not using a custom |
I've removed the "path" and here is what I got
|
@mrousavy Probably because the "some-encryption-key" file wasn't available? I assumed "some-encryption-key" was just a string |
no that should just be a string, hmm weird. I'll investigate. but everything works fine if you don't use |
Yes |
Found in the
try passing a one letter |
Using only "x" as a value did not work as well. I got the same error. |
I have the same problem, @t4ngth00 did u find a solution ? |
@florindumitru No, I didn't |
I assigned |
lol what how does that work |
I have this issue too but on 1.3.2, it appears to happen on Android only 🤔 |
Found the fix to this issue and made a pr, it seems the params used to access the mmkv lib was out of order for android: #176 |
The error "Error: Exception in HostFunction: " when passing either "path" or "encryptionKey" to the initialized object of MMKV class's constructor.
Reproducible example:
import { MMKV } from 'react-native-mmkv';
const storage = new MMKV({
id: 'some-id',
path: 'some-path',
encryptionKey: 'some-encryption-key',
});
I am using
react-native: 0.64.2
react-native-mmkv: 1.3.1
The text was updated successfully, but these errors were encountered: