-
Notifications
You must be signed in to change notification settings - Fork 130
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
IllegalArgumentException in CustomTabsClient #138
Comments
Same as the the other issue: Please share steps to reproduce and the context in which this has happened, such as the android version or whether a "Custom Tabs" compatible app was installed in that device at the time this exception was thrown. |
Sorry, we don't have steps to reproduce, we only see intermittent crashes in our app cause by this. We're not using Custom Tabs at all. The underlying problem with these two issues seems to be that launchAuthenticationIntent() is getting called when the bundle extras are not available. It looks like that shouldn't be happening with your check of '!intentLaunched' - nevertheless it's happening. |
I'm closing this due to missing repro steps. See if the issue continues to happen with the latest patch and re-open it if necessary. |
+1, I'm getting this crash as well in crash reports. I can't reproduce personally. Though, I just updated my auth0 version, so it may go away (I was using the version bundled with Lock before) |
@lbalmaceda
|
@tplkn thanks. That's a known solution for conflicting dependency versions, but I don't think the exception in the original post is that case. If the rest can leave some feedback it would be appreciated. |
@lbalmaceda We've updated to 1.12.1 back in Feb but this crash is still occurring and is the most frequent crash on our app. We still cannot repro the error internally. The stack trace is still the same as above. Please re-open this issue. Perhaps some other customers will be able to provide more info. |
@lbalmaceda We are also seeing this crash, using auth0 version
|
I think there's a tiny chance that the user doesn't have any browser-like app installed (how do they live?!). I'll try to make a PR to validate this and get a patch release for the next week. Hang on!! |
@lbalmaceda Yep, I disabled the browser on an emulator and sure enough, I got the same crash. |
@lbalmaceda It might also be that there is no supported customtabs browser? |
@jeffbuswell No, that's not the case since we first get all browser apps and keep only those who respond successfully to the CustomTabs Connection service. Then we choose one from that list, taking the user preference into account first and then falling back to the ones we trust the most. But if no app matches, we default to the one the OS would pick to open a generic The most I can do is capture that and silently log an error, or throw an unchecked exception (but this is already done by the OS). Otherwise this would be a breaking change (requiring devs to try/catch the call) and to be honest all phones should have at least 1 browser app installed. |
@jeffbuswell Thanks for contributing with your info that helped @lbalmaceda find the fix. This has been a thorn in our side for some time. Please shoot me a note when the fix is posted. Thanks! |
@lbalmaceda We're testing this fix. You've successfully handled the case when no browser is installed. Thank you. We also tested the condition where the installed browser doesn't support custom tabs and are getting the following crash while you're unbinding the service. We used Opera and Opera mini for our testing. `07-19 12:23:09.304 30141-30141/tv.fubo.mobile.debug V/CustomTabsController: Trying to bind the service
07-19 12:23:11.369 30141-30141/tv.fubo.mobile.debug E/AndroidRuntime: FATAL EXCEPTION: main |
@billgockeler ah this was a silly mistake. I forgot to check the service was bound 🤦♂️ Let me create a quick patch. |
@billgockeler PR is there but circleci is still having issues. I'll make a patch release as soon as I can. 👍 |
perfect, thanks for the prompt response...yeah, we're currently held up by circleci as well |
We're experiencing the following crash in production:
Fatal Exception: java.lang.RuntimeException: Unable to resume activity {tv.fubo.mobile/com.auth0.android.provider.AuthenticationActivity}: java.lang.IllegalArgumentException: Service Intent must be explicit: Intent { act=android.support.customtabs.action.CustomTabsService }
at android.app.ActivityThread.performResumeActivity(ActivityThread.java:3535)
at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:3575)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2817)
at android.app.ActivityThread.-wrap12(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1528)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6316)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:872)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:762)
Caused by java.lang.IllegalArgumentException: Service Intent must be explicit: Intent { act=android.support.customtabs.action.CustomTabsService }
at android.app.ContextImpl.validateServiceIntent(ContextImpl.java:1347)
at android.app.ContextImpl.bindServiceCommon(ContextImpl.java:1459)
at android.app.ContextImpl.bindService(ContextImpl.java:1427)
at android.content.ContextWrapper.bindService(ContextWrapper.java:636)
at android.support.customtabs.CustomTabsClient.bindCustomTabsService(CustomTabsClient.java:70)
at com.auth0.android.provider.CustomTabsController.bindService(CustomTabsController.java:97)
at com.auth0.android.provider.AuthenticationActivity.launchAuthenticationIntent(AuthenticationActivity.java:111)
at com.auth0.android.provider.AuthenticationActivity.onResume(AuthenticationActivity.java:76)
at android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1270)
at android.app.Activity.performResume(Activity.java:6861)
at android.app.ActivityThread.performResumeActivity(ActivityThread.java:3512)
at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:3575)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2817)
at android.app.ActivityThread.-wrap12(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1528)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6316)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:872)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:762)
The text was updated successfully, but these errors were encountered: