Fenix: FNX2-12985 ⁃ [Bug] When "Open links in apps" is enabled, even after selecting to open with Fenix the link is opened in the Wikipedia app

Created on 30 Jun 2020  ·  16Comments  ·  Source: mozilla-mobile/fenix

When "Open links in apps" is a enabled, even after selecting to open with Fenix the link is getting opened in the Wikipedia app. It's a continuous loop in the Fenix. Please see the video.

Related issue: #10838.

20200630UNITO-UNDERSCORE!080921!

E3 OpenInApp engverified 🐞 bug

All 16 comments

CC @rocketsroger.

Unfortunately, this is a side effect of the fix for https://github.com/mozilla-mobile/fenix/issues/12035. To be able to open a email link in the correct app, we now always opens the link in app if an app is available. In this case because "Open in apps" is enabled and Wikipedia app is available, we end up opening the link the app. Disabling this will break the UberEat email link use case.

Okay, can please tell if the dialogue I'm getting is a System Share Sheet or something else opened by the Wikipedia app?

Okay, can please tell if the dialogue I'm getting is a System Share Sheet or something else opened by the Wikipedia app?

That is interesting. I'll keep this issue opened and investigate more on why that share sheet is showing up.

Here's another example where this doesn't work;
But to be really honest I'm really happy with the 'Open links in apps' fix, it's just that there're some minor issues that need to solved. This works in Chrome; it opens the link in Chrome and doesn't redirect to the Pocket app. Where as Fenix opens them in Pocket.

Chrome handles these type of links correctly. Do you think can some ideas be borrowed from Chromium since it is also open-source (I'm not a developer so I don't know if this can even be done)?

20200701_170454

Agreed. The pocket issue is actually a known issue: https://github.com/mozilla-mobile/fenix/issues/11148.

The issue here is the link from search is "https://en.wikipedia.org/wiki/Special:Search?search=Firefox&go=Go". The Wikipedia app is registered to handle this link. But when this link is sent to the Wikipedia app, it refuses to handle it.

Looked at Wikipedia android app source. Anything with /Special: in an URL is opened in the external app. (Unfortunately, itself is also registered as an external app for /Special: URLs. I'll investigate into how we can break the loop.

This issue triggers facebook app to open also, if there is a facebook comment option on a page, so this really doesn't work very well.

Eg. open https://fyens.dk/artikel/middelfartfirma-stor-succes-sidste-%C3%A5r-men-fyrer-i-%C3%A5r or any other page with an embedded facebook comment option, and whatever facebook app you have installed, is automatically opened and you are shown the post option for that facebook page.

This issue is fairly new, didn't see it when running Firefox Preview, but now I'm running Firefox Beta: v79.0.0-beta 5 (Build %2015749827) the bug is present.

This issue triggers facebook app to open also, if there is a facebook comment option on a page, so this really doesn't work very well.

Eg. open https://fyens.dk/artikel/middelfartfirma-stor-succes-sidste-%C3%A5r-men-fyrer-i-%C3%A5r or any other page with an embedded facebook comment option, and whatever facebook app you have installed, is automatically opened and you are shown the post option for that facebook page.

This issue is fairly new, didn't see it when running Firefox Preview, but now I'm running Firefox Beta: v79.0.0-beta 5 (Build %2015749827) the bug is present.

I see. The fix for opening apps at redirect seems to cause a lot of unintended behaviours. I might have to remove the redirect as one of the decision for opening the app or not.

rocketsroger, I am the reporter of this issue. Please let me know if I can provide you any more information. Thanks. :)

rocketsroger, I am the reporter of this issue. Please let me know if I can provide you any more information. Thanks. :)

This issue is more complicated then originally thought. The fix I have implemented in a-c was for the Facebook issue above. The Wikipedia issue will require more fix. The weird behaviour is due to the Wikipedia app's intent filter. It can be (kind of) reproduced on Chrome as well.

With latest Nightly, this should be fixed. Tapping on Firefox search suggestion will open the page the Wikipedia app.

@rocketsroger tested on Nightly 8/19 with Google Pixel 3 (Android 11) and LG G7 FIT (Android 8) and here are my findings: tapping on the Firefox search suggestions will open a dialog "Open with" listing Wikipedia and Nightly.
Given the above comment, that the page should be opened with the Wikipedia app, please share your thoughts.

@rocketsroger tested on Nightly 8/19 with Google Pixel 3 (Android 11) and LG G7 FIT (Android 8) and here are my findings: tapping on the Firefox search suggestions will open a dialog "Open with" listing Wikipedia and Nightly.
Given the above comment, that the page should be opened with the Wikipedia app, please share your thoughts.

I see where my mistake was. I've been tapping on the suggested result. Not tapping on the search button. This looks like its a Wikipedia app issue. It's intent filter is requesting us to open the app but the app is opening the result in the default browser again. Causing a loop.

There are two use cases here:

  1. Type in search "Firefox" and tap on the search suggestion. This one is fixed from our end. It now works correctly and launches Wikipedia app.
  2. Type in search "Firefox" and tap on the search button (the magnifier). This one will trigger an app list. Choosing Wikipedia app will trigger a loop as the Wikipedia app tries to open the URL in the default browser triggering the app list again. This is an issue of the app since Chrome have the same problem. Won't fix.

Closing this issue since the original issue is reproducible with Chrome.

Was this page helpful?
0 / 5 - 0 ratings