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

App crash on android when activating Debug in RN #25

Closed
matgardon opened this issue Mar 9, 2021 · 4 comments
Closed

App crash on android when activating Debug in RN #25

matgardon opened this issue Mar 9, 2021 · 4 comments

Comments

@matgardon
Copy link

matgardon commented Mar 9, 2021

Hi, I'm having a consistent crash when I try to activate Debug from RN dev menu on the bundle pushed onto my device since I added this lib, here are the relevant logcat lines:

2021-03-09 17:29:07.708 29183-30012/? I/MMKV: <MMKV.cpp:198::initializeMMKV> root dir: /data/user/0/com.comwatt.myenergy/files/mmkv
2021-03-09 17:29:07.779 601-601/? E/cutils: Nothing there yet; let's create it: /storage/emulated/0/Android/data/com.comwatt.myenergy
2021-03-09 17:29:07.782 601-601/? E/cutils: Nothing there yet; let's create it: /storage/emulated/0/Android/data/com.comwatt.myenergy/cache
2021-03-09 17:29:08.920 30080-30080/? A/DEBUG: pid: 29183, tid: 30012, name: mqt_native_modu  >>> com.comwatt.myenergy <<<
2021-03-09 17:29:09.087 30080-30080/? A/DEBUG:       #00 pc 000000000002a080  /data/app/com.comwatt.myenergy-nYqAi17PbI44xu3gsfzsrw==/lib/arm64/libcpp.so (install(facebook::jsi::Runtime&)+56) (BuildId: 3e9507bd91d1bec3d4abb0e9d5608cdffb2a15aa)
2021-03-09 17:29:09.087 30080-30080/? A/DEBUG:       #01 pc 000000000002b070  /data/app/com.comwatt.myenergy-nYqAi17PbI44xu3gsfzsrw==/lib/arm64/libcpp.so (Java_com_reactnativemmkv_MmkvModule_nativeInstall+76) (BuildId: 3e9507bd91d1bec3d4abb0e9d5608cdffb2a15aa)
2021-03-09 17:29:09.087 30080-30080/? A/DEBUG:       #09 pc 0000000000000482  [anon:dalvik-classes32.dex extracted in memory from /data/app/com.comwatt.myenergy-nYqAi17PbI44xu3gsfzsrw==/base.apk!classes32.dex] (com.reactnativemmkv.MmkvModule.initialize+90)
2021-03-09 17:29:09.087 30080-30080/? A/DEBUG:       #12 pc 00000000002ddaae  [anon:dalvik-classes.dex extracted in memory from /data/app/com.comwatt.myenergy-nYqAi17PbI44xu3gsfzsrw==/base.apk] (com.facebook.react.bridge.ModuleHolder.doInitialize+90)
2021-03-09 17:29:09.087 30080-30080/? A/DEBUG:       #15 pc 00000000002ddb98  [anon:dalvik-classes.dex extracted in memory from /data/app/com.comwatt.myenergy-nYqAi17PbI44xu3gsfzsrw==/base.apk] (com.facebook.react.bridge.ModuleHolder.markInitializable+52)
2021-03-09 17:29:09.087 30080-30080/? A/DEBUG:       #18 pc 00000000002de19a  [anon:dalvik-classes.dex extracted in memory from /data/app/com.comwatt.myenergy-nYqAi17PbI44xu3gsfzsrw==/base.apk] (com.facebook.react.bridge.NativeModuleRegistry.notifyJSInstanceInitialized+82)
2021-03-09 17:29:09.087 30080-30080/? A/DEBUG:       #21 pc 00000000002d860c  [anon:dalvik-classes.dex extracted in memory from /data/app/com.comwatt.myenergy-nYqAi17PbI44xu3gsfzsrw==/base.apk] (com.facebook.react.bridge.CatalystInstanceImpl$4.run+12)
2021-03-09 17:29:09.087 30080-30080/? A/DEBUG:       #35 pc 00000000002e1a66  [anon:dalvik-classes.dex extracted in memory from /data/app/com.comwatt.myenergy-nYqAi17PbI44xu3gsfzsrw==/base.apk] (com.facebook.react.bridge.queue.MessageQueueThreadImpl$4.run+74)
2021-03-09 17:29:09.398 1471-30137/? W/ActivityTaskManager:   Force finishing activity com.comwatt.myenergy/.MainActivity
2021-03-09 17:29:09.399 1471-30138/? D/FrameworkEventCollector: recordAppIssue PN: com.comwatt.myenergy
2021-03-09 17:29:09.531 1471-2524/? W/InputDispatcher: channel '613a63b com.comwatt.myenergy/com.comwatt.myenergy.MainActivity (server)' ~ Consumer closed input channel or an error occurred.  events=0x9
2021-03-09 17:29:09.531 1471-2524/? E/InputDispatcher: channel '613a63b com.comwatt.myenergy/com.comwatt.myenergy.MainActivity (server)' ~ Channel is unrecoverably broken and will be disposed!
2021-03-09 17:29:09.534 1471-2521/? I/WindowManager: WIN DEATH: Window{613a63b u0 com.comwatt.myenergy/com.comwatt.myenergy.MainActivity}
2021-03-09 17:29:09.534 1471-2521/? W/InputDispatcher: Attempted to unregister already unregistered input channel '613a63b com.comwatt.myenergy/com.comwatt.myenergy.MainActivity (server)'
2021-03-09 17:29:09.534 1471-5677/? I/ActivityManager: Process com.comwatt.myenergy (pid 29183) has died: vis+99 TOP 
2021-03-09 17:29:09.553 1471-5677/? W/ActivityManager: Exception when unbinding service com.comwatt.myenergy/org.chromium.content.app.SandboxedProcessService1:0
    android.os.DeadObjectException
        at android.os.BinderProxy.transactNative(Native Method)
        at android.os.BinderProxy.transact(BinderProxy.java:557)
        at android.app.IApplicationThread$Stub$Proxy.scheduleUnbindService(IApplicationThread.java:1672)
        at com.android.server.am.ActiveServices.removeConnectionLocked(ActiveServices.java:3641)
        at com.android.server.am.ActiveServices.killServicesLocked(ActiveServices.java:4065)
        at com.android.server.am.ActivityManagerService.cleanUpApplicationRecordLocked(ActivityManagerService.java:14885)
        at com.android.server.am.ActivityManagerService.handleAppDiedLocked(ActivityManagerService.java:4028)
        at com.android.server.am.ActivityManagerService.appDiedLocked(ActivityManagerService.java:4223)
        at com.android.server.am.ActivityManagerService$AppDeathRecipient.binderDied(ActivityManagerService.java:1634)
        at android.os.BinderProxy.sendDeathNotice(BinderProxy.java:667)

Any idea where this might come from ? Weird emulated storage path ?

I can also confirm that removing the reference to MMKV fixes Debug mode.

@mrousavy
Copy link
Owner

Debugging an application that uses JSI (that's what this lib uses) with Chrome does not work, same as with reanimated. Flipper debugging should work.

@matgardon
Copy link
Author

Didn't know this limitation, thanks for the clarification. You can close the issue then, but maybe document this on the README for others to be aware of ? My errors on RN/metro lead me to false tracks & I lost a few hours on this, if I can avoid the trouble for others then I'm happy :-)

@matgardon
Copy link
Author

FYI this is actually exactly what reanimated did when listing limitations in their docs.

@mrousavy
Copy link
Owner

I added a "Limtations" section to the README, thanks :)

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

2 participants