Fatal Exception: java.lang.SecurityException: Unable to start service Intent { act=com.google.firebase.crash.internal.service.FirebaseCrashReceiverService.SAVE cmp=com.sample.android/com.google.firebase.crash.internal.service.FirebaseCrashReceiverService (has extras) }: Unable to launch app com.sample.android/10124 for service Intent { act=com.google.firebase.crash.internal.service.FirebaseCrashReceiverService.SAVE cmp=com.sample.android/com.google.firebase.crash.internal.service.FirebaseCrashReceiverService }: process is bad
at android.app.ContextImpl.startServiceCommon(ContextImpl.java:1720)
at android.app.ContextImpl.startService(ContextImpl.java:1693)
at android.content.ContextWrapper.startService(ContextWrapper.java:516)
at aii.run(:com.google.android.gms.DynamiteModulesC:181)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5254)
at java.lang.reflect.Method.invoke(Method.java)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)
Firebase crash is set up perfectly as we are getting reports of the crashes BUT i'm seeing this on Crashlytics and this ultimately leads to crashing the app.
Does anyone know what this problem is?
Related
I'm using Android policy manager and the following code works on Android 5.0.x mobile devices.
Intent deviceAdminIntent = new Intent(DevicePolicyManager.ACTION_ADD_DEVICE_ADMIN);
deviceAdminIntent.putExtra(DevicePolicyManager.EXTRA_DEVICE_ADMIN, cdmDeviceAdmin);
deviceAdminIntent.putExtra(DevicePolicyManager.EXTRA_ADD_EXPLANATION,
getResources().getString(R.string.device_admin_enable_alert));
startActivityForResult(deviceAdminIntent, ACTIVATION_REQUEST);
However, when I deploying the same on Android TV image with the same OS version, it throws the following exception.What could be the issue? Where can I find the source1 for Android TV images?
E/AgentApplication: UncaughtExceptionHandler got an exception
java.lang.RuntimeException: Unable to start activity ComponentInfo{xxxxx}: android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.app.action.ADD_DEVICE_ADMIN (has extras) }
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2416)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2476)
at android.app.ActivityThread.-wrap11(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5417)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
Caused by: android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.app.action.ADD_DEVICE_ADMIN (has extras) }
at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1798)
at android.app.Instrumentation.execStartActivity(Instrumentation.java:1512)
at android.app.Activity.startActivityForResult(Activity.java:3917)
at android.app.Activity.startActivityForResult(Activity.java:3877)
1. https://github.com/android/platform_frameworks_base/blob/master/core/java/android/app/admin/DevicePolicyManager.java
I use a realm database in my android project.
I've added a new column to my realm db which I generate out of a CSV and did the same in my entity file.
However, I now get a RealmMigrationNeededException if I start my app although I have uninstalled it before. So it seems like if my generated database and the entity file don't match.
I would like to know if it's possible to find out what exactly causes the exception. The stacktrace I get in Android Studio doesn't contain any clues which might help me to resolve the issue
FATAL EXCEPTION: main
Process: de.myCompany.myApp, PID: 5270
java.lang.RuntimeException: Error receiving broadcast Intent { act=android.net.conn.CONNECTIVITY_CHANGE flg=0x4000010 (has extras) } in de.myCompany.myApp.helper.WifiReceiver#2d683f50
at android.app.LoadedApk$ReceiverDispatcher$Args.run(LoadedApk.java:872)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5254)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:898)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:693)
Caused by: io.realm.exceptions.RealmMigrationNeededException: RealmMigration must be provided
at io.realm.BaseRealm.migrateRealm(BaseRealm.java:589)
at io.realm.Realm.migrateRealm(Realm.java:1224)
at io.realm.Realm.migrateRealm(Realm.java:1213)
at io.realm.Realm.createInstance(Realm.java:237)
at io.realm.RealmCache.createRealmOrGetFromCache(RealmCache.java:114)
at io.realm.Realm.getInstance(Realm.java:197)
at de.myCompany.myApp.ImageDownloadController.fillDownloadStack(ImageDownloadController.java:94)
at de.myCompany.myApp.ImageDownloadController.<init>(ImageDownloadController.java:37)
at de.myCompany.myApp.ImageDownloadController.getInstance(ImageDownloadController.java:42)
at de.myCompany.myApp.helper.WifiReceiver.onReceive(WifiReceiver.java:30)
at android.app.LoadedApk$ReceiverDispatcher$Args.run(LoadedApk.java:862)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5254)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:898)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:693)
Is there any proper way to debug a RealmMigrationNeededException except for trial and error?
If a RealmMigrationExceptionNeeded error happens, Realm automatically tries to trigger any configured migration to fix it. If no such RealmMigration exists, you instead get another RealmMigrationNeededException that overrides the underlying cause.
The fix is to just provide a dummy RealmMigration to see the real error.
I can see why it can be a bit confusing, and we should probably consider throwing a better exception message that also include the underlying cause.
I'm seeing a few crashes from a Samsung Galaxy Tab S tablet. All I have is the stacktrace, which doesn't help much:
Fatal Exception: java.lang.SecurityException: get package info: Neither user 1110217 nor current process has android.permission.INTERACT_ACROSS_USERS.
at android.os.Parcel.readException(Parcel.java:1540)
at android.os.Parcel.readException(Parcel.java:1493)
at com.android.internal.view.IInputMethodManager$Stub$Proxy.isCurrentInputMethodAsSamsungKeyboard(IInputMethodManager.java:1289)
at android.view.inputmethod.InputMethodManager.isCurrentInputMethodAsSamsungKeyboard(InputMethodManager.java:2526)
at android.widget.Editor$SuggestionsPopupWindow.updateSuggestions(Editor.java:3004)
at android.widget.Editor$SuggestionsPopupWindow.show(Editor.java:2873)
at android.widget.Editor.showSuggestions(Editor.java:1995)
at android.widget.Editor$1.run(Editor.java:1830)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:145)
at android.app.ActivityThread.main(ActivityThread.java:6117)
at java.lang.reflect.Method.invoke(Method.java)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1399)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1194)
It's obvious that my app doesn't care about INTERACT_ACROSS_USERS. The system ends up requesting that exception after isCurrentInputMethodAsSamsungKeyboard, which I've never seen before.
Any clues?
I am starting different apps like phone app, browser app, maps app from my app something like this
String url = "http://www." + textView.getText().toString();
Log.d(TAG,url);
Intent i = new Intent(Intent.ACTION_VIEW);
i.setData(Uri.parse(url));
mContext.startActivity(i);
At first they worked perfectly but now every app crashes like
"unfortunetly chorme stopped working" or "unfortunetly dialer has stopped working" etc. I hope some one knows why its happening. Thanks in advance.
This is my logcat
05-08 19:12:28.720 10227-10227/? E/AndroidRuntime﹕ FATAL EXCEPTION: main
Process: com.google.android.apps.maps, PID: 10227
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.google.android.apps.maps/com.google.android.maps.MapsActivity}: android.os.BadParcelableException: ClassNotFoundException when unmarshalling: com.example.krishnateja.bigapplesearch.models.MTAMainScreenModel
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2314)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2388)
at android.app.ActivityThread.access$800(ActivityThread.java:148)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1292)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5312)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:901)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:696)
Caused by: android.os.BadParcelableException: ClassNotFoundException when unmarshalling: com.example.krishnateja.bigapplesearch.models.MTAMainScreenModel
at android.os.Parcel.readParcelableCreator(Parcel.java:2289)
at android.os.Parcel.readParcelable(Parcel.java:2239)
at android.os.Parcel.readValue(Parcel.java:2146)
at android.os.Parcel.readListInternal(Parcel.java:2520)
at android.os.Parcel.readArrayList(Parcel.java:1836)
at android.os.Parcel.readValue(Parcel.java:2167)
at android.os.Parcel.readArrayMapInternal(Parcel.java:2479)
at android.os.BaseBundle.unparcel(BaseBundle.java:221)
at android.os.BaseBundle.getIntArray(BaseBundle.java:1164)
at android.content.Intent.getIntArrayExtra(Intent.java:5004)
at com.google.android.apps.gmm.m.l.a(PG:1061)
at com.google.android.apps.gmm.m.w.a(PG:2241)
at com.google.android.apps.gmm.base.activities.a.onNewIntent(PG:953)
at com.google.android.apps.gmm.base.activities.a.onCreate(PG:641)
at android.app.Activity.performCreate(Activity.java:5953)
at
The reason for the class not found is I am overiding start activity for some other intent but I did not have an if condition saying add extra to the particular intent. A silly mistake.
This issue is happening on Android 5.0 Lollipop only. I dont have access to a phone with Lollipop, I have developed the code in Genymotion Android Emulator but this issue does not happen in the emulator. I am only getting failing stacktraces from users' phones.
My Code:
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
Intent intent = new Intent(Settings.ACTION_USAGE_ACCESS_SETTINGS);
startActivity(intent);
}
The App crashes and the stacktrace I am getting from users:
android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.settings.USAGE_ACCESS_SETTINGS }
at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1765)
at android.app.Instrumentation.execStartActivity(Instrumentation.java:1485)
at android.app.Activity.startActivityForResult(Activity.java:3780)
at android.app.Activity.startActivityForResult(Activity.java:3741)
at android.support.v4.app.FragmentActivity.startActivityFromFragment(FragmentActivity.java:849)
at android.support.v4.app.Fragment.startActivity(Fragment.java:880)
at com.myapp.myfirstapp.fragments.addablock.apps.Fragment_appsselect_addblock$2.onClick(Fragment_ appsselect_addblock.java:147)
at android.view.View.performClick(View.java:4763)
at android.view.View$PerformClick.run(View.java:19821)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5274)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)
I am seeing this crash too. It seems that LG has removed the newly introduced Usage Permission Setttings screen from their version of Lollipop.