SecurityException,cannot explicitly add accounts of type: myPakcageName
Asked Answered
Y

1

4

While updating existing app below fatal exception is reported on Firebase,

Exception java.lang.SecurityException: uid 10123 cannot explicitly add accounts of type: com.ominfowave.android
android.os.Parcel.readException (Parcel.java:1599)
android.os.Parcel.readException (Parcel.java:1552)
android.accounts.IAccountManager$Stub$Proxy.addAccountExplicitly(IAccountManager.java:890)
android.accounts.AccountManager.addAccountExplicitly(AccountManager.java:712)
com.ominfowave.android.sync.SyncAdapter.createSyncAccountIfNeeded(SyncAdapter.java:86)
com.ominfowave.android.sync.SyncAdapter.triggerRefresh (SyncAdapter.java:110)
com.ominfowave.android.MyApplication.onConfigurationChanged (MyApplication.java:159)
android.app.ActivityThread.performConfigurationChanged (ActivityThread.java:4414)
android.app.ActivityThread.handleConfigurationChanged (ActivityThread.java:4487)
android.app.ActivityThread$H.handleMessage (ActivityThread.java:1598)
android.os.Handler.dispatchMessage (Handler.java:111)
android.os.Looper.loop (Looper.java:207)
android.app.ActivityThread.main (ActivityThread.java:5728)
java.lang.reflect.Method.invoke (Method.java)
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:789)
com.android.internal.os.ZygoteInit.main (ZygoteInit.java:679)

Mainfest.xml already have below code

<service android:name="your.AuthService">
<intent-filter>
    <action android:name="android.accounts.AccountAuthenticator" />
</intent-filter>
<meta-data android:name="android.accounts.AccountAuthenticator"
     android:resource="@xml/authenticator" />

Yuki answered 27/5, 2017 at 1:39 Comment(2)
Possible duplicate of Android app crashes on addAccountExplicitly(account, password, null);Kayseri
did you ever find a solution to this problem :)Treachery
B
0

I ran into this error, and I think it was because I cleared my app's cache and storage, and then uninstalled my app. The next time I installed and ran the app I saw the same exception from this post. A phone restart fixed the problem for me.

Blameworthy answered 28/10, 2019 at 12:46 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.