eleme / Amigo

A hotfix library for Android platform, and not just this...
Other
1.37k stars 213 forks source link

RuntimeException Unable to create application me.ele.amigo.Amigo: java.lang.RuntimeException: java.lang.SecurityException: uid 10077 cannot explicitly add accounts of type: com.bizzypulse.bizzypulse #204

Closed atulgoswami21 closed 7 years ago

atulgoswami21 commented 7 years ago

I have received this error in my app's Crashlytics dashboard and i am attaching full log.

Fatal Exception: java.lang.RuntimeException: Unable to create application me.ele.amigo.Amigo: java.lang.RuntimeException: java.lang.SecurityException: uid 10077 cannot explicitly add accounts of type: com.bizzypulse.bizzypulse at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4714) at android.app.ActivityThread.-wrap1(ActivityThread.java) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1405) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:148) at android.app.ActivityThread.main(ActivityThread.java:5421) at java.lang.reflect.Method.invoke(Method.java) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616) Caused by java.lang.RuntimeException: java.lang.SecurityException: uid 10077 cannot explicitly add accounts of type: com.bizzypulse.bizzypulse at me.ele.amigo.Amigo.onCreate(Amigo.java:94) at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1013) at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4711) at android.app.ActivityThread.-wrap1(ActivityThread.java) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1405) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:148) at android.app.ActivityThread.main(ActivityThread.java:5421) at java.lang.reflect.Method.invoke(Method.java) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616) Caused by java.lang.SecurityException: uid 10077 cannot explicitly add accounts of type: com.bizzypulse.bizzypulse at android.os.Parcel.readException(Parcel.java:1620) at android.os.Parcel.readException(Parcel.java:1573) at android.accounts.IAccountManager$Stub$Proxy.addAccountExplicitly(IAccountManager.java:890) at android.accounts.AccountManager.addAccountExplicitly(AccountManager.java:712) at com.bizzypulse.bizzypulse.sync.SyncUtils.createSyncAccount(SyncUtils.java:37) at com.bizzypulse.bizzypulse.BizzyApplication.setupSync(BizzyApplication.java:313) at com.bizzypulse.bizzypulse.BizzyApplication.setUpApp(BizzyApplication.java:188) at com.bizzypulse.bizzypulse.BizzyApplication.onCreate(BizzyApplication.java:92) at me.ele.amigo.Amigo.runOriginalApplication(Amigo.java:310) at me.ele.amigo.Amigo.onCreate(Amigo.java:59) at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1013) at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4711) at android.app.ActivityThread.-wrap1(ActivityThread.java) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1405) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:148) at android.app.ActivityThread.main(ActivityThread.java:5421) at java.lang.reflect.Method.invoke(Method.java) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)

JackCho commented 7 years ago

This seems like this issue in StackOverflow.

if not, please check if your new apk can run properly or not

atulgoswami21 commented 7 years ago

Required config already in apk and its working fine. after applying patch if account to be added then as you can see the in stack trace me.ele.amigo.Amigo: java.lang.RuntimeException: java.lang.SecurityException: uid 10077 cannot explicitly add accounts of type: com.bizzypulse.bizzypulse your wrapper application is adding account of my application type so the app is crashing as process can add account of his own type. I think so. Please have a look on it. Thanks in advance.

JackCho commented 7 years ago

oh, maybe I find the crash reason. do your host apk contain The Required config ? if not, this is why it crashes. because the android system recognizes your app as host

atulgoswami21 commented 7 years ago

what is required config. and could you put light on it.

JackCho commented 7 years ago

something like this defined in AndroidManifest. Amigo doesn't support manifest change like this, configuration in manifest may be used with system process & other processes. these processes read configuration from host apk, not your new patch apk. I think this may cause your app crash

atulgoswami21 commented 7 years ago

These configuration already defined in host apk. but try to understand now as the host app change to me.ele.amigo.amigo If I for some reason sync account is removed by user from their setting than if my app is trying to add the sync account then it will fail as the signature are different.

me.ele.amigo.Amigo: java.lang.RuntimeException: java.lang.SecurityException: uid 10077 cannot explicitly add accounts of type: com.bizzypulse.bizzypulse

I am assuring you that these config are already present in host.

JackCho commented 7 years ago

I played this Account demo with Amigo, but sadly I cannot reproduce your issue. If you can replay in a simple demo, & upload to github, that would be the best.

atulgoswami21 commented 7 years ago

The issue comes only once in production and never appeared again. thanks for your time you can close the issue if you wish as i didn't find a way to reproduce.

JackCho commented 7 years ago

ok, if you or someone else find some way to reproduce, then reopen this issue.