Android App Intent breaks on chrome mobile browser from Gmail/Hangouts App
Reported by
mohit.ar...@snapdeal.com,
Mar 29 2016
|
||||||||||||
Issue description
UserAgent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.87 Safari/537.36
Steps to reproduce the problem:
Steps to reproduce :
1. Clear your device browser cache for m.snapdeal.con or entirely.
2. Click on the m site link inside the Gmail App
m.snapdeal.com/product/nashware-black-travel-kit/679244143963?aff_id=111
3. If you see Complete action dialog, select Chrome Browser.
Issue :
The Intent gets broken on the Chrome Browser. the Address bar in Chrome shows this Intent address with error :
intent://m.snapdeal.com/product/nashware-black-travel-kit/679244143963?aff_id=111&aff_timestamp=1457421251065&link_click_id=235285382164445532#Intent;scheme=snapdeal;package=com.snapdeal.main;end
What is the expected behavior?
the App Intent should get processed in Chrome browser and App deep link should work.
The same deep link works well when it is pasted into the Omnibox address bar and page is loaded, the content is successfully deeplinked in App then.
What went wrong?
Error on Chrome page :
ERR_UNKNOWN_URL_SCHEME
Did this work before? No
Chrome version: 49.0.2623.87 Channel: stable
OS Version: 6.1 (Windows 7, Windows Server 2008 R2)
Flash Version: Shockwave Flash 21.0 r0
,
Mar 30 2016
,
Apr 1 2016
This issue is still reproducible on latest M49-49.0.2623.105, when "snap deal" application is already installed on device. Note: please find logs and video taken on Samsung Galaxy S4 mini (GT-I9190) / KOT49H @ http://go/chrome-androidlogs1/5/598546
,
Apr 1 2016
Hey Team, Can we prioritise this fix, thanks. Let me know if any more details required.
,
Apr 3 2016
aelias@, could you please triage this issue?
,
Apr 3 2016
changwan@, any thought on what's going wrong here? Is it just a missing "http://" from the string?
,
Apr 4 2016
Hmm... This happens because Chrome tries to skip intent picker after a series of redirection. Here's what I observed: The URL first gets redirected to HTTPS: https://m.snapdeal.com/product/nashware-black-travel-kit/679244143963?aff_id=111 and then to https://bnc.lt/a/key_live_ggeGF8sjOX2aokkErbPjbbjousn2F7Hf?$deeplink_path=m.snapdeal.com%2Fproduct%2Fnashware-black-travel-kit%2F679244143963%3Faff_id%3D111%26aff_timestamp%3D1459819134288 which effectively redirects to: snapdeal://m.snapdeal.com/product/nashware-black-travel-kit/679244143963?aff_id=111&aff_timestamp=1459819134288&link_click_id=245344136283544672 Then TabRedirectHandler.hasNewResolver() returns false because the user initially has chosen Chrome to handle the initial URL. We have the following logic in (as seen in TabRedirectHandler#hasNewResolver and ExternalNavigationHandler#shouldOverrideUrlLoadingInternal): If Chrome got an intent from an external app and the URL goes through a series of redirections: 1) We calculate the initial set of intent resolvers. 2) We calculate the new set of intent resolvers after redirection. If Chrome got an intent from an external app, and 2) has no new resolver from 1), then we do not launch an external app. The rationale is that the user has explicitly chosen Chrome to handle the intent at the beginning and we do not want to bother the user any more, I believe. But in this case, the initial set was - snapdeal app - Chrome and the final set was - snapdeal app (Chrome cannot handle intent-schemed url by itself) Probably a fix would be to change the logic to launch an external app when Chrome is not one of the final intent resolvers but there is another resolver: tedchoc@, what do you think? Maybe we should also change the name to TabRedirectionHandler#hasNoNewResolverAndChromeResolvesIntent() as well.
,
Apr 4 2016
Uploaded a patch: https://codereview.chromium.org/1855853002
,
Apr 6 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/54b7bc3dea8ab099971559538b9ffc50c79f6d8e commit 54b7bc3dea8ab099971559538b9ffc50c79f6d8e Author: changwan <changwan@chromium.org> Date: Wed Apr 06 00:38:36 2016 Launch an external app when Chrome cannot handle the URL When some third-party app launched Chrome with an intent, and the URL got redirected to another, we try to stay in Chroem unless there is a new intent handler after redirection. The rationale here is that the user has explicitly chosen Chrome over other intent handlers already, and we do not want to bother them any more. However, if the new URL is actually an external protocol, then Chrome cannot handle it anyways. This CL fixes stay-in-Chrome logic and adds a test case. BUG= 598546 Review URL: https://codereview.chromium.org/1855853002 Cr-Commit-Position: refs/heads/master@{#385350} [modify] https://crrev.com/54b7bc3dea8ab099971559538b9ffc50c79f6d8e/chrome/android/java/src/org/chromium/chrome/browser/externalnav/ExternalNavigationHandler.java [modify] https://crrev.com/54b7bc3dea8ab099971559538b9ffc50c79f6d8e/chrome/android/javatests/src/org/chromium/chrome/browser/externalnav/ExternalNavigationHandlerTest.java
,
Apr 6 2016
requesting merge approval for #9
,
Apr 6 2016
[Automated comment] Less than 2 weeks to go before stable on M50, manual review required.
,
Apr 6 2016
Merge approved for M50 branch 2661. Please merge ASAP.
,
Apr 6 2016
[Bulk edit] This bug is marked as merge approved for M50, but has yet to be merged. Please merge ASAP, as our stable candidate for M50 will be cut next week. If this is in error and any required CLs have already been merged, please remove the Merge-Approved-50 label and replace it with Merge-Merged-2661.
,
Apr 7 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/76012c7276fc5734c9691674aed8a60001b53ca8 commit 76012c7276fc5734c9691674aed8a60001b53ca8 Author: Changwan Ryu <changwan@google.com> Date: Thu Apr 07 02:24:33 2016 Launch an external app when Chrome cannot handle the URL When some third-party app launched Chrome with an intent, and the URL got redirected to another, we try to stay in Chroem unless there is a new intent handler after redirection. The rationale here is that the user has explicitly chosen Chrome over other intent handlers already, and we do not want to bother them any more. However, if the new URL is actually an external protocol, then Chrome cannot handle it anyways. This CL fixes stay-in-Chrome logic and adds a test case. BUG= 598546 Review URL: https://codereview.chromium.org/1855853002 Cr-Commit-Position: refs/heads/master@{#385350} (cherry picked from commit 54b7bc3dea8ab099971559538b9ffc50c79f6d8e) Review URL: https://codereview.chromium.org/1866253002 . Cr-Commit-Position: refs/branch-heads/2661@{#506} Cr-Branched-From: ef6f6ae5e4c96622286b563658d5cd62a6cf1197-refs/heads/master@{#378081} [modify] https://crrev.com/76012c7276fc5734c9691674aed8a60001b53ca8/chrome/android/java/src/org/chromium/chrome/browser/externalnav/ExternalNavigationHandler.java [modify] https://crrev.com/76012c7276fc5734c9691674aed8a60001b53ca8/chrome/android/javatests/src/org/chromium/chrome/browser/externalnav/ExternalNavigationHandlerTest.java
,
Apr 7 2016
,
Apr 13 2016
Verified with 50.0.2661.76 that clicking on the link from gmail app and choosing yo open with chrome, opens Chrome beta and tries couple navigations and then takes user to the snapdeal app. If the app is not installed it takes user to paystore to download the snapdeal app.
,
Oct 13 2016
|
||||||||||||
►
Sign in to add a comment |
||||||||||||
Comment 1 by dtapu...@chromium.org
, Mar 29 2016Labels: -OS-Windows OS-Android