question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

android.content.ActivityNotFoundException: No Activity found to handle Intent

See original GitHub issue

We’re getting quite a few exceptions on the Android side. I believe that the main cause is that we need to handle a case when the Browser app is not available on a specific Android device. So the solution would be to wrap this into the try-catch block and propagate the error to ReactNative and ask the user to download the Browser on the library consumer side. Another option is to check in advance if the browser is available https://developers.google.com/web/android/custom-tabs/implementation-guide#what_happens_if_the_user_doesn’t_have_a_browser_that_supports_custom_tabs_installed

Stacktrace:

* android.app.Instrumentation.checkStartActivityResult Instrumentation.java:2014

* android.app.Instrumentation.execStartActivity Instrumentation.java:1675

* android.app.Activity.startActivityForResult Activity.java:4601

* androidx.fragment.app.FragmentActivity.startActivityForResult FragmentActivity.java:6

* android.app.Activity.startActivityForResult Activity.java:4559

* androidx.fragment.app.FragmentActivity.startActivityForResult FragmentActivity.java:3

* android.app.Activity.startActivity Activity.java:4920

* androidx.core.content.ContextCompat.startActivity ContextCompat.java:2

* androidx.browser.customtabs.CustomTabsIntent.launchUrl CustomTabsIntent.java:2

* com.auth0.react.A0Auth0Module.showUrl A0Auth0Module.java:5

I can create a PR for this to speed things up as this is causes a lot of issues for us.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:12 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
mrarronzcommented, Jan 4, 2021
Screen Shot 2021-01-04 at 11 32 48 AM Screen Shot 2021-01-04 at 11 39 39 AM

@lbalmaceda This is the crash reported by Firebase in last 90 days, there are over a hundred of users affected by this. With over 10 versions released this issue still exists and even more for latest version.

0reactions
MaxJadavcommented, Jul 28, 2022

Reproduce: Android 12 Google device, Or emulator. Disable all browser from emulator. App crash when you use this auth0.webAuth. Add this part in try catch fix my issue in AuthenticationActivity.java -> void onResume() -> launchAuthenticationIntent();

if (!intentLaunched && authenticationIntent.getExtras() == null) {
            finish(); // Activity was launched in an unexpected way
            return;
        } else if (!intentLaunched) {
            try {
                intentLaunched = true;
                launchAuthenticationIntent();
                return;
            } catch (Exception e){
                setResult(RESULT_CANCELED);
                finish();
                return;
            }
        }

Read more comments on GitHub >

github_iconTop Results From Across the Web

No Activity found to handle Intent : android.intent.action.VIEW
This exception can raise when you handle Deep linking or URL for a browser, if there is no default ...
Read more >
No Activity Found To Handle Intent: How To Fix This Issue
No activity found to handle intent is an error caused by different reasons such as Google Play is not installed, using a rooted...
Read more >
No Activity found to handle Intent { act=android.intent.action ...
Crash in android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.VIEW dat= } at android.app.
Read more >
ActivityNotFoundException for OPEN_DOCUMENT intent - briar
OPENABLE] typ=image/* (has extras) } android.content.ActivityNotFoundException: No Activity found to handle Intent ...
Read more >
No Activity found to handle Intent android ... - Issue Tracker
... W/System.err: android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.OPEN_DOCUMENT_TREE flg=0x1 }
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found