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

Issue 915943 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Dec 18
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Android , Windows , Chrome , Mac
Pri: 1
Type: Bug-Regression



Sign in to add a comment

DevTools: installability check is not complete

Project Member Reported by dominickn@chromium.org, Dec 18

Issue description

The JavaScript installability check implemented in crrev.com/c/1370371 is incomplete and misleads developers. Ideally, we should avoid duplicating complicated logic in this way since it's a) not good engineering practice, and b) possible to plumb through the results of the actual C++ check that we run. This will be a maintenance burden going forward, and even now, it's not accurate since it's missing many failure conditions implemented in C++.

The full number of possible errors listed in https://cs.chromium.org/chromium/src/chrome/browser/installable/installable_logging.h?q=chrome/browser/installable/installable_logging.h&sq=package:chromium&dr. Errors which the DevTools check does not currently handle include:

 - the site has no service worker
 - there is a service worker, but the service worker doesn't have a fetch handler
 - the start_url isn't within the scope of the manifest
 - the start_url isn't within the scope of the service worker
 - the document URL isn't within the scope of the service worker
 - site isn't served over HTTPS
 - the icons in the manifest can't actually be fetched or decoded properly
 - the app is already installed

One example, which repros in Canary 73.0.3639.1

1. visit keep.google.com
2. open DevTools
3. click on the Application tab

What do you expect to see?

- A warning that the site is not installable: site has no service worker

What do you see instead?

- No warning in devtools

 
Description: Show this description
Thanks for filings these, I'll look into them. Few questions below:

- How do developers know about these? I'm seeing multiple conflicting requirements on the web. Any canonical documentation available that I can use to make my app installable?

- 'SW doesn't have a fetch handler' is interesting - I can see some canonical examples registering dummy listeners to work around it. Is that going to change?

- I'll drop the HTTPS and 'The app is already installed' ones because those are either redundant or not actionable. All I care is that it is installable.
- the start_url isn't within the scope of the manifest

Could you also elaborate on this one and point to where it is implemented?
Labels: -Type-Bug M-73 Type-Bug-Regression
> How do developers know about these? I'm seeing multiple conflicting requirements
> on the web. Any canonical documentation available that I can use to make my app
> installable?

Our documentation on this is at:
https://developers.google.com/web/progressive-web-apps/checklist

It's deliberately (for better or worse) non-exhaustive. We tell developers to run their site through Lighthouse and if the Lighthouse approves, then it's a PWA. If not, it might still pass the Chrome check, but we reserve the right to increase those checks. (Essentially, Lighthouse is the "gold standard", while Chrome implements a subset of that check.)

Thus, arguably, we don't need this check in dev tools, because we have Lighthouse to provide a stronger set of checks. I think the reason we wanted a feature in dev tools that shows you EXACTLY what Chrome is going to do is so developers have a "final sanity check" to make sure it will install in Chrome. Thus, if we're going to have this feature in dev tools (separate to Lighthouse), we need it to exactly match Chrome's check.

> 'SW doesn't have a fetch handler' is interesting - I can see some canonical
> examples registering dummy listeners to work around it. Is that going to
> change?

We plan to change this, yes. Sites that register a dummy fetch handler should not be considered installable, it's just very hard to precisely define what it means to have a non-dummy fetch handler. We plan to add new logic to Chrome's installability check and when we do that, we'd expect dev tools to match the new rules.

> I'll drop the HTTPS and 'The app is already installed' ones because those are
> either redundant or not actionable. All I care is that it is installable.

I agree about "the app is already installed" (we want to show developers the *static* properties of their site that would make it installable or not, not take into account the user's state). Why is HTTPS redundant? Do you mean if we made a SW check then HTTPS would be redundant?

> the start_url isn't within the scope of the manifest

This isn't really part of the installability check; rather we update the manifest scope to match the start_url if it isn't already within scope. I'm not sure if there are any errors that would need to surface here.

Note: Marking as a regression since before M-73 this wasn't misleading developers; now it is potentially confusing.
>> Marking as a regression since before M-73 this wasn't misleading developers; now it is potentially confusing.

Not sure how this is a regression, given that action used to do nothing and now it performs at least some validation with no false positives.
Bug reporters, don't be alarmed, I'm still up for C++ unification. I'd like to outline the UX for now - it is trivial to do on the front-end side.
Status: Fixed (was: Assigned)
To recap, this is the status of the checks. Note that there will be a backend-based follow up, but status below is here for the record:

[+] the site has no service worker
[+] there is a service worker, but the service worker doesn't have a fetch handler
[+] the start_url isn't within the scope of the service worker
[+] the document URL isn't within the scope of the service worker
[+] the icons in the manifest can't actually be fetched or decoded properly


[-] the start_url isn't within the scope of the manifest
  is not a part of installability check as per #4
[-] site isn't served over HTTPS
  secure origin is a subset of the SW check
[-] the app is already installed
  is not relevant for the DT-based check.

With those, I think it is fine to close this while leaving https://bugs.chromium.org/p/chromium/issues/detail?id=915945 open.

Please reopen the bug or let me know if there is still something missing.
Cc: phanindra.mandapaka@chromium.org
Labels: Needs-Feedback
As per comment #0, Tried testing this issue on Windows 10 on the mentioned chrome version 73.0.3639.1 by following the below steps.

0. Launched chrome 
1. visited keep.google.com
2. Opened DevTools
3. Clicked on the Application tab
As we have not seen warning in devtools
Attached is the screen cast for reference.

Pavel Feldman@ Request you to check and confirm if anything is missed from our end in verifying the issue and help us to verify the fix.

Thanks..!
915943.mp4
1.0 MB View Download

Sign in to add a comment