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: Exception in HostFunction: Second argument ('key') has to be of type string! #9

Closed
KingAmo opened this issue Feb 26, 2021 · 4 comments
Labels
bug Something isn't working

Comments

@KingAmo
Copy link

KingAmo commented Feb 26, 2021

bellow code:

MMKV.set('key', 123)

throw an error.

after swap key and value, it is ok
it seems v1.0.2 key-value order go back to RTL, not LTR

@mrousavy
Copy link
Owner

Looks like it still uses the old binaries, could you try cleaning the cache?

rm -rf node_modules/react-native-mmkv
rm -rf package-lock.json
npm i

@mrousavy
Copy link
Owner

If it happens on iOS, try

cd ios
rm -rf Pods
rm -rf Podfile.lock
pod install

Then rebuild

@mrousavy mrousavy added the bug Something isn't working label Feb 26, 2021
@mrousavy
Copy link
Owner

mrousavy commented Mar 2, 2021

Feel free to comment if you're still experiencing this issue, closing for now

@BLOCKMATERIAL
Copy link

same bug but with boolean type
platofrm: IOS
devices: Iphone 14 Pro Max

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants