[Bug]: Duplicate search option crashes firefox in android #23009
Comments
|
I was trying to simulate without luck, I tried with Pixel 3 with Android 11 and Moto G5 with Android 7 and an emulator with Android 9. QA team could you help us to identify in which devices you are able to replicated, apart from Vivo u20. |
I'm not a techie and cannot understand the above conversation. Maybe a factory reset can solve the problem. But to reinstall and set up the device from scratch seems a pain compared to just avoiding the duplicate search button. |
I couldn't reproduce this issue either.
Tested on the following builds:
@doctor82 Could you try this on the latest Nightly, see if you reproduce there also? Thanks! |
This is going to depend on what is adding the second search option on the context menu. Maybe we should go to an allowlist for constructing the context menu? |
@doctor82 This issue probably depends on what other apps you have installed.
(If you don't have adb installed you can follow the steps from here - https://www.xda-developers.com/install-adb-windows-macos-linux/ to get it working) |
The logcat is interesting though because I think it shows us crashing when we try to open that other app and this really shouldn't happen so the crash could be a device specific issue. |
I am not a techie so not able to give more inputs. I believe it could have caused by some other applications previously installed. |
Please don't close this issue. It is a valid crash and we may have other ways to get the info we need. |
I also encountered this problem. After run adb command, get the result below:
So I uninstall the microsoft launcher, and the problem is solved. My phone is Redmi K20 pro, use MIUI by xiaomi.eu 12.5.6. (Android 11) |
I can confirm I have the exact same error, and the exact same solution. I should note even if I change my default launcher away from Microsoft launcher, I still get the error. I must uninstall it completely in order to resolve the error. |
Thank you for updating this! |
I can confirm that I had Microsoft launcher installed at some point of time, prior to factory resetting my phone. |
I am a software engineer by trade, but am new to Kotlin and mobile app work. I downloaded the repo hear and followed the steps to get started and to debug the project upon getting this error and joined the matrix chat and wound up here. Just to be sure, the issue is that this should not show up in the floating menu as an action, even though it should not, due to the export flag being set to false but it does anyways due to a lack of a check, am I reading and understanding that correctly? |
@lolp1 Yes, we want to exclude private activities from being added as custom actions since they cannot be started from outside. |
So I am wanting to fix this my self on a local build for now, which is why I am asking. I am still unsure how you can extract if the activity is private or not, it seems like there is an export field in the manifest data but google seems to show no obvious ways to resolve that information. |
This issue is to be resolved in Geckoview (see https://bugzilla.mozilla.org/show_bug.cgi?id=1781780) not in Fenix/Android-Components. <PackageManager>.queryIntentActivities(<processTextIntent>, PackageManager.MATCH_DEFAULT_ONLY)[0].activityInfo.exported @lolp1 If you want to patch a local build you could combine the Android-Components code with the GeckoView code with what I wrote above about excluding private activities and not call |
EDIT: It works! Thanks for the info. I actually wanted to get my feet wet with this stuff, but needed a little motivation, and fixing this error was it because it drove me nuts. Will await some one to submit a proper ideal solution and update it when its pushed. For reference: ActivityInfo info =<Intent>.resolveActivityInfo(<Context>.getPackageManager(),
PackageManager.MATCH_DEFAULT_ONLY);
boolean show = info != null && info.exported;
if(show) {
return true;
} |
@lolp1 I recommend you wait for an official fix but if you want to thinker the code you posted above used in the combined Android-Components + GeckoView code in place of these lines would probably work. |
@Mugurell ActivityInfo info =<Intent>.resolveActivityInfo(<Context>.getPackageManager(),
PackageManager.MATCH_DEFAULT_ONLY); Inside there is various info about the activity, including several unique identifiers to microsoft launcher. |
@lolp1 Yes but with just those modifications I think in the scenario of having two components responding to that intent - one that we want to exclude and one that we don't, if we are returning false then we won't be keeping the second one - no custom action for |
I guess the code I pasted is confusing. I simply skip the adding of any one that is not exported. I don't actually use the name heh. There is no good reason to add to the menu an action not exported -- as I found out thanks to every one in this issue thread. So where it's adding the custom actions, the isActionAvailable will be false if export is also false |
Was this fixed? I'm no longer crashing upon search actions. EDIT: I was accidentally using my local version with the modification that gets rid of this bug, thinking I was using the official version, sorry, it's still broke. |
I'm closing this GitHub issue because we're now tracking this bug in Bugzilla here: https://bugzilla.mozilla.org/show_bug.cgi?id=1781780 |
Steps to reproduce
In my Firefox Android, I have two search buttons popping up on long pressing any word. This happens even when no add-ons are installed. The first one works fine and the second one crashes the browser. Tried reinstalling the browser many times with no use.
Expected behaviour
Should go to google search
Actual behaviour
Browser crashes
Device name
Vivo u20
Android version
Android 9
Firefox release type
Firefox
Firefox version
95.2.0
Device logs
https://crash-stats.mozilla.org/report/index/75573ecb-4180-4e92-aa5b-318c00211223
Additional information
_No response
_
┆Issue is synchronized with this Jira Task
The text was updated successfully, but these errors were encountered: