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
getString
fails on reload after calling delete
with encyptionKey
set in config
#665
Comments
I have a similar issue with version 2.12.2. Before I was using 2.9.0 and I don't have any issues (and we just updated MMKV, we didn't made any code changes).
|
An update on this: I get the same error in 2.9.0. This started to happen when we updated to RN 0.73.x |
Facing the same issue here |
Two things:
|
|
Okay gotcha - maybe a bug with encryption. Did you test if react-native-mmkv V3 fixes this issue? (requires new architeceture) |
I tested with latest v3 version and I had the same issue, but I'm not working with the new architecture though |
@mrousavy it happens only when encryption is turned on. I pulled in the code from my repro project into the example application, but haven't had a chance to put it through its paces yet. I'll try to get to that this afternoon and report back. Thanks for your patience 🙇 |
Steps to reproduce:
encryptionKey
in the config for your MMKV storegetString
undefined
Conditions to reproduce:
encryptionKey
set in configMinimum Reproducible Example (MRE)
There are instructions in the README for installation:
https://github.com/morganick/mmkv-encryption-app-mre
I've documented permutations in the code that you can make that make it work again:
Video
This happens on both iOS and Android.
MMKV_encrypted_single_key_store_delete_reload_bug.mov
Logs
If you use the
create-expo-app
cli, you'll get MMKV logging in the metro output as follow:[!NOTE]
The
InvalidProtocolBuffer truncatedMessage
shows up in the logs when this breaks.Special thanks to @frankcalise for being a sounding board while I tracked this down and testing out the MRE.
The text was updated successfully, but these errors were encountered: