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

No browser found exception #96

Closed
evasyuk opened this issue Jul 20, 2016 · 2 comments
Closed

No browser found exception #96

evasyuk opened this issue Jul 20, 2016 · 2 comments
Labels

Comments

@evasyuk
Copy link

evasyuk commented Jul 20, 2016

If there is no browser at all user would get unexpected ActivityNotFoundException:

android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.VIEW dat=https://accounts.google.com/o/oauth2/v2/auth?redirect_uri=com.googleusercontent.apps.nope:/oauth2redirect&client_id=529788761403-aj9ff2svir6lsqjnck6jnjmqhfop77mk.apps.googleusercontent.com&response_type=code&state=Od4cn-XBtdi3Qdjnl5t7wg&scope=openid profile email&code_challenge=WJOmc7Hs3GcF0FpQ7dUJ3ISZxwETpkSmBods2dgMLr4&code_challenge_method=S256 flg=0x40000000 pkg=com.android.chrome (has extras) }
at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1551)
at android.app.Instrumentation.execStartActivity(Instrumentation.java:1422)
at android.app.Activity.startActivityForResult(Activity.java:3375)
at android.app.Activity.startActivityForResult(Activity.java:3331)
at android.support.v4.app.FragmentActivity.startActivityForResult(FragmentActivity.java:843)
at android.app.Activity.startActivity(Activity.java:3546)
at android.app.Activity.startActivity(Activity.java:3514)
at net.openid.appauth.AuthorizationService.performAuthorizationRequest(AuthorizationService.java:173)
at net.openid.appauthdemo.MainActivity.makeAuthRequest(MainActivity.java:143)
at net.openid.appauthdemo.MainActivity.access$100(MainActivity.java:54)
at net.openid.appauthdemo.MainActivity$1.onFetchConfigurationCompleted(MainActivity.java:89)
at net.openid.appauth.AuthorizationServiceConfiguration$ConfigurationRetrievalAsyncTask.onPostExecute(AuthorizationServiceConfiguration.java:325)
at net.openid.appauth.AuthorizationServiceConfiguration$ConfigurationRetrievalAsyncTask.onPostExecute(AuthorizationServiceConfiguration.java:266)
at android.os.AsyncTask.finish(AsyncTask.java:631)
at android.os.AsyncTask.access$600(AsyncTask.java:177)
at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:644)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:153)
at android.app.ActivityThread.main(ActivityThread.java:5022)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1032)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:790)
at dalvik.system.NativeStart.main(Native Method)

@iainmcgin
Copy link
Member

It looks like we should immediately fire the provided pending intent with a failure if there is no browser.

@iainmcgin iainmcgin added the bug label Jul 21, 2016
@iainmcgin
Copy link
Member

I have now formalized this behavior into the contract of performAuthorizationRequest as of 0.4.0 - if there is no browser available, ActivityNotFoundException will be thrown, and applications should be written to handle this (rare) eventuality.

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

No branches or pull requests

2 participants