New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 681490 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner: ----
Closed: Feb 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 3
Type: Bug



Sign in to add a comment

Android Chrome behaves incorrectly when in conjuction with Chrome Custom Tabs and Custom URL Scheme

Reported by szmyda...@gmail.com, Jan 16 2017

Issue description

Chrome Version       : 55.0.2883.87
URLs (if applicable) :

What steps will reproduce the problem?
(1) Prepare two web pages and serve them somewhere so they're available from mobile Android device. I'm attaching those files to this report.
(2) Prepare simple Android app that handles custom url scheme. I'm working with hybrid apps so in my case it was just some skeleton cordova app with plugin (https://github.com/EddyVerbruggen/Custom-URL-scheme). But in principle its just about adding special `intent-filter` to AndroidManifest.xml file.
(3) Open the `page1.html` page from Android using `Chrome Custom Tabs`
(4) Click "Open in browser" from `Chrome Custom Tabs` menu and open in standalone Chrome Android version
(4) Click the `Go to Page 2` link
(5) You should be redirected back to native android app

What is the expected result?
Leaved standalone Chrome tab should stay at `page2.html` page.


What happens instead?
Leaved standalone Chrome tab has redirected back to "first page after opening the page from Chrome Custom Tabs" so its redirected to `page1.html`


Please provide any additional information below. Attach a screenshot if
possible.

Screenshot from Chrome Dev Tool: https://s23.postimg.org/edllktea3/Screenshot_from_2017_01_16_11_00_59.png

PS: The whole issue is because i wanted, after opening native app, redirect user to some other landing page (so he wont get sucked on some final authorization page in the Chrome tab). But it turned out that the Chrome Android in this case is for some reason automatically redirecting user to the first page.

 
page1.html
117 bytes View Download
page2.html
207 bytes View Download
Labels: Needs-Triage-M55
Labels: OS-Android
Cc: jay...@chromium.org
Labels: triage-te

Comment 4 by jay...@chromium.org, Jan 20 2017

Cc: ian...@chromium.org yus...@chromium.org
Components: UI>Browser>Mobile>CustomTabs
Labels: -Needs-Triage-M55
Status: Available (was: Unconfirmed)

Comment 5 by jay...@chromium.org, Jan 20 2017

Labels: -triage-te
Project Member

Comment 6 by sheriffbot@chromium.org, Feb 15 2018

Labels: Hotlist-Recharge-Cold
Status: Untriaged (was: Available)
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue.

Sorry for the inconvenience if the bug really should have been left as Available. If you change it back, also remove the "Hotlist-Recharge-Cold" label.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot

Comment 7 by bauerb@chromium.org, Feb 21 2018

Cc: tedc...@chromium.org
Components: -UI>Browser>Mobile>CustomTabs UI>Browser>Navigation
I can reproduce this independently of Custom Tabs in regular Chrome as well: redirecting to an external app triggers a back navigation or closes the tab (if there is no previous navigation entry to go back to). I wonder whether this is simply because the redirect happens so early during page loading that the navigation hasn't finished yet and therefore gets aborted, or something. +Ted, do you know?
Cc: bauerb@chromium.org mariakho...@chromium.org
Status: WontFix (was: Untriaged)
I suspect this is the cause:
https://cs.chromium.org/chromium/src/chrome/android/java/src/org/chromium/chrome/browser/tab/InterceptNavigationDelegateImpl.java?l=273

In cases where we see quick redirects, we try to trim the navigations that are triggering external apps to be launched.  If we didn't do this, every time the tab is focused/brought back to life it would trigger an external intents.  We don't want to leave tabs in a state where clicking on them will redirect you to another app as that is a really confusing scenario.

Marking this as WontFix as it seems to be doing exactly what the code was designed to do.

Comment 9 by bauerb@chromium.org, Feb 21 2018

Cc: clamy@chromium.org
Hm, note though that the external intent does get triggered, but Chrome then navigates back. What you describe as the confusing scenario already happens today.
Chrome navigates back to the first page that didn't automatically trigger an external navigation (i.e. the page that had the link that would start the redirect chain).  It doesn't leave you on a page that simply by visiting kicks you out of Chrome.

Sign in to add a comment