I write an android App Widget and it works fine. After some time I had to change its package name But it works well yet. I already had getPackageName, and it prints the correct package name in the log, and still sometimes after I upgrade the app (or just run it on the device from AndroidStudio) the widget disappears. Later it got back after another upgrade.
this is my logcat :
06-20 14:59:31.208 23516-23516/? E/InstalledAppDetails: Exception when retrieving package:ir.yasin.dordane.rozshomar_widget
android.content.pm.PackageManager$NameNotFoundException: ir.yasin.dordane.rozshomar_widget
at android.app.ApplicationPackageManager.getPackageInfo(ApplicationPackageManager.java:115)
at com.android.settings.applications.InstalledAppDetails.retrieveAppEntry(InstalledAppDetails.java:723)
at com.android.settings.applications.InstalledAppDetails.refreshUi(InstalledAppDetails.java:758)
at com.android.settings.applications.InstalledAppDetails.onActivityResult(InstalledAppDetails.java:595)
at android.app.Activity.dispatchActivityResult(Activity.java:6139)
at android.app.ActivityThread.deliverResults(ActivityThread.java:3564)
at android.app.ActivityThread.handleSendResult(ActivityThread.java:3611)
at android.app.ActivityThread.access$1400(ActivityThread.java:147)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1345)
at android.os.Handler.dispatchMessage(Handler.java:102)
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)
Related
I am creating an android application with firebase sign in. The application is failing to sign in, the AVD has an internet connection, I checked several times. I checked logcat and found this error:
E/AuthUI: A sign-in error occurred.
com.firebase.ui.auth.data.model.UserCancellationException: Unknown error
at com.firebase.ui.auth.data.remote.GoogleSignInHandler.onActivityResult(GoogleSignInHandler.java:102)
at com.firebase.ui.auth.ui.idp.AuthMethodPickerActivity.onActivityResult(AuthMethodPickerActivity.java:320)
at android.app.Activity.dispatchActivityResult(Activity.java:6192)
at android.app.ActivityThread.deliverResults(ActivityThread.java:3570)
at android.app.ActivityThread.handleSendResult(ActivityThread.java:3617)
at android.app.ActivityThread.access$1300(ActivityThread.java:151)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1352)
at android.os.Handler.dispatchMessage(Handler.java:102)
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:903)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)
08-03 23:18:34.698 4038-4038/com.example.kppvt E/AuthUI: A sign-in error occurred.
com.firebase.ui.auth.data.model.UserCancellationException: Unknown error
at com.firebase.ui.auth.data.remote.GoogleSignInHandler.onActivityResult(GoogleSignInHandler.java:102)
at com.firebase.ui.auth.ui.idp.AuthMethodPickerActivity.onActivityResult(AuthMethodPickerActivity.java:320)
at android.app.Activity.dispatchActivityResult(Activity.java:6192)
at android.app.ActivityThread.deliverResults(ActivityThread.java:3570)
at android.app.ActivityThread.handleSendResult(ActivityThread.java:3617)
at android.app.ActivityThread.access$1300(ActivityThread.java:151)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1352)
at android.os.Handler.dispatchMessage(Handler.java:102)
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:903)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)
That particular error where you see com.firebase.ui.auth.data.model.UserCancellationException means that the user opted not to finish the authentication, probably by using the back button to leave auth screen.
You need add SHA1 to Firebase.
recently (past few weeks maybe) most of the android 6 users of my app started to suffer from crashes. UnityPlayerActivity failed to start with exception logged: android.app.Fragment$InstantiationException.
Stack trace:
java.lang.RuntimeException:
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2450)
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2510)
android.app.ActivityThread.-wrap11(ActivityThread.java:0)
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1363)
android.os.Handler.dispatchMessage(Handler.java:102)
android.os.Looper.loop(Looper.java:148)
android.app.ActivityThread.main(ActivityThread.java:5461)
java.lang.reflect.Method.invoke(Native Method:0)
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
Caused by: android.app.Fragment$InstantiationException:
android.app.Fragment.instantiate(Fragment.java:628)
android.app.FragmentState.instantiate(Fragment.java:106)
android.app.FragmentManagerImpl.restoreAllState(FragmentManager.java:1858)
android.app.FragmentController.restoreAllState(FragmentController.java:122)
android.app.Activity.onCreate(Activity.java:918)
com.unity3d.player.UnityPlayerActivity.onCreate(Unknown Source:0)
android.app.Activity.performCreate(Activity.java:6251)
android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1108)
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2403)
Initially my first thought was permissions problem but I can't reproduce this error on any of my android 6 devices even if I deny permission (WRITE_EXTERNAL_STORAGE).
Is there is any workaround for this problem(if this problem is a common for Unity on Android 6)?
Thanks in advance!
PS:
Unity version 5.5.0f3,
Android version from crush reports 6.0
I am integrating ChromeCast in my app which has OOYALA. So the problem I am facing is OOYALA has its own cast SDK and its initialization is done at application level where we pass our cast app id (registered on Google Cast console). As soon as I change OOYALA's sample ID and I try to play a video an exception occurs. Here is the exception:
com.ooyala.android.OoyalaException: cast media load failed with code 2100
at com.ooyala.android.castsdk.CastManager$VideoCastListener.onMediaLoadResult(CastManager.java:87)
at com.google.android.libraries.cast.companionlibrary.cast.VideoCastManager$3.onResult(VideoCastManager.java:1037)
at com.google.android.libraries.cast.companionlibrary.cast.VideoCastManager$3.onResult(VideoCastManager.java:1032)
at com.google.android.gms.internal.zzly$zza.zzb(Unknown Source)
at com.google.android.gms.internal.zzly$zza.handleMessage(Unknown Source)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5343)
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:905)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:700)
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?