-
Notifications
You must be signed in to change notification settings - Fork 876
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
ActivityNotFoundException (No browser installed on device) #521
Comments
we are facing something similar:
Devices Operating Systems |
How can we get a proper callback for this? We need to show an error message to the user to tell them to install some browsers, but |
@kiskunk You should be able to do something like:
We were surprised by the number of devices encountering this as well. We now catch this and present the user a message letting them know they require a browser to continue. |
It sounds like throwing a formally documented exception on calls that require browsers would be helpful here. No guarantees can be provided as to when this can be implemented, but it's a reasonable request. |
difficult |
We also see this problem in our logs. We actually have one Testdevice (Samsung S7) where this error occured for whatever reasons. Setup: Chrome (default), Firefox and Opera are installed. We found that this line in
resolves only for the Opera Browser which let everything fail Note: I have another S7 with the same setup where this error does not occur 🤷♀️ |
We've been observing this crash on few of our Android users in production. I have managed to reproduce the crash with the sample project in this repo, but only if I choose the "Authorize Auth0" option. There are no browsers installed on the device (Android 10). We've been using version 5.0.0 of this library, since this seemed to have been handled already: FormidableLabs/react-native-app-auth#443 But it keeps happening. I don't seem to be able to get the error mentioned in the README (browser_not_found (Android only) - no suitable browser installed), only a crash. I cannot tell for sure if the users experiencing this have no browsers installed or they have an non supported one. |
We've had this issue on a few Android devices that had installed some other browser, in particular "Photon Browser". It was being used by users to run Flash apps. It would cause no browsers to be returned even if Chrome was installed and set as the default browser. Uninstalling "Photon Browser" solved the problem. This was on Android 11 running on Samsung device. |
We've experienced the same bug a while ago. If the Opera browser (or Opera beta) is set as default browser a login isn't possible at all. As @jannisveerkamp said the following intent only resolves the Opera browser which isn't able to handle it: List<ResolveInfo> resolvedActivityList = pm.queryIntentActivities(BROWSER_INTENT, queryFlag); Other browsers installed on the same device don't have any impact on that. We've tested it on a lot of different devices and found out that the bug only occurs on devices running Android 7 or below. We've also tested about 50 different browsers and couldn't reproduce that strange behavior with another browser. We've added a workaround for that bug in our fork. The important parts occur in this two commits: But of course we would be very interested in a fix or workaround in the official repository. |
@SuddenH4X You can use BrowserDenyList to work around your issue. Keeping this issue open as the OP's question refers to a different use-case. |
We have gotten a customer review from a Samsung Galaxy S10+ Android 11 device, and it sounds similar to what @pablocoberly wrote. Unfortunately I can't reproduce it with my Samsung A70 Android 11 test device :(. Having Chrome, Opera, Photon Browser installed; Chrome gets opened in the app auth login custom tab. When trying to change the default browser, I can only make Opera or Chrome a default browser, Photon is not shown there at all. |
We had answered to the user's review:
Unfortunately it did not solve the issue, but the user also did not contact the support, so we are still unsure how to proceed :( The user added this to their review:
|
I recommend filtering for chrome, this solved all our issues:
for
|
@carstenhag is it possible your customer is using an MDM solution and the app is installed in the sandbox? |
I was able to reproduce this issue on an Android 7 emulator with Opera, Chrome and the WebView browser installed. What I found was that once Opera is set as a default browser, both
The only things that worked were:
The workaround mentioned above by @SuddenH4X worked so I guess we just have to fork the repo and go ahead with that as we have a user with this issue. |
Hi @agologan, We're seeing this issue for a few of our customers in production. How would using a BrowserBlacklist for Opera change the fact that the OS only resolves one browser? Our customers are saying that they have other browsers installed, just as some have already mentioned in this issue, but are still not able to login. Is there a possibility of merging the commits by @SuddenH4X? |
I have to admit I misunderstood the issue described by @SuddenH4X until I saw and tested the scenario described by @dsuresh-ap Iain was planning to add maybe a more specific exception to further help with the original OPs issue. |
@agologan Tested 0.9.1 and I can confirm the fix works. Thanks! |
i keep getting the same crash even with 0.9.1 |
@bazik123 as explained in #521 (comment) the fix resolves a tangential issue explained by other participants to this issue. It is expected to receive |
How come I have Google Chrome, and still get this error??
|
@IgorGanapolsky debugging the issue to provide context or providing a reproducible demo would be helpful. |
@IgorGanapolsky had the same issue in flutter_appauth 1.1.0, but seems to be fixed in flutter_appauth 1.1.0+2 |
@IgorGanapolsky would you mind sharing what falls under a suitable browser? Any particular browsers that we can ask our users to avoid ahead of time? |
To provide better accountability for access to installed apps on a device, apps targeting Android 11 (API level 30) will see a filtered list of installed apps by default. In order to access a broader list of installed apps, an app can specify information about apps they need to query and interact with directly. This can be done by adding a element in the Android manifest. I am able to resolve it by adding |
We have several users who are experiencing the same thing. Google Chrome is installed, but |
@ShridharBanavasi1997 queries is being declared and merged in by the lib since 0.8.0. Locking this conversation. Feel free to open a new issue referencing this one providing further context if the issue persists. |
How to handle the case where no browser is installed on the device ? Can't we launch the authorization request from an webview ?
The text was updated successfully, but these errors were encountered: