Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

java.lang.SecurityException: Unable to find app for caller android.app.ApplicationThreadProxy #1417

Closed
lin4455 opened this issue Aug 16, 2016 · 9 comments
Milestone

Comments

@lin4455
Copy link

lin4455 commented Aug 16, 2016

I use glide 3.7.0, have crash log:

java.lang.SecurityException: Unable to find app for caller android.app.ApplicationThreadProxy@4473ee08 (pid=8376) when registering receiver android.content.IIntentReceiver$Stub$Proxy@436cd370
    at android.os.Parcel.readException(Parcel.java:1465)
    at android.os.Parcel.readException(Parcel.java:1419)
    at android.app.ActivityManagerProxy.registerReceiver(ActivityManagerProxy.java:2492)
    at android.app.ContextImpl.registerReceiverInternal(ContextImpl.java:1543)
    at android.app.ContextImpl.registerReceiver(ContextImpl.java:1511)
    at android.app.ContextImpl.registerReceiver(ContextImpl.java:1505)
    at android.content.ContextWrapper.registerReceiver(ContextWrapper.java:467)
    at com.bumptech.glide.manager.DefaultConnectivityMonitor.register(DefaultConnectivityMonitor.java)
    at com.bumptech.glide.manager.DefaultConnectivityMonitor.onStart(DefaultConnectivityMonitor.java)
    at com.bumptech.glide.manager.ActivityFragmentLifecycle.onStart(ActivityFragmentLifecycle.java)
    at com.bumptech.glide.manager.SupportRequestManagerFragment.onStart(SupportRequestManagerFragment.java)
    at android.support.v4.app.Fragment.performStart(Fragment.java)
    at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManagerImpl.java)
    at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManagerImpl.java)
    at android.support.v4.app.BackStackRecord.run(BackStackRecord.java)
    at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManagerImpl.java)
    at android.support.v4.app.FragmentManagerImpl$1.run(FragmentManagerImpl.java)
    at android.os.Handler.handleCallback(Handler.java:733)
    at android.os.Handler.dispatchMessage(Handler.java:95)
    at android.os.Looper.loop(Looper.java:136)
    at android.app.ActivityThread.main(ActivityThread.java:5217)
    at java.lang.reflect.Method.invokeNative(Method.java)
    at java.lang.reflect.Method.invoke(Method.java:515)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:818)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:634)
    at dalvik.system.NativeStart.main(NativeStart.java)

Is glide bug???

@lin4455
Copy link
Author

lin4455 commented Aug 24, 2016

???

@TWiStErRob
Copy link
Collaborator

Huh, sorry, I didn't get a notification email for this one.

It looks like there is another hidden reason that you didn't copy from the logs.
I hope you can reproduce this, and you can get a full log, containing the root cause.

Look at this blog post, the exceptions there are coming from different processes, because this is an IPC call. The app gets a RuntimeException/SecurityException, but the real cause is TransactionTooLargeException. I'm not saying your problem is a TransactionTooLargeException, but it could be found in a similar manner, by looking at the unfiltered LogCat output around the time of the error.

Related: square/picasso#1197 and StackOverflow; neither of which contain any clues as of now.

@lin4455
Copy link
Author

lin4455 commented Aug 24, 2016

It is't like this blog post crash.
And my log is full log when crash.
The question like square/picasso#1197

java.lang.SecurityException: Unable to find app for caller android.app.ApplicationThreadProxy@4473ee08 (pid=8376) when registering receiver android.content.IIntentReceiver$Stub$Proxy@436cd370
    at android.os.Parcel.readException(Parcel.java:1465)
    at android.os.Parcel.readException(Parcel.java:1419)
    at android.app.ActivityManagerProxy.registerReceiver(ActivityManagerProxy.java:2492)
    at android.app.ContextImpl.registerReceiverInternal(ContextImpl.java:1543)
    at android.app.ContextImpl.registerReceiver(ContextImpl.java:1511)
    at android.app.ContextImpl.registerReceiver(ContextImpl.java:1505)
    at android.content.ContextWrapper.registerReceiver(ContextWrapper.java:467)
    at com.bumptech.glide.manager.DefaultConnectivityMonitor.register(DefaultConnectivityMonitor.java)
    at com.bumptech.glide.manager.DefaultConnectivityMonitor.onStart(DefaultConnectivityMonitor.java)
    at com.bumptech.glide.manager.ActivityFragmentLifecycle.onStart(ActivityFragmentLifecycle.java)

see the log, crash pass glide code.
hope can try{}catch{} at least in DefaultConnectivityMonitor.register().

Thanks

@TWiStErRob
Copy link
Collaborator

Yes, I understand we can blindly suppress it, but please copy your LogCat around the crash, say 200 milliseconds before and after.

@lin4455
Copy link
Author

lin4455 commented Aug 24, 2016

Sorry , it is a crach log from pulish version not develop version . it collected from the third party background so many times. I can't appear this crash in my developing.

@TWiStErRob
Copy link
Collaborator

TWiStErRob commented Aug 24, 2016

Ah, that's why you say it's like Picasso's issue. @sjudd what do you think?

@lin4455
Copy link
Author

lin4455 commented Sep 19, 2016

no have some more?

@sjudd
Copy link
Collaborator

sjudd commented Sep 21, 2016

Sure feel free to open a pull request, thanks for pointing this out.

@waltherjoao
Copy link

No se que hacer no se como finalizar eso

java.lang.RuntimeException: Unable to stop activity {########}: java.lang.IllegalArgumentException: Receiver not registered: com.bumptech.glide.manager.DefaultConnectivityMonitor$1@1b3f97e6
at android.app.ActivityThread.performDestroyActivity(ActivityThread.java:3670)
at android.app.ActivityThread.handleDestroyActivity(ActivityThread.java:3724)
at android.app.ActivityThread.access$1400(ActivityThread.java:151)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1357)
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)
Caused by: java.lang.IllegalArgumentException: Receiver not registered: com.bumptech.glide.manager.DefaultConnectivityMonitor$1@1b3f97e6
at android.app.LoadedApk.forgetReceiverDispatcher(LoadedApk.java:765)
at android.app.ContextImpl.unregisterReceiver(ContextImpl.java:1674)
at android.content.ContextWrapper.unregisterReceiver(ContextWrapper.java:511)
at com.bumptech.glide.manager.DefaultConnectivityMonitor.unregister(DefaultConnectivityMonitor.java:48)
at com.bumptech.glide.manager.DefaultConnectivityMonitor.onStop(DefaultConnectivityMonitor.java:66)
at com.bumptech.glide.manager.ActivityFragmentLifecycle.onStop(ActivityFragmentLifecycle.java:57)
at com.bumptech.glide.manager.RequestManagerFragment.onStop(RequestManagerFragment.java:142)
at android.app.Fragment.performStop(Fragment.java:2224)
at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:945)
at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1067)
at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1049)
at android.app.FragmentManagerImpl.dispatchStop(FragmentManager.java:1887)
at android.app.Activity.performStop(Activity.java:6139)
at android.app.ActivityThread.performDestroyActivity(ActivityThread.java:3665)
at android.app.ActivityThread.handleDestroyActivity(ActivityThread.java:3724) 
at android.app.ActivityThread.access$1400(ActivityThread.java:151) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1357) 
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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants