Android Chrome behaves incorrectly when in conjuction with Chrome Custom Tabs and Custom URL Scheme
Reported by
szmyda...@gmail.com,
Jan 16 2017
|
|||||||||
Issue descriptionChrome 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.
,
Jan 17 2017
,
Jan 20 2017
,
Jan 20 2017
,
Jan 20 2017
,
Feb 15 2018
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
,
Feb 21 2018
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?
,
Feb 21 2018
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.
,
Feb 21 2018
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.
,
Feb 21 2018
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 |
|||||||||
Comment 1 by ranjitkan@chromium.org
, Jan 16 2017