react-native-mmkv icon indicating copy to clipboard operation
react-native-mmkv copied to clipboard

Store does not deletes automatically when app uninstalled by the user only for some android devices not for all.

Open abdullatifHH opened this issue 1 year ago • 4 comments

Updated Description:

Explaining the scenario: (where I had identified a bug using this mmkv library)

  • Replaced the Async-storage with mmkv for utilizing the more size beyond what Async-storage library provides.
  • Now If user tries to uninstall the App, the cache data still persists and there is no way to identify the uninstall callback to clear the mmkv storage. Still we need to relay on the Async-storage keys to indentify the fresh app install instance and clear the mmkv storage. But opened an issues to find a better way without relaying on the Async-storage library.

This issue was reproduced in only some devices of Android model, not reproducible in iOS though.

abdullatifHH avatar Dec 11 '24 12:12 abdullatifHH

Guten Tag, Hans here! 🍻

Thanks for bringing this issue up. It seems you’ve encountered a potential bug with mmkv, which is indeed important to address. However, it would help us a lot if you could provide logs from the specific Android devices where this issue occurs.

To gather logs, you can use adb logcat while reproducing the issue on the device. This way, mrousavy can better understand the situation.

Also, if you’d like to ensure more timely support, consider sponsoring the project here. It really helps keep the development going!

Let us know if you can provide the logs!

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

maintenance-hans[bot] avatar Dec 11 '24 12:12 maintenance-hans[bot]

Do you have allowBackup set to false in Android manifest?

radko93 avatar Dec 17 '24 17:12 radko93

Do you have allowBackup set to false in Android manifest?

yes allowBackup is false, still issue persist.

abdullatifHH avatar May 02 '25 07:05 abdullatifHH

Using version 2.latest, I've just found a similar behavior. We've also put a tools:replace="android:allowBackup" together so it would replace any lib that could interfere.

<application android:allowBackup="false" tools:replace="android:allowBackup" ... />

brunofurmon avatar May 28 '25 21:05 brunofurmon

I think this has been fixed in react-native-mmkv 4.x.x-beta.

mrousavy avatar Aug 20 '25 14:08 mrousavy