[TIMOB-25930] Android: Crashing with runtime exception
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | None |
Status | Open |
Resolution | Unresolved |
Affected Version/s | Release 7.1.0 |
Fix Version/s | n/a |
Components | Android |
Labels | n/a |
Reporter | Rene Pot |
Assignee | Gary Mathews |
Created | 2018-04-04T15:58:45.000+0000 |
Updated | 2018-04-12T06:35:54.000+0000 |
Description
Android app keeps crashing for many users using the app created by [~zettageek] as contractor.
java.lang.RuntimeException:
at android.app.ActivityThread.handleReceiver (ActivityThread.java:3290)
at android.app.ActivityThread.-wrap20 (ActivityThread.java)
at android.app.ActivityThread$H.handleMessage (ActivityThread.java:1715)
at android.os.Handler.dispatchMessage (Handler.java:102)
at android.os.Looper.loop (Looper.java:154)
at android.app.ActivityThread.main (ActivityThread.java:6682)
at java.lang.reflect.Method.invoke (Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:1520)
at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1410)
Caused by: java.lang.ClassNotFoundException:
at dalvik.system.BaseDexClassLoader.findClass (BaseDexClassLoader.java:56)
at java.lang.ClassLoader.loadClass (ClassLoader.java:380)
at java.lang.ClassLoader.loadClass (ClassLoader.java:312)
at android.app.ActivityThread.handleReceiver (ActivityThread.java:3285)
SDK Version: 7.1.0.GA
Android Target SDK Version: 26
Hyperloop Enabled: YES (we use the Localytics-Hyperloop library on Github)
Facebook SDK In User: YES
Push Notifications: YES (Via Plot Projects)
Attached to Axway Platform: YES
Alloy Framework In Use: YES
Android Permissions In Use:
<uses-permission android:name="android.permission.CAMERA"/>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.WAKE_LOCK"/>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.GET_ACCOUNTS"/>
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE"/>
<uses-permission android:name="com.my.app.permission.C2D_MESSAGE"/>
<permission android:name="com.my.app.permission.C2D_MESSAGE" android:protectionLevel="signature"/>
<uses-feature android:name="android.hardware.camera"/>
<uses-feature android:name="android.hardware.camera.autofocus"/>
*Further information:*
We also use GCM receivers.
AppCompat as base Android theme.
run-on-main-thread is TRUE.
as is intent-filter-new-task = TRUE
Attachments
File | Date | Size |
---|---|---|
AndroidManifest.xml | 2018-04-04T21:22:19.000+0000 | 7430 |
main-dex-classes.txt | 2018-04-04T21:22:19.000+0000 | 41219 |
It looks like the system is failing to find a
BroadcastReceiver
Java class for a broadcasted intent. Questions:Are there any other broadcast receivers other than GCM (push notifications) set up in the app? (Ex: activity intent-filters, facebook deep-linking, etc.)
Is the app multidex'ed? (After doing a build, check the
build/android/bin/dexfiles
folder for multiple dex files.)Do you have info regarding which Android OS versions this tends to happen on? We're looking for trends such as Android 4.x only or Android 8.x only.
Thanks.[~zettageek] I received a crash after turning on my phone, Android 7.1.1:
Your
localytics
broadcast receiver does not exist. After taking a look at thelocalytics
module I found the correct class to use:Note that you can reproduce this issue by rebooting your phone. This is because the BroadcastReceiver mentioned by Gary is set up to be invoked when the phone has been booted-up.
Hey guys! We're unable to reproduce this on our end still, even after a reboot. Is there anything special we should do besides rebooting the device?
[~zettageek], that would suggest some other BroadcastReceiver is configured wrong in the "AndroidManifest.xml" file. One that's not set up to listen for a "android.intent.action.BOOT_COMPLETED" intent. Is the "AndroidManifest.xml" file attached to this ticket yours? Each
<receiver>
XML element's name attribute references a Java class that the OS will attempt to instantiate via Java reflection. It's the fully qualified Java class name, which includes the package name (aka: namespace). I suspect one of the receiver names are wrong, has a typo, or has been renamed within a module. Meaning, to double check, a matching Java class needs to be found for each receiver name. Odds are there is a mismatch with one of the modules you're using.