react-native-mmkv-storage: [Bug] Attempt to invoke virtual method 'boolean java.lang.String.equals(java.lang.Object)' on a null object reference

Describe the bug

I upgraded 0.4.4 to 0.6.10 and release new version of the app. While I don’t have any issue, I see this crash report from users:

java.lang.NullPointerException: Attempt to invoke virtual method 'boolean java.lang.String.equals(java.lang.Object)' on a null object reference

com.ammarahmed.mmkv.RNMMKVModule.migrate RNMMKVModule.java:98
com.ammarahmed.mmkv.RNMMKVModule.installLib RNMMKVModule.java:66
[package name here].CustomMMKVJSIModulePackage.getJSIModules CustomMMKVJSIModulePackage.java:16
com.facebook.react.ReactInstanceManager.createReactContext ReactInstanceManager.java:1376
com.facebook.react.ReactInstanceManager.access$1200 ReactInstanceManager.java:138
com.facebook.react.ReactInstanceManager$5.run ReactInstanceManager.java:1104
java.lang.Thread.run Thread.java:923

Affected devices are Galaxy Note10+ and Galaxy A50. Affected OS is Android 11.

To Reproduce Steps to reproduce the behavior:

  1. Create new project using version 0.4.4 and save some data
  2. Upgrade version 0.4.4 to 0.6.10
  3. Build, install and open, see if it crashes or not

Sadly, I can’t reproduce it. Maybe you can or understand what happened

Expected behavior App doesn’t crash in production.

Screenshots If applicable, add screenshots to help explain your problem.

Platform Information:

  • OS: Android 11
  • React Native Version 0.67.1
  • Library Version 0.6.10

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 16 (16 by maintainers)

Most upvoted comments

@unfernandito I am glad your app is working as expected now. Regarding help, it would be great if you can contribute in any way possible. I am open to ideas and things that can be done. Please let me know how you can help.