AppAuth-Android icon indicating copy to clipboard operation
AppAuth-Android copied to clipboard

"don't keep activities" breaks the demo app

Open cpetosky opened this issue 8 years ago • 4 comments

AppAuth version 0.6.0

Hello,

I'm trying to test your app with "don't keep activities" turned on in Developer settings.

In the demo application provided in this repository, the demo app crashes after backing out or succeeding with login from the Chrome tab:

Process: net.openid.appauthdemo, PID: 32011
 java.util.concurrent.RejectedExecutionException: Task net.openid.appauthdemo.LoginActivity$$Lambda$15@6da6de9 rejected from java.util.concurrent.ThreadPoolExecutor@3b3fa6e[Terminated, pool size = 0, active threads = 0, queued tasks = 0, completed tasks = 2]
     at java.util.concurrent.ThreadPoolExecutor$AbortPolicy.rejectedExecution(ThreadPoolExecutor.java:2014)
     at java.util.concurrent.ThreadPoolExecutor.reject(ThreadPoolExecutor.java:794)
     at java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:1340)
     at java.util.concurrent.Executors$DelegatedExecutorService.execute(Executors.java:584)
     at net.openid.appauthdemo.LoginActivity.warmUpBrowser(LoginActivity.java:427)
     at net.openid.appauthdemo.LoginActivity.access$500(LoginActivity.java:81)
     at net.openid.appauthdemo.LoginActivity$RecreateAuthRequestTask.run(LoginActivity.java:512)
     at android.os.Handler.handleCallback(Handler.java:739)
     at android.os.Handler.dispatchMessage(Handler.java:95)
     at android.os.Looper.loop(Looper.java:148)
     at android.app.ActivityThread.main(ActivityThread.java:5422)
     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)

Is this use case supported, by the demo optimally, but with the library in general?

Thanks!

cpetosky avatar Jun 14 '17 21:06 cpetosky

This is likely a bug in the demo app; to my knowledge, the library should survive activity termination with "don't keep activities".

iainmcgin avatar Jun 14 '17 21:06 iainmcgin

Thanks for the response.

After some extra testing, I am seeing the library surviving activity termination with "don't keep activities", except in one case -- if the platform pops up an intent disambiguation dialog because more than one app has registered to handle your redirect scheme.

This shouldn't affect us in production so I'm not digging any further on it, but figured I'd report back since I had your ear.

cpetosky avatar Jun 15 '17 00:06 cpetosky

Thanks for testing it out! When I get a chance after the Cloud Identity Summit, I'll try and fix the bug in the demo app.

iainmcgin avatar Jun 15 '17 00:06 iainmcgin

I am on version 0.7.1 and I believe this issue is still there.

shishirshettygit avatar Jun 10 '19 20:06 shishirshettygit