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

Android crash on 1.2.5 (1.1.6 downgrade works) #122

Closed
xanderdeseyn opened this issue Aug 17, 2021 · 20 comments
Closed

Android crash on 1.2.5 (1.1.6 downgrade works) #122

xanderdeseyn opened this issue Aug 17, 2021 · 20 comments

Comments

@xanderdeseyn
Copy link

xanderdeseyn commented Aug 17, 2021

Crash on startup on Android after upgrading to 1.2.5. Tried both with and without Hermes. Downgrade fixed it.

08-17 13:24:52.755 10097 10097 F DEBUG   : Build fingerprint: 'samsung/beyond1lteeea/beyond1:11/RP1A.200720.012/G973FXXSBFUF3:user/release-keys'
08-17 13:24:52.755 10097 10097 F DEBUG   : Revision: '26'
08-17 13:24:52.755 10097 10097 F DEBUG   : ABI: 'arm64'
08-17 13:24:52.755 10097 10097 F DEBUG   : Timestamp: 2021-08-17 13:24:52+0200
08-17 13:24:52.755 10097 10097 F DEBUG   : pid: 8714, tid: 10036, name: create_react_co  >>> com.themobilecompany.delijn <<<
08-17 13:24:52.755 10097 10097 F DEBUG   : uid: 10879
08-17 13:24:52.756 10097 10097 F DEBUG   : signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x2
08-17 13:24:52.756 10097 10097 F DEBUG   : Cause: null pointer dereference
08-17 13:24:52.756 10097 10097 F DEBUG   :     x0  000000000006800b  x1  000000709d4984d8  x2  00000072dee54508  x3  ffffffff9ee5c111
08-17 13:24:52.756 10097 10097 F DEBUG   :     x4  0027ab73c5000000  x5  000000705e543ae4  x6  000000743690f000  x7  0000000001f2e366
08-17 13:24:52.756 10097 10097 F DEBUG   :     x8  01012aa413b4937a  x9  01012aa413b4937a  x10 0000000000000000  x11 01012aa413b4937a
08-17 13:24:52.756 10097 10097 F DEBUG   :     x12 0000000000000018  x13 00000000611b9c84  x14 0028210ae675c86c  x15 000014be3f137182
08-17 13:24:52.756 10097 10097 F DEBUG   :     x16 000000705e7f9bb8  x17 000000742f50ff10  x18 0000007060c48000  x19 00000071aeee1560
08-17 13:24:52.756 10097 10097 F DEBUG   :     x20 000000709d498758  x21 0000000000000000  x22 000000709d4988b0  x23 000000716eebe6a0
08-17 13:24:52.756 10097 10097 F DEBUG   :     x24 000000716eebe6b0  x25 0000000000000002  x26 000000709d49a000  x27 0000000000000000
08-17 13:24:52.756 10097 10097 F DEBUG   :     x28 000000709d498980  x29 000000709d498710
08-17 13:24:52.756 10097 10097 F DEBUG   :     lr  000000705e543bac  sp  000000709d498580  pc  000000705e543bb0  pst 0000000060000000
08-17 13:24:52.830 10097 10097 F DEBUG   : backtrace:
08-17 13:24:52.830 10097 10097 F DEBUG   :       #00 pc 000000000002dbb0  /data/app/~~DS3Ycp2q_TS27axleI9rCA==/com.themobilecompany.delijn-z04o7lHYE5pYmfKr7xFvPQ==/lib/arm64/libhermes.so (facebook::hermes::HermesRuntimeImpl::call(facebook::jsi::Function const&, facebook::jsi::Value const&, facebook::jsi::Value const*, unsigned long)+204) (BuildId: 104108701ea35e3b32f33afab7ef38388a9e99aa)
08-17 13:24:52.830 10097 10097 F DEBUG   :       #01 pc 000000000002a2e8  /data/app/~~DS3Ycp2q_TS27axleI9rCA==/com.themobilecompany.delijn-z04o7lHYE5pYmfKr7xFvPQ==/lib/arm64/libmmkvnative.so (install(facebook::jsi::Runtime&)+144) (BuildId: 1e8957cd4588b8ceca49ec9166600921e517148a)
08-17 13:24:52.830 10097 10097 F DEBUG   :       #02 pc 000000000002b484  /data/app/~~DS3Ycp2q_TS27axleI9rCA==/com.themobilecompany.delijn-z04o7lHYE5pYmfKr7xFvPQ==/lib/arm64/libmmkvnative.so (Java_com_reactnativemmkv_MmkvModule_nativeInstall+80) (BuildId: 1e8957cd4588b8ceca49ec9166600921e517148a)
08-17 13:24:52.830 10097 10097 F DEBUG   :       #03 pc 000000000013eed4  /apex/com.android.art/lib64/libart.so (art_quick_generic_jni_trampoline+148) (BuildId: fe6bfaf552d16195430b86d57f169733)
08-17 13:24:52.830 10097 10097 F DEBUG   :       #04 pc 00000000001357e8  /apex/com.android.art/lib64/libart.so (art_quick_invoke_static_stub+568) (BuildId: fe6bfaf552d16195430b86d57f169733)
08-17 13:24:52.830 10097 10097 F DEBUG   :       #05 pc 00000000001ab804  /apex/com.android.art/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+228) (BuildId: fe6bfaf552d16195430b86d57f169733)
08-17 13:24:52.831 10097 10097 F DEBUG   :       #06 pc 0000000000326090  /apex/com.android.art/lib64/libart.so (art::interpreter::ArtInterpreterToCompiledCodeBridge(art::Thread*, art::ArtMethod*, art::ShadowFrame*, unsigned short, art::JValue*)+376) (BuildId: fe6bfaf552d16195430b86d57f169733)
08-17 13:24:52.831 10097 10097 F DEBUG   :       #07 pc 000000000031c278  /apex/com.android.art/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+912) (BuildId: fe6bfaf552d16195430b86d57f169733)
08-17 13:24:52.831 10097 10097 F DEBUG   :       #08 pc 000000000069490c  /apex/com.android.art/lib64/libart.so (MterpInvokeStatic+548) (BuildId: fe6bfaf552d16195430b86d57f169733)
08-17 13:24:52.831 10097 10097 F DEBUG   :       #09 pc 000000000012f994  /apex/com.android.art/lib64/libart.so (mterp_op_invoke_static+20) (BuildId: fe6bfaf552d16195430b86d57f169733)
08-17 13:24:52.831 10097 10097 F DEBUG   :       #10 pc 000000000009e20c  [anon:dalvik-classes2.dex extracted in memory from /data/app/~~DS3Ycp2q_TS27axleI9rCA==/com.themobilecompany.delijn-z04o7lHYE5pYmfKr7xFvPQ==/base.apk!classes2.dex] (com.reactnativemmkv.MmkvModule.install+8)
08-17 13:24:52.831 10097 10097 F DEBUG   :       #11 pc 0000000000694bb0  /apex/com.android.art/lib64/libart.so (MterpInvokeStatic+1224) (BuildId: fe6bfaf552d16195430b86d57f169733)
08-17 13:24:52.831 10097 10097 F DEBUG   :       #12 pc 000000000012f994  /apex/com.android.art/lib64/libart.so (mterp_op_invoke_static+20) (BuildId: fe6bfaf552d16195430b86d57f169733)
08-17 13:24:52.831 10097 10097 F DEBUG   :       #13 pc 0000000000000e6c  [anon:dalvik-classes4.dex extracted in memory from /data/app/~~DS3Ycp2q_TS27axleI9rCA==/com.themobilecompany.delijn-z04o7lHYE5pYmfKr7xFvPQ==/base.apk!classes4.dex] (com.themobilecompany.delijn.DeLijnJSIPackage.getJSIModules+56)
08-17 13:24:52.831 10097 10097 F DEBUG   :       #14 pc 0000000000693694  /apex/com.android.art/lib64/libart.so (MterpInvokeInterface+1812) (BuildId: fe6bfaf552d16195430b86d57f169733)
08-17 13:24:52.831 10097 10097 F DEBUG   :       #15 pc 000000000012fa14  /apex/com.android.art/lib64/libart.so (mterp_op_invoke_interface+20) (BuildId: fe6bfaf552d16195430b86d57f169733)
08-17 13:24:52.831 10097 10097 F DEBUG   :       #16 pc 00000000003d2564  [anon:dalvik-classes.dex extracted in memory from /data/app/~~DS3Ycp2q_TS27axleI9rCA==/com.themobilecompany.delijn-z04o7lHYE5pYmfKr7xFvPQ==/base.apk] (com.facebook.react.ReactInstanceManager.createReactContext+276)
08-17 13:24:52.831 10097 10097 F DEBUG   :       #17 pc 00000000006942d8  /apex/com.android.art/lib64/libart.so (MterpInvokeDirect+1248) (BuildId: fe6bfaf552d16195430b86d57f169733)
08-17 13:24:52.831 10097 10097 F DEBUG   :       #18 pc 000000000012f914  /apex/com.android.art/lib64/libart.so (mterp_op_invoke_direct+20) (BuildId: fe6bfaf552d16195430b86d57f169733)
08-17 13:24:52.831 10097 10097 F DEBUG   :       #19 pc 00000000003d2434  [anon:dalvik-classes.dex extracted in memory from /data/app/~~DS3Ycp2q_TS27axleI9rCA==/com.themobilecompany.delijn-z04o7lHYE5pYmfKr7xFvPQ==/base.apk] (com.facebook.react.ReactInstanceManager.access$1100)
08-17 13:24:52.831 10097 10097 F DEBUG   :       #20 pc 0000000000694bb0  /apex/com.android.art/lib64/libart.so (MterpInvokeStatic+1224) (BuildId: fe6bfaf552d16195430b86d57f169733)
08-17 13:24:52.831 10097 10097 F DEBUG   :       #21 pc 000000000012f994  /apex/com.android.art/lib64/libart.so (mterp_op_invoke_static+20) (BuildId: fe6bfaf552d16195430b86d57f169733)
08-17 13:24:52.831 10097 10097 F DEBUG   :       #22 pc 00000000003d1b54  [anon:dalvik-classes.dex extracted in memory from /data/app/~~DS3Ycp2q_TS27axleI9rCA==/com.themobilecompany.delijn-z04o7lHYE5pYmfKr7xFvPQ==/base.apk] (com.facebook.react.ReactInstanceManager$5.run+140)
08-17 13:24:52.831 10097 10097 F DEBUG   :       #23 pc 0000000000693694  /apex/com.android.art/lib64/libart.so (MterpInvokeInterface+1812) (BuildId: fe6bfaf552d16195430b86d57f169733)
08-17 13:24:52.831 10097 10097 F DEBUG   :       #24 pc 000000000012fa14  /apex/com.android.art/lib64/libart.so (mterp_op_invoke_interface+20) (BuildId: fe6bfaf552d16195430b86d57f169733)
08-17 13:24:52.831 10097 10097 F DEBUG   :       #25 pc 00000000000eb858  /apex/com.android.art/javalib/core-oj.jar (java.lang.Thread.run+8)
08-17 13:24:52.831 10097 10097 F DEBUG   :       #26 pc 0000000000313520  /apex/com.android.art/lib64/libart.so (art::interpreter::Execute(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool, bool) (.llvm.230246881315256824)+264) (BuildId: fe6bfaf552d16195430b86d57f169733)
08-17 13:24:52.831 10097 10097 F DEBUG   :       #27 pc 0000000000680138  /apex/com.android.art/lib64/libart.so (artQuickToInterpreterBridge+776) (BuildId: fe6bfaf552d16195430b86d57f169733)
08-17 13:24:52.831 10097 10097 F DEBUG   :       #28 pc 000000000013eff8  /apex/com.android.art/lib64/libart.so (art_quick_to_interpreter_bridge+88) (BuildId: fe6bfaf552d16195430b86d57f169733)
08-17 13:24:52.831 10097 10097 F DEBUG   :       #29 pc 0000000000135564  /apex/com.android.art/lib64/libart.so (art_quick_invoke_stub+548) (BuildId: fe6bfaf552d16195430b86d57f169733)
08-17 13:24:52.831 10097 10097 F DEBUG   :       #30 pc 00000000001ab7e8  /apex/com.android.art/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+200) (BuildId: fe6bfaf552d16195430b86d57f169733)
08-17 13:24:52.831 10097 10097 F DEBUG   :       #31 pc 0000000000567e64  /apex/com.android.art/lib64/libart.so (art::JValue art::InvokeVirtualOrInterfaceWithJValues<art::ArtMethod*>(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, art::ArtMethod*, jvalue const*)+460) (BuildId: fe6bfaf552d16195430b86d57f169733)
08-17 13:24:52.831 10097 10097 F DEBUG   :       #32 pc 00000000005b8154  /apex/com.android.art/lib64/libart.so (art::Thread::CreateCallback(void*)+1308) (BuildId: fe6bfaf552d16195430b86d57f169733)
08-17 13:24:52.831 10097 10097 F DEBUG   :       #33 pc 00000000000b10e8  /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+64) (BuildId: f85239005a40452d2a5d593676124555)
08-17 13:24:52.831 10097 10097 F DEBUG   :       #34 pc 0000000000050a58  /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64) (BuildId: f85239005a40452d2a5d593676124555)```
@julianklumpers
Copy link

julianklumpers commented Aug 20, 2021

I can confirm i have the same issue. 1.1.6 works.
It stops working from version 1.2.0

@Mohamed-kassim
Copy link

Mohamed-kassim commented Aug 21, 2021

i was on react native 64.2 and it was crashing for me, only version 1.1.6 was working
after upgrading to rn 65 version 1.1.6 started crashing
so i upgraded to 1.2.5 and it worked with no crashing
@mrousavy

@mrousavy
Copy link
Owner

what? React Native 0.65 works with React Native MMKV 1.2.5???

@Moh-Kassim
Copy link

what? React Native 0.65 works with React Native MMKV 1.2.5???

when I was on version 64.2 only version 1.1.6 was working, above versions make android start failure and app crashes
after upgrading to 65.0 the app start failed, and I checked the native trace it was MMKV so I tried upgrading it to 1.2.5,
surprisingly it didn't crash and the app starts working good
But I cannot confirm that MMKV functionalities are working with 65.0, as The app was crashing a lot because of react-native-reanimated 2.3.alpha so I revert to 64.2 before testing everything but at least I can confirm that android start failure solved and the app starts well on 65.0 and 1.2.5
@mrousavy

@kanzitelli
Copy link
Sponsor Contributor

@mrousavy I can also confirm that react-native-mmkv works with RN 0.65.1. Here is the working example rnn-starter#rn-0.65.1 and the discussion.

@mrousavy
Copy link
Owner

mrousavy commented Sep 4, 2021

I just released 1.3.0 (yay 🎉), can you test if that works for you guys? It does work fine in the Example App (which is on RN 0.65.1)

@PSPatel5
Copy link

PSPatel5 commented Sep 5, 2021

Tried the latest version 1.3.0 with both with and without herms. Application crashes on the startup.

React Native Version: 0.64.2
using React-native-reanimated 2
Attaching log from Android.


com.momental.staging D/SoLoader: init exiting
com.momental.staging D/SoLoader: About to load: libjscexecutor.so
com.momental.staging D/SoLoader: libjscexecutor.so not found on /data/user/0/com.momental.staging/lib-main
com.momental.staging D/SoLoader: libjscexecutor.so found on /data/app/~~QO9JtDC4XoGfVFqsSGsnMA==/com.momental.staging-_2sPlTefbjFj4O9C1VSqzg==/lib/arm64
com.momental.staging D/SoLoader: Not resolving dependencies for libjscexecutor.so
com.momental.staging W/System.err: java.lang.UnsatisfiedLinkError: dlopen failed: library "libjsc.so" not found: needed by /data/app/~~QO9JtDC4XoGfVFqsSGsnMA==/com.momental.staging-_2sPlTefbjFj4O9C1VSqzg==/lib/arm64/libjscexecutor.so in namespace classloader-namespace
com.momental.staging W/System.err:     at java.lang.Runtime.load0(Runtime.java:939)
com.momental.staging W/System.err:     at java.lang.System.load(System.java:1628)
com.momental.staging W/System.err:     at com.facebook.soloader.SoLoader$1.load(SoLoader.java:405)
com.momental.staging W/System.err:     at com.facebook.soloader.DirectorySoSource.loadLibraryFrom(DirectorySoSource.java:77)
com.momental.staging W/System.err:     at com.facebook.soloader.DirectorySoSource.loadLibrary(DirectorySoSource.java:50)
com.momental.staging W/System.err:     at com.facebook.soloader.ApplicationSoSource.loadLibrary(ApplicationSoSource.java:89)
com.momental.staging W/System.err:     at com.facebook.soloader.SoLoader.doLoadLibraryBySoName(SoLoader.java:860)
com.momental.staging W/System.err:     at com.facebook.soloader.SoLoader.loadLibraryBySoNameImpl(SoLoader.java:740)
com.momental.staging W/System.err:     at com.facebook.soloader.SoLoader.loadLibraryBySoName(SoLoader.java:654)
com.momental.staging W/System.err:     at com.facebook.soloader.SoLoader.loadLibrary(SoLoader.java:634)
com.momental.staging W/System.err:     at com.facebook.soloader.SoLoader.loadLibrary(SoLoader.java:582)
com.momental.staging W/System.err:     at com.facebook.react.ReactInstanceManagerBuilder.getDefaultJSExecutorFactory(ReactInstanceManagerBuilder.java:297)
com.momental.staging W/System.err:     at com.facebook.react.ReactInstanceManagerBuilder.build(ReactInstanceManagerBuilder.java:270)
com.momental.staging W/System.err:     at com.facebook.react.ReactNativeHost.createReactInstanceManager(ReactNativeHost.java:87)
com.momental.staging W/System.err:     at com.facebook.react.ReactNativeHost.getReactInstanceManager(ReactNativeHost.java:39)
com.momental.staging W/System.err:     at com.momental.MainApplication.onCreate(MainApplication.java:61)
com.momental.staging W/System.err:     at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1208)
com.momental.staging W/System.err:     at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6986)
com.momental.staging W/System.err:     at android.app.ActivityThread.access$1700(ActivityThread.java:274)
com.momental.staging W/System.err:     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2093)
com.momental.staging W/System.err:     at android.os.Handler.dispatchMessage(Handler.java:106)
com.momental.staging W/System.err:     at android.os.Looper.loop(Looper.java:233)
com.momental.staging W/System.err:     at android.app.ActivityThread.main(ActivityThread.java:8010)
com.momental.staging W/System.err:     at java.lang.reflect.Method.invoke(Native Method)
com.momental.staging W/System.err:     at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:631)
com.momental.staging W/System.err:     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:978)
com.momental.staging E/SoLoader: couldn't find DSO to load: libjscexecutor.so caused by: dlopen failed: library "libjsc.so" not found: needed by /data/app/~~QO9JtDC4XoGfVFqsSGsnMA==/com.momental.staging-_2sPlTefbjFj4O9C1VSqzg==/lib/arm64/libjscexecutor.so in namespace classloader-namespace result: 0




com.momental.staging I/ReactNativeJNI: Inspector::Inspector transitioning to initial state RunningDetached
com.momental.staging I/MMKV: <MMKV.cpp:156::initialize> version v1.2.10, page size 4096, arch arm64-v8a
com.momental.staging I/MMKV: <MMKV.cpp:167::initialize> armv8 AES instructions is supported
com.momental.staging I/MMKV: <MMKV.cpp:175::initialize> armv8 CRC32 instructions is supported
com.momental.staging I/MMKV: <MMKV.cpp:198::initializeMMKV> root dir: /data/user/0/com.momental.staging/files/mmkv
    
    --------- beginning of crash
2021-09-05 11:31:26.033 7275-15611/com.momental.staging A/libc: Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0 in tid 15611 (create_react_co), pid 7275 (omental.staging) 

@mrousavy
Copy link
Owner

mrousavy commented Sep 5, 2021

the libjsc error above is not the reason of the crash. That's a caught error. Can you share the lines (msg & stacktrace) below the

    --------- beginning of crash

line?

@mrousavy
Copy link
Owner

mrousavy commented Sep 5, 2021

Also,

  • does this happen in debug or release builds?
  • Do you have a debugger (Flipper, Chrome or even Android Studio/adb) attached?
  • Could you try modifying the node_modules/react-native-mmkv/android/build.gradle file to make it use the -debug.aar instead of the -release.aar?
  • Did you do a complete clean and rebuild before testing?

Again, the example app (RN 0.65.1) works perfectly fine... This crash is really stressing me out

@t4ngth00
Copy link

t4ngth00 commented Sep 5, 2021

@mrousavy,
I got the same lib version as the issue owner. I confirm that my Android app crash on startup as well (both debug and release build). I'll try your suggestion above.
"react-native": "0.64.2",
"react-native-reanimated": "^2.2.0"

@PSPatel5
Copy link

PSPatel5 commented Sep 5, 2021

the libjsc error above is not the reason of the crash. That's a caught error. Can you share the lines (msg & stacktrace) below the

    --------- beginning of crash

line?

Android Studio ADB logs automatically get erased after the last line, as the application crashes.
Here's something I got from flipper. If it helps.

18:07:00.964
13219
MMKV
<MMKV.cpp:198::initializeMMKV> root dir: /data/user/0/com.momental.staging/files/mmkv
18:07:01.960
31343
DEBUG
pid: 13219, tid: 31334, name: create_react_co  >>> com.momental.staging <<<
18:07:01.418
31343
DEBUG
      #00 pc 000000000002f5d4  /data/app/~~roES2ZkKURQYhqMQ-XPnzg==/com.momental.staging-NkmNQh09ZZ4HSq3XHEkFug==/lib/arm64/libhermes.so (facebook::hermes::HermesRuntimeImpl::call(facebook::jsi::Function const&, facebook::jsi::Value const&, facebook::jsi::Value const*, unsigned long)+204) (BuildId: 6f52702204565e62fc1d0d9a58755bb7a4b543a7)
18:07:01.418
31343
DEBUG
      #01 pc 0000000000010278  /data/app/~~roES2ZkKURQYhqMQ-XPnzg==/com.momental.staging-NkmNQh09ZZ4HSq3XHEkFug==/lib/arm64/libreactnativemmkv.so (install(facebook::jsi::Runtime&)+144) (BuildId: 67372192aa3abb34a8310292d1373832e39e3910)
18:07:01.418
31343
DEBUG
      #02 pc 000000000001083c  /data/app/~~roES2ZkKURQYhqMQ-XPnzg==/com.momental.staging-NkmNQh09ZZ4HSq3XHEkFug==/lib/arm64/libreactnativemmkv.so (Java_com_reactnativemmkv_MmkvModule_nativeInstall+80) (BuildId: 67372192aa3abb34a8310292d1373832e39e3910)
18:07:01.418
31343
DEBUG
      #10 pc 00000000000004b0  [anon:dalvik-classes11.dex extracted in memory from /data/app/~~roES2ZkKURQYhqMQ-XPnzg==/com.momental.staging-NkmNQh09ZZ4HSq3XHEkFug==/base.apk!classes11.dex] (com.reactnativemmkv.MmkvModule.install+8)
18:07:01.418
31343
DEBUG
      #13 pc 000000000008ffa6  [anon:dalvik-classes2.dex extracted in memory from /data/app/~~roES2ZkKURQYhqMQ-XPnzg==/com.momental.staging-NkmNQh09ZZ4HSq3XHEkFug==/base.apk!classes2.dex] (com.momental.BaseJSIPackage.getJSIModules+50)
18:07:01.418
31343
DEBUG
      #16 pc 0000000000371b44  [anon:dalvik-classes.dex extracted in memory from /data/app/~~roES2ZkKURQYhqMQ-XPnzg==/com.momental.staging-NkmNQh09ZZ4HSq3XHEkFug==/base.apk] (com.facebook.react.ReactInstanceManager.createReactContext+212)
18:07:01.418
31343
DEBUG
      #19 pc 0000000000371a54  [anon:dalvik-classes.dex extracted in memory from /data/app/~~roES2ZkKURQYhqMQ-XPnzg==/com.momental.staging-NkmNQh09ZZ4HSq3XHEkFug==/base.apk] (com.facebook.react.ReactInstanceManager.access$1100)
18:07:01.419
31343
DEBUG
      #22 pc 0000000000371174  [anon:dalvik-classes.dex extracted in memory from /data/app/~~roES2ZkKURQYhqMQ-XPnzg==/com.momental.staging-NkmNQh09ZZ4HSq3XHEkFug==/base.apk] (com.facebook.react.ReactInstanceManager$5.run+140)
18:07:02.122
1728
ActivityTaskManager
  Force finishing activity com.momental.staging/com.momental.MainActivity
18:07:02.124
1728
FrameworkEventCollector
recordAppIssue PN: com.momental.staging
18:07:02.280
1728
WindowManager
WIN DEATH: Window{df83f37 u0 com.momental.staging/com.momental.MainActivity}
18:07:02.280
1728
InputDispatcher
Attempted to unregister already unregistered input channel 'df83f37 com.momental.staging/com.momental.MainActivity (server)'
18:07:02.309
1728
ActivityManager
Process com.momental.staging (pid 13219) has died: prcp TOP 

@mrousavy
Copy link
Owner

mrousavy commented Sep 5, 2021

does it work with JSC instead of Hermes?

@PSPatel5
Copy link

PSPatel5 commented Sep 5, 2021

Also,

  • does this happen in debug or release builds?
  • Do you have a debugger (Flipper, Chrome or even Android Studio/adb) attached?
  • Could you try modifying the node_modules/react-native-mmkv/android/build.gradle file to make it use the -debug.aar instead of the -release.aar?
  • Did you do a complete clean and rebuild before testing?

Again, the example app (RN 0.65.1) works perfectly fine... This crash is really stressing me out

  • This is happening in debug mode.
  • I haven't attached any debugger.
  • I'll check and update here.
  • Yes, I did clean and rebuild multiple times. with and without herms both. But the application still crashes.

@PSPatel5
Copy link

PSPatel5 commented Sep 5, 2021

Also,

  • does this happen in debug or release builds?
  • Do you have a debugger (Flipper, Chrome or even Android Studio/adb) attached?
  • Could you try modifying the node_modules/react-native-mmkv/android/build.gradle file to make it use the -debug.aar instead of the -release.aar?
  • Did you do a complete clean and rebuild before testing?

Again, the example app (RN 0.65.1) works perfectly fine... This crash is really stressing me out

The solution you suggested didn't work.! Tried cleaning and rebuilding multiple times.

@mrousavy
Copy link
Owner

mrousavy commented Sep 6, 2021

Thanks for your research @PSPatel5, unfortunately it's still not clear to me what's causing this issue. Again, the example app here runs. Please provide a full reproduceable example (public repo) where this crash happens so I can investigate this. This is causing me headaches :(

@ngocle2497
Copy link
Contributor

Can u create a new RN project (0.64.2) then install this library?. After run Mmkv.install (with reanimated 2.2.0), app crash when start.

@mrousavy
Copy link
Owner

mrousavy commented Sep 6, 2021

Does it work if you create a new RN project with 0.65.1?

@ngocle2497
Copy link
Contributor

ngocle2497 commented Sep 6, 2021

Does it work if you create a new RN project with 0.65.1?

with RN 0.65.1, it work

@PSPatel5
Copy link

PSPatel5 commented Sep 6, 2021

Thanks for your research @PSPatel5, unfortunately it's still not clear to me what's causing this issue. Again, the example app here runs. Please provide a full reproduceable example (public repo) where this crash happens so I can investigate this. This is causing me headaches :(

I didn't try with RN 0.65.1. But Here is a public repo I made using a boilerplate which is based on RN 0.64.1.
https://github.com/PSPatel5/MMKV-Demo/tree/stable/reanimated-v2

This repo has two branches. One with reanimated-v2 only, which runs fine and gave us an example page as an output. while the other branch is mmkv-test which includes MMKV setup with reanimated that you listed. Here also application crashes as soon as we open the app.

Do let me know if you need anything else from my side.

@mrousavy
Copy link
Owner

mrousavy commented Sep 7, 2021

While I already spent way too much of my free time on this issue to fix the crash for random people on the internet, I spent some more time on this yesterday and finally fixed it. Check out 1.3.1. 🎉🎉🎉🎉

If you appreciate my efforts, please consider buying me a coffee for my next late-night debug session: ❤️ GitHub sponsors

@mrousavy mrousavy closed this as completed Sep 7, 2021
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

No branches or pull requests

9 participants