Skip to content
This repository has been archived by the owner on Jan 12, 2023. It is now read-only.

Yelp redirect to app store loop #783

Closed
kbrosnan opened this issue Jun 15, 2017 · 2 comments
Closed

Yelp redirect to app store loop #783

kbrosnan opened this issue Jun 15, 2017 · 2 comments
Assignees

Comments

@kbrosnan
Copy link

kbrosnan commented Jun 15, 2017

There are many ways to reproduce this behavior on the yelp website. The quickest is to do the following

Expected: warning that the play store is going to open

Actual: warning that the play store will open and a repeating attempt to open an external link that will eventually cause the OS to kill Focus. It is impossible to switch apps or try and kill Focus until this loop has run for a while and starts slowing down the phone.

Video of the behavior https://www.youtube.com/watch?v=4oUDw1oI2Lo

@mcomella mcomella self-assigned this Jun 15, 2017
@mcomella
Copy link
Contributor

(Kevin, re slack comments: nice intuition/sleuthing that Adjust was causing these problems! :) )

Clicking on the "Open in app" link takes us to http://app.adjust.com... which, on load, tries to load the market:// intent link and after 1000ms fires repeated attempts to load "about:blank" (I'm not sure why - maybe to hide the adjust tracking url if opening the market intent fails?).

In our case, we display the "Are you sure you want to open this?" dialog instead of instantly opening the market:// link so we are repeatedly requested to load "about:blank", which gets caught in our intent handling and so we display the "Open in app" system dialog each time "about:blank" is requested to load.

fwiw, I copied the page source into a gist.


I think two possible solutions are to:

  1. load about:blank when requested (I presume they do this because Chrome does this).
  2. Ignore about:blank load requests. From a correctness perspective, it's weird to let pages load our internal pages but if Chrome allows these loads, ignoring these requests could break Chrome-centric sites. Note that Firefox does not handle about:blank load requests.

To stay in sync with Chrome, I prefer 2 but I don't know what the side effects of this choice would be. For example, while trying to fix this bug, I discovered some people struggling with the web view randomly returning "about:blank" URLs (example). I feel like they likely misconfigured the WebView so I think it'll be fine though.

@mcomella
Copy link
Contributor

Note that both options provide a sub-par experience on the Yelp page if the user cancels the prompt to open Yelp in the Play Store because the page loads to http://app.adjust.com... or about:blank so the user has to press back in order to get back to the Yelp page.

We might be able to store the previous page and re-load it or something, but we run the risk of breaking other sites. We could special case this site, but that's never a good strategy. :P

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants