MetaMask / MetaMask/metamask-mobile
Android crash on first run after install
@tommasini is already working on this.
Since Dec 19, 2022.
- Dominant language
- TypeScript
- Stars
- 3k
- Forks
- 1.7k
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 669
Description
### **Description**
We started to see spike in the crash after install/upgrade on the first time the application is run after the install/upgrade. This occurs approximately 25% of the time when running on Samsung devices with OS 12 or greater. The spike in crashes seem to occur with the updates in 5.9.1.
This crash currently makes up 40% of our crashes on Android and is blocking QA automation.
Stacktrace Below:
```
*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
pid: 0, tid: 17719 >>> io.metamask <<<
backtrace:
#00 pc 0x0000000000857fb4 /data/app/~~6301V8kqN7pkl_97N7XSsg==/io.metamask-h_NLgpJZNuodU6eUJUl1Zw==/split_config.arm64_v8a.apk!libjsc.so
#01 pc 0x0000000000000668 [vdso] (__kernel_rt_sigreturn)
#02 pc 0x00000000000a3068 /apex/com.android.runtime/lib64/bionic/libc.so (__epoll_pwait+8)
#03 pc 0x0000000000017ea8 /system/lib64/libutils.so (android::Looper::pollInner(int)+184)
#04 pc 0x0000000000017d84 /system/lib64/libutils.so (android::Looper::pollOnce(int, int*, int*, void**)+116)
#05 pc 0x000000000015914c /system/lib64/libandroid_runtime.so (android::android_os_MessageQueue_nativePollOnce(_JNIEnv*, _jobject*, long, int)+48)
#06 pc 0x000000000023d44c /system/framework/arm64/boot-framework.oat (art_jni_trampoline+108)
#07 pc 0x0000000000792828 /system/framework/arm64/boot-framework.oat (android.os.MessageQueue.next+232)
#08 pc 0x000000000078fa24 /system/framework/arm64/boot-framework.oat (android.os.Looper.loopOnce+100)
#09 pc 0x000000000078f924 /system/framework/arm64/boot-framework.oat (android.os.Looper.loop+516)
#10 pc 0x000000000050d650 /system/framework/arm64/boot-framework.oat (android.app.ActivityThread.main+800)
#11 pc 0x0000000000218be8 /apex/com.android.art/lib64/libart.so (art_quick_invoke_static_stub+568)
#12 pc 0x000000000028600c /apex/com.android.art/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+220)
#13 pc 0x000000000062d0ec /apex/com.android.art/lib64/libart.so (_jobject* art::InvokeMethod<(art::PointerSize)8>(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, _jobject*, _jobject*, unsigned long)+1388)
#14 pc 0x000000000059b46c /apex/com.android.art/lib64/libart.so (art::Method_invoke(_JNIEnv*, _jobject*, _jobject*, _jobjectArray*)+56)
#15 pc 0x00000000000b2f74 /apex/com.android.art/javalib/arm64/boot.oat (art_jni_trampoline+132)
#16 pc 0x0000000000ae1e6c /system/framework/arm64/boot-framework.oat (com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run+140)
#17 pc 0x0000000000aeb298 /system/framework/arm64/boot-framework.oat (com.android.internal.os.ZygoteInit.main+2376)
#18 pc 0x0000000000218be8 /apex/com.android.art/lib64/libart.so (art_quick_invoke_static_stub+568)
#19 pc 0x000000000028600c /apex/com.android.art/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+220)
#20 pc 0x000000000062d874 /apex/com.android.art/lib64/libart.so (art::JValue art::InvokeWithVarArgs(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, art::ArtMethod*, std::__va_list)+452)
#21 pc 0x000000000062dd68 /apex/com.android.art/lib64/libart.so (art::JValue art::InvokeWithVarArgs<_jmethodID*>(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, _jmethodID*, std::__va_list)+96)
#22 pc 0x0000000000503df8 /apex/com.android.art/lib64/libart.so (art::JNI::CallStaticVoidMethodV(_JNIEnv*, _jclass*, _jmethodID*, std::__va_list)+620)
#23 pc 0x00000000000b3bf8 /system/lib64/libandroid_runtime.so (_JNIEnv::CallStaticVoidMethod(_jclass*, _jmethodID*, ...)+124)
#24 pc 0x00000000000c01e4 /system/lib64/libandroid_runtime.so (android::AndroidRuntime::start(char const*, android::Vector const&, bool)+852)
#25 pc 0x00000000000025a8 /system/bin/app_process64 (main+1360)
#26 pc 0x000000000004a068 /apex/com.android.runtime/lib64/bionic/libc.so (__libc_init+100)
```
### **Technical Requirements**
- Things to try
- Disable Proguard and build in production to see if it is specific to Proguard
- Review dependencies between 5.9.0 & 5.9.1 and disable and build dependencies to narrow down root cause
### **Acceptance Criteria **
- Crashes are reduced from 25% on Samsung devices
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.