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

Error setting mode as multi_process #750

Closed
erickriva opened this issue Oct 19, 2024 · 3 comments · Fixed by #754
Closed

Error setting mode as multi_process #750

erickriva opened this issue Oct 19, 2024 · 3 comments · Fixed by #754

Comments

@erickriva
Copy link

Version: 3.0.2
OS: Android 14
Using new architecture

Error: Value is a number, expected a String

when using

import { MMKV, Mode } from "react-native-mmkv";
const database = new MMKV({ mode: Mode.MULTI_PROCESS });

Setting mode to MULTI_PROCESS (as a string) makes it work, but Mode enum is expected so Typescript complains.

Copy link

Guten Tag, Hans here 🍻. It looks like ze issue you are experiencing might be related to how ze Mode enum is being interpreted.

Make sure you are importing ze enum correctly, and try using it as follows:

const database = new MMKV({ mode: Mode.MULTI_PROCESS });

If you are still having problems, could you please provide logs from adb logcat when ze error occurs? Ze logs will help mrousavy understand ze problem better.

Also, if you enjoy using this library and want to support it, consider becoming a sponsor here. This can help mrousavy continue ze great work!

Looking forward to your response!

Note: If you think I made a mistake, please ping @mrousavy to take a look.

@mrousavy
Copy link
Owner

Interesting. I'm guessing this is a codegen bug

@mrousavy
Copy link
Owner

fixed in #754 🔥

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

Successfully merging a pull request may close this issue.

2 participants