firefox-ios icon indicating copy to clipboard operation
firefox-ios copied to clipboard

Opening a link in external app leaves a "loading" about:blank page behind

Open vsanjay85 opened this issue 8 months ago • 4 comments

Steps to reproduce

  1. Open a website that might potentially redirect you to a locally installed app. An example is a deals website or a social media website that might redirect you to Youtube, Instagram, etc
  2. Click on a link that would redirect you to a locally installed app, such as an Amazon or Walmart URL or any other application you currently have installed.

Expected behavior

  1. Redirect user to the external app and load the copied URL

Actual behavior

  1. Redirect user to the external app and load the copied URL
  2. Firefox leaves an "about:blank" page behind that stays stuck in 'loading' state

Device & build information

  • Device: Tested on iPhone XR (IOS 16.7.1) and iPhone 15 Pro (IOS 17.x)
  • Build version: 120.1 (36298)
  • First seen version: Been this way for as long as I've used an iPhone, about 4-5 months now.

Notes

This behavior is not limited to one or two apps. This happens regardless of the app I'm redirected to, Youtube, Costco, Target, etc.

I do NOT see this in Safari. I DO see a similar behavior in Chrome

It appears that the browser is opening the link in a browser tab first, and then checking if a locally installed app exists. If this check could happen without opening the link in another tab, that would likely fix it.

Attachments: image image

┆Issue is synchronized with this Jira Task

vsanjay85 avatar Dec 01 '23 17:12 vsanjay85

I believe this relates to https://github.com/mozilla-mobile/firefox-ios/issues/15718

lmarceau avatar Dec 01 '23 18:12 lmarceau

I believe this relates to #15718

They do seem to be related, although #15718 assumes that this behavior is only for Youtube, whereas this is the default behavior for all apps.

vsanjay85 avatar Dec 01 '23 19:12 vsanjay85

I'm also seeing this bug.

brendanjones avatar Jan 09 '24 23:01 brendanjones

Me as well

PraveenJP avatar Feb 12 '24 02:02 PraveenJP

Since the recent versions of Firefox for iPadOS many links just open to about:blank. Especially PayPal links on checkout, e.g. trying to start (to pay for) a Tidal subscription. Also "download image" at imgflip.com shows this behavior. Gotten worse the last weeks. 😢

Cpt-KeksMonster avatar Mar 10 '24 19:03 Cpt-KeksMonster

Not just iPad, also on iOS. The link goes in the URL bar but doesn’t load. Selecting ‘reload’ does not load the page, but selecting the link and then tapping ‘Go’ does load the page.

brendanjones avatar Mar 11 '24 07:03 brendanjones

@lmarceau

Investigated this issue for a while, and...

Based on the current code version, that "about:blank" page was/is intended and also someone left an important comment related to this behaviour.

" // If the page uses window.open() or [target="_blank"], open the page in a new tab. // IMPORTANT!!: WebKit will perform the URLRequest automatically!! Attempting to do // the request here manually leads to incorrect results!! "

BUT

In order to open a link for example via Youtube (native app), currently Firefox open Youtube app but also a empty page (blank page). To avoid this behaviour, we can check first if the app (e.g. Youtube) is installed, using "UIApplication.shared.canOpenURL" method.

If "Yes" we can open the native app using "UIApplication.shared.open" else continue to the current implementation. (which is working fine if no native app is installed)

A short mention here: every native app (e.g. Youtube, Instagram) that we want to be covered by this approach should be added to the "LSApplicationQueriesSchemes" list.

"LSApplicationQueriesSchemes" list already have apps like: googlegmail and whatsapp.

dicarobinho avatar Mar 15 '24 15:03 dicarobinho

➤ Norberto Andres Furlan commented:

Alina Moldovan Andrei Bodea I changed the priority of this issue. We have a lot of reports from users about this happening more frequently on 124 than on previous versions and I want to make sure we are fixing it for the next weekly release.

data-sync-user avatar Mar 22 '24 13:03 data-sync-user

➤ Andrei Bodea commented:

Hi, thank you Norberto Andres Furlan on what version is this issue fixed? I understand the Fix version: weekly release there but might be worth mentioning in a comment what version was this issue fixed first.

data-sync-user avatar Mar 22 '24 15:03 data-sync-user

➤ Alina Moldovan commented:

Validated this using v9000 (40010) and iPhone 14+ (16.0.3). Not able to reproduce the original issue ("about:blank" page) but I found that the current behavior is a bit defect than the old one

Steps:

  1. Search on google for Instagram pages; Make sure Instagram app is already installed on the device
  2. Tap on a link => you are redirected to Instagram app
  3. Navigate back to FF and check the tab

Expected: Google search results are visible

Actual: The Instagram page you already loaded in Instagram app is loaded on Firefox also.

Adding two videos:

  • old behavior 122.0 (37590)

  • new behavior v9000 (40010)

OLD Behavior

!Skype_Video10.mp4|width=41.66666666666667%!

NEW Behavior

!Skype_Video9.mp4|width=886,height=1920!

Norberto Andres Furlan Alexandru Farcasanu

data-sync-user avatar Mar 22 '24 17:03 data-sync-user

➤ Alexandru Farcasanu commented:

I tested on the main branch that contain this fix too.

As Alina Moldovan , I can reproduce this issue but also I removed from the code, the implementation for this ticket and the problem still be there. That means, something else, changed that behaviour and is not related to code added for this ticket.

I will get the answer as soon as possible and I will come here with an update.

data-sync-user avatar Mar 22 '24 21:03 data-sync-user

➤ Norberto Andres Furlan commented:

Nishant Bhasin maybe the fixes we pushed on v124 also affected this behavior.

data-sync-user avatar Mar 22 '24 21:03 data-sync-user

➤ Alexandru Farcasanu commented:

Norberto Andres Furlan

After more investigations, this behaviour is related to this ticket: https://mozilla-hub.atlassian.net/browse/FXIOS-7586 ( https://mozilla-hub.atlassian.net/browse/FXIOS-7586|smart-link )

Sorin Paraipan is taking a look on it.

data-sync-user avatar Mar 25 '24 15:03 data-sync-user

➤ Andrei Bodea commented:

Verified as fixed on v124.2 (38968) with iPhone 15 Pro (17.3). We tried with the following apps: Gmail, Amazon, HBO MAX, Reddit, Snapchat, Skype, OLX, Books App, Weather App, notepad, and many other news sites.

Please note that we were not able to reproduce this issue anymore, but we will keep looking into the deep links / external links issues.

data-sync-user avatar Mar 26 '24 15:03 data-sync-user

For me: fixed for virtually all websites. Exception found: PayPal payment after a Steam purchase. Still opens blank tabs, 3-5 tries necessary before the PP website opens and payment can be completed.

Cpt-KeksMonster avatar Apr 15 '24 06:04 Cpt-KeksMonster