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

Issue 630916 link

Starred by 2 users

Issue metadata

Status: WontFix
Owner:
Closed: Jul 2016
Cc:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 2
Type: Bug



Sign in to add a comment

App Install Banner should use App Manifest start_url URL, not current URL

Project Member Reported by scheib@chromium.org, Jul 25 2016

Issue description

What steps will reproduce the problem?
0. Have a site that supports App Install Banner 
1. Visit page and have App Install Banner trigger on a deep URL, e.g. to a specific document, game session, etc.
3. Add website to homescreen via App Install Banner prompt.
4. Close tabs, reopen via home screen icon.

What is the expected result?
Homescreen launcher for site launches site at 'start_url'.

What happens instead of that?
New session of site launches to previous URL, always. 

This is bad on sites such as boardom.io which allow you to play games. The App Install Banner is likely to appear after a user is engaged and on a specific game URL. Returning to that specific game every time when launching from the home screen icon is not expected.

Site developers shouldn't need to work around this by preventing the prompt, modifying the URL, and then allowing it. That contortion doesn't make sense other than as a pure work around -- as it would leave the URL in a poor state presuming the user ignores the prompt.


 
This is strange - ShortcutInfo is the struct carrying the URL which is added to homescreen. That struct is explicitly initialised with an empty URL and only has its URL updated to be the manifest start_url, so the original (deep) URL should never make it into the homescreen shortcut - only the manifest start_url should.

I also tried triggering this bug on boardom.io on tip of tree, but the homescreen shortcut added pointed to the boardio.io home page, not the deep page. Can you confirm that this issue is happening?
Components: UI>Browser>AppShortcuts
Labels: Needs-Feedback

Comment 3 by scheib@chromium.org, Jul 26 2016

It happened to me, but I also reported it to matt@boardom.io who stated he would implement a work-around on boardom.io.

matt@boardom.io, did you?
I'm fairly sure the only way you could have triggered this is if the manifest previously set its start_url to the deep link, rather than the home page. But more details would be great to try and narrow down all of the variables.

Comment 5 by m...@boardom.io, Jul 27 2016

Hello all. Thanks for reporting this Vincent. I have not implemented the workaround, nor am I able to reproduce the issue myself.

I'm certain that the start_url has only been "/". It would not make sense for me to set the start_url to a specific game.

I also have notifications that open deep links into the app, eg: "https://boardom.io/game/3C2F6De1Ce102". The most unique case to my app that I can think of is the user receives a notification to a game, opens that, and then is prompted with the install banner.

I was not able to reproduce the app with the following steps:
1: ensure Boardom is not on home screen
2: clear all tabs/instances of Boardom
3: restart device
4: connect via USB debugging
5: fire notification which opens deep link
6: click on notification via app which allows service worker to open deep link through a browser tab
7: prompt device to show install banner via chrome://inspect from connected computer
8: install app
9: press home and launch the installed app

This opened the correct short_url "/"

I tried a few other things such as simply triggering the install banner without a notification.


In the past I've had users complain that notifications open chrome tabs instead of the installed PWA instance, but that's because my service worker doesn't differentiate between chrome tabs or installed instances, and eagerly picks an open window. I don't see how that confusion could be possible here though, since Vincent's bug report says he launched the app via the icon on the home screen.

Chrome 51.0.2704.81
Android 6.0.1


Comment 6 by scheib@chromium.org, Jul 27 2016

If we can't repro- then I suppose close.

It is most likely that I had clicked a notification to enter a specific game, and then was presented the app install promo. It's likely that I had an existing tab open when I later used the home screen icon.
Status: WontFix (was: Untriaged)
Please re-open if you run into anything strange - we definitely want to track it down. :)

Sign in to add a comment