Android app crashing after push notification is received while running in background - android

I'm developing an app with titanium but when I test it on android it crashes occasionally when receiving push notifications in background. On the iOS version this is not causing any problem.
I'm using an Android with 4.4.2 version installed and Titanium SDK 3.4.0
Here's the crash report:
java.lang.RuntimeException: Unable to start activity ComponentInfo{de.hitabis.elsa.mobile/org.appcelerator.titanium.TiActivity}: android.support.v4.app.Fragment$InstantiationException: Unable to instantiate fragment ti.modules.titanium.ui.widget.tabgroup.TiUIActionBarTab$TabFragment: make sure class name exists, is public, and has an empty constructor that is public
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2596)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2653)
at android.app.ActivityThread.access$800(ActivityThread.java:156)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1355)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:157)
at android.app.ActivityThread.main(ActivityThread.java:5872)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:858)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:674)
at dalvik.system.NativeStart.main(Native Method)
Caused by: android.support.v4.app.Fragment$InstantiationException: Unable to instantiate fragment ti.modules.titanium.ui.widget.tabgroup.TiUIActionBarTab$TabFragment: make sure class name exists, is public, and has an empty constructor that is public
at android.support.v4.app.Fragment.instantiate(Fragment.java:413)
at android.support.v4.app.FragmentState.instantiate(Fragment.java:97)
at android.support.v4.app.FragmentManagerImpl.restoreAllState(FragmentManager.java:1801)
at android.support.v4.app.FragmentActivity.onCreate(FragmentActivity.java:213)
at android.support.v7.app.ActionBarActivity.onCreate(ActionBarActivity.java:97)
at org.appcelerator.titanium.TiBaseActivity.onCreate(TiBaseActivity.java:473)
at org.appcelerator.titanium.TiActivity.onCreate(TiActivity.java:18)
at android.app.Activity.performCreate(Activity.java:5312)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1111)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2552)
... 11 more
Caused by: java.lang.InstantiationException: can't instantiate class ti.modules.titanium.ui.widget.tabgroup.TiUIActionBarTab$TabFragment; no empty constructor
at java.lang.Class.newInstanceImpl(Native Method)
at java.lang.Class.newInstance(Class.java:1208)
at android.support.v4.app.Fragment.instantiate(Fragment.java:402)
... 20 more

Related

Plivo API endpoint Exception In Initializer error

03-24 10:51:22.425 20219-20219/com.mordred.call E/AndroidRuntime: FATAL EXCEPTION: main
java.lang.ExceptionInInitializerError
at com.plivo.endpoint.backend.PlivoAppCallback.<init>(PlivoAppCallback.java:114)
at com.plivo.endpoint.BackendListener.<init>(BackendListener.java:28)
at com.plivo.endpoint.Endpoint.initLib(Endpoint.java:150)
at com.plivo.endpoint.Endpoint.<init>(Endpoint.java:47)
at com.plivo.endpoint.Endpoint.newInstance(Endpoint.java:63)
at com.mordred.call.PstnActivity.<init>(PstnActivity.java:46)
at java.lang.Class.newInstanceImpl(Native Method)
at java.lang.Class.newInstance(Class.java:1319)
at android.app.Instrumentation.newActivity(Instrumentation.java:1068)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2025)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2135)
at android.app.ActivityThread.access$700(ActivityThread.java:140)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1237)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4921)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1036)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:803)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.UnsatisfiedLinkError: Native method not found: com.plivo.endpoint.backend.plivoJNI.swig_module_init:()V
at com.plivo.endpoint.backend.plivoJNI.swig_module_init(Native Method)
at com.plivo.endpoint.backend.plivoJNI.<clinit>(plivoJNI.java:108)
at com.plivo.endpoint.backend.PlivoAppCallback.<init>(PlivoAppCallback.java:114) 
at com.plivo.endpoint.BackendListener.<init>(BackendListener.java:28) 
at com.plivo.endpoint.Endpoint.initLib(Endpoint.java:150) 
at com.plivo.endpoint.Endpoint.<init>(Endpoint.java:47) 
at com.plivo.endpoint.Endpoint.newInstance(Endpoint.java:63) 
at com.mordred.call.PstnActivity.<init>(PstnActivity.java:46) 
at java.lang.Class.newInstanceImpl(Native Method) 
at java.lang.Class.newInstance(Class.java:1319) 
at android.app.Instrumentation.newActivity(Instrumentation.java:1068) 
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2025) 
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2135) 
at android.app.ActivityThread.access$700(ActivityThread.java:140) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1237) 
at android.os.Handler.dispatchMessage(Handler.java:99) 
at android.os.Looper.loop(Looper.java:137) 
at android.app.ActivityThread.main(ActivityThread.java:4921) 
at java.lang.reflect.Method.invokeNative(Native Method) 
at java.lang.reflect.Method.invoke(Method.java:511)
I am using the plivo api, but when i open an activity, i get that error above, i know its coming from my endpoint instantiation, i.e i cannot do this
Endpoint endpoint = Endpoint.newInstance(true, this);
but i do not know what to do instead and i do not know what is causing the error
Plivo Sales Engineer here.
What's the processor architecture of the android phone that you're testing on? This error occurs when the libpjplivo.so file is incompatible with the processor architecture.
Please raise a ticket our support portal and we can help you debug this.

Using GoogleApiAvailability class's isGooglePlayServicesAvailable() method causes the App crash

Using the following code on my App is causing the App to crash if the device Google Play services version is not updated.
GoogleApiAvailability googleAPI = GoogleApiAvailability.getInstance();
status = googleAPI.isGooglePlayServicesAvailable(mActivity);
It is crashing on a device with Android OS version 4.2.2 and Google Play Services version 3.1.58( which I have purposefully downgraded , to handle the Google Play Services availaibility check).
Crash Logs is given below,
FATAL EXCEPTION: main
java.lang.RuntimeException: Unable to start activity
ComponentInfo{com.companyname/o.Dt}:
java.lang.NullPointerException
at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2249)
at
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2299)
at android.app.ActivityThread.access$700(ActivityThread.java:154)
at
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1284)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:5306)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1102)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:869)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.NullPointerException
at o.Lf.(:191)
at o.Lf.ˊ(:237)
at o.Dt.onCreate(:487)
at android.app.Activity.performCreate(Activity.java:5255)
at
android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1097)
at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2213)
at
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2299) 
at android.app.ActivityThread.access$700(ActivityThread.java:154) 
at
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1284) 
at android.os.Handler.dispatchMessage(Handler.java:99) 
at android.os.Looper.loop(Looper.java:137) 
at android.app.ActivityThread.main(ActivityThread.java:5306) 
at java.lang.reflect.Method.invokeNative(Native Method) 
at java.lang.reflect.Method.invoke(Method.java:511) 
at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1102) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:869) 
at dalvik.system.NativeStart.main(Native Method)
The NullPointer is pointing at some framework class even whose name is obfuscated. SO, any help would be appreciated.
Maybe the error is not in your code. Going by the package name, the error appears to be coming from a publicly available app

Crash issue in OnResume

If application stay in background mode more then 5 min. after that i try to open Application at that time got crash issue my Error log is here help me thanks in Advance....
java.lang.RuntimeException: Unable to start activity` ComponentInfo{com.gamestruct.TweetBoostAndroid/com.gamestruct.TweetBoostAndroid.TabbedActivity}: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.gamestruct.TweetBoostAndroid/com.gamestruct.TweetBoostAndroid.EarnCoinActivity}: java.lang.NullPointerException
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2205)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2255)
at android.app.ActivityThread.access$800(ActivityThread.java:142)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1203)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5118)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:792)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:608)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.gamestruct.TweetBoostAndroid/com.gamestruct.TweetBoostAndroid.EarnCoinActivity}: java.lang.NullPointerException
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2205)
at android.app.ActivityThread.startActivityNow(ActivityThread.java:2043)
at android.app.LocalActivityManager.moveToState(LocalActivityManager.java:135)
at android.app.LocalActivityManager.startActivity(LocalActivityManager.java:347)
at android.widget.TabHost$IntentContentStrategy.getContentView(TabHost.java:749)
at android.widget.TabHost.setCurrentTab(TabHost.java:413)
at android.widget.TabHost.addTab(TabHost.java:240)
at com.gamestruct.TweetBoostAndroid.TabbedActivity.addTab(TabbedActivity.java:199)
at com.gamestruct.TweetBoostAndroid.TabbedActivity.setTabs(TabbedActivity.java:180)
at com.gamestruct.TweetBoostAndroid.TabbedActivity.onCreate(TabbedActivity.java:140)
at android.app.Activity.performCreate(Activity.java:5275)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2169)
... 11 more
Caused by: java.lang.NullPointerException
at com.gamestruct.TweetBoostAndroid.EarnCoinActivity.onCreate(EarnCoinActivity.java:110)
at android.app.Activity.performCreate(Activity.java:5275)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2169)
... 23 more
While your application stayed in the background it got killed by the system. Somewhere in com.gamestruct.TweetBoostAndroid.EarnCoinActivity.onCreate (presumably on line 110) you are using something that became null as your app was killed.

Android ClassNotFoundException for Support v7 TestActivity

I have an app that I just received a crash report for. I don't have the full stack trace with me right now, but it was from ActivityLoader.performLaunchActivity.
The class it is trying to launch is android.support.v7.widget.TestActivity. I certainly never try to load this activity anywhere in my app.
The device is a Samsung Galaxy Nexus running 4.1.1 rooted. The stacktrace looked normal to me (no xposed or anything like that).
Anyone ever see anything like this?
EDIT: Here's the stacktrace
java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.cpsolutions.contacts/android.support.v7.widget.TestActivity}: java.lang.ClassNotFoundException: android.support.v7.widget.TestActivity
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1998)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2099)
at android.app.ActivityThread.access$600(ActivityThread.java:145)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1210)
at android.os.Handler.dispatchMessage(Handler.java:119)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4873)
at java.lang.reflect.Method.invokeNative(Method.java)
at java.lang.reflect.Method.invoke(Method.java:528)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
at dalvik.system.NativeStart.main(NativeStart.java)
Caused by: java.lang.ClassNotFoundException: android.support.v7.widget.TestActivity
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:72)
at java.lang.ClassLoader.loadClass(ClassLoader.java:524)
at java.lang.ClassLoader._logged_loadClass(ClassLoader.java:484)
at java.lang.ClassLoader.loadClass(ClassLoader.java:476)
at android.app.Instrumentation.newActivity(Instrumentation.java:1061)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1989)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2099)
at android.app.ActivityThread.access$600(ActivityThread.java:145)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1210)
at android.os.Handler.dispatchMessage(Handler.java:119)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4873)
at java.lang.reflect.Method.invokeNative(Method.java)
at java.lang.reflect.Method.invoke(Method.java:528)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
at dalvik.system.NativeStart.main(NativeStart.java)
After posting this in the Android issue tracker, I've gotten a response saying that it was an issue with Gradle that has been resolved, and will be reflected in the support libraries when they're updated.
This morning I have received from my BugTracker system the same exception in few seconds for several devices
Google Nexus 5 with Android 4.4.2
Galaxy Nexus with Android 4.1.1
Looks like someone have extracted the APK and installed in some simulator (I suspect this also because the reported screen size is 480x800 that is not a screen size of nexus 5.
So I think that this is not a real exception (or at least an exception thrown by our application) but some test made by someone.
The exception received is
java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{it.frusso.mdpalette/android.support.v7.widget.TestActivity}: java.lang.ClassNotFoundException: Didn't find class "android.support.v7.widget.TestActivity" on path: DexPathList[[zip file "/data/app/it.frusso.mdpalette-1.apk"],nativeLibraryDirectories=[/data/app-lib/it.frusso.mdpalette-1, /vendor/lib, /system/lib]]
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2135)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2259)
at android.app.ActivityThread.access$800(ActivityThread.java:149)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1210)
at android.os.Handler.dispatchMessage(Handler.java:122)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5122)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.ClassNotFoundException: Didn't find class "android.support.v7.widget.TestActivity" on path: DexPathList[[zip file "/data/app/it.frusso.mdpalette-1.apk"],nativeLibraryDirectories=[/data/app-lib/it.frusso.mdpalette-1, /vendor/lib, /system/lib]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:67)
at java.lang.ClassLoader.loadClass(ClassLoader.java:520)
at java.lang.ClassLoader._logged_loadClass(ClassLoader.java:480)
at java.lang.ClassLoader.loadClass(ClassLoader.java:472)
at android.app.Instrumentation.newActivity(Instrumentation.java:1066)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2126)
... 11 more
java.lang.ClassNotFoundException: Didn't find class "android.support.v7.widget.TestActivity" on path: DexPathList[[zip file "/data/app/it.frusso.mdpalette-1.apk"],nativeLibraryDirectories=[/data/app-lib/it.frusso.mdpalette-1, /vendor/lib, /system/lib]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:67)
at java.lang.ClassLoader.loadClass(ClassLoader.java:520)
at java.lang.ClassLoader._logged_loadClass(ClassLoader.java:480)
at java.lang.ClassLoader.loadClass(ClassLoader.java:472)
at android.app.Instrumentation.newActivity(Instrumentation.java:1066)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2126)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2259)
at android.app.ActivityThread.access$800(ActivityThread.java:149)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1210)
at android.os.Handler.dispatchMessage(Handler.java:122)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5122)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
at dalvik.system.NativeStart.main(Native Method)
I have also received a android.view.WindowManager.BadTokenException

ClassNotFoundException inside Google-Analytics from inside Google-Play-Services

I got a strange crash in my app and the new Analytics from inside Google-Play-Services - this bug seems to be really rare, but I really would like to know what is going on there.
java.lang.RuntimeException: Unable to instantiate receiver com.google.analytics.tracking.android.AnalyticsReceiver: java.lang.ClassNotFoundException: Didn't find class "com.google.analytics.tracking.android.AnalyticsReceiver" on path: /mnt/asec/org.ligi.passandroid-1/pkg.apk
at android.app.ActivityThread.handleReceiver(ActivityThread.java:2375)
at android.app.ActivityThread.access$1500(ActivityThread.java:145)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1322)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:5095)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:898)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:665)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.analytics.tracking.android.AnalyticsReceiver" on path: /mnt/asec/org.ligi.passandroid-1/pkg.apk
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:65)
at java.lang.ClassLoader.loadClass(ClassLoader.java:501)
at java.lang.ClassLoader.loadClass(ClassLoader.java:461)
at android.app.ActivityThread.handleReceiver(ActivityThread.java:2370)
... 10 more

Categories

Resources