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

Issue 761682 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Oct 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 2
Type: Bug



Sign in to add a comment

Manifest add to homescreen icon size error is insufficiently specific

Reported by kpreid.s...@gmail.com, Sep 3 2017

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36

Steps to reproduce the problem:
1. Create a manifest including

    {"icons":[{"sizes":"144x144","src":"/client/icon/icon.svg","type":"image/svg"}]}

2. Click devtools → Application → Manifest → Add to homescreen

3. Observe error message in console

What is the expected behavior?
I get an error message with sufficient information to fix the manifest.

What went wrong?
I get this error message:

Site cannot be installed: a 144px square icon is required, but no supplied icon meets this requirement

even though the manifest specifies an icon suitable for 144px.

Did this work before? N/A 

Chrome version: 60.0.3112.113  Channel: stable
OS Version: OS X 10.11.6
Flash Version: 

In particular, if the problem is that SVG icons are not supported, as seems to be the case, the error message should specify what types are supported rather than implying that only the size is an issue.
 
Cc: sc00335...@techmahindra.com
Labels: Needs-Triage-M60 Triaged-ET Needs-Feedback
Tested the issue on 60.0.3112.113 and on latest canary 63.0.3205.0 on Ubuntu 14.04 , Mac 10.12.6 and Windows 7 is reproducible with below steps

Steps to reproduce:
1.Go to Youtube.com
2.Click devtools → Application → Manifest → Add to homescreen

Site cannot be installed: a 144px square icon is required, but no supplied icon meets this requirement error is seen on navigating

@ kpreid.switchb.org: Could you please confirm the above steps are the right way to reproduce this issue? If not, please provide sample test file to check this issue from chrome testing team.

Thanks!
I can confirm that your steps produce the same error message as my steps. However, in that case ( https://www.youtube.com/manifest.json ) there are no icons at all, so it is not a good example of the improvement I am looking for does not apply to it (the existing error message is fairly reasonable).

The following example manifest results in the error message "a 144px square icon is required, but no supplied icon meets this requirement" even though there is an icon with a specified size of 144px. It also meets all non-icon-related requirements.

{
  "background_color": "#2F2F2F",
  "display": "standalone",
  "icons": [
    {
      "sizes": "32x32",
      "src": "/client/icon/icon-32.png",
      "type": "image/png"
    },
    {
      "sizes": "any 144x144",
      "src": "/client/icon/icon.svg",
      "type": "image/svg"
    }
  ],
  "lang": "en-US",
  "name": "Example",
  "orientation": "any",
  "scope": "/",
  "serviceworker": {
    "scope": "/",
    "src": "/service-worker.js"
  },
  "start_url": "/",
  "theme_color": "#B9B9B9"
}

Project Member

Comment 3 by sheriffbot@chromium.org, Sep 4 2017

Labels: -Needs-Feedback
Thank you for providing more feedback. Adding requester "sc00335628@techmahindra.com" to the cc list and removing "Needs-Feedback" label.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Owner: l...@chromium.org
Status: Assigned (was: Unconfirmed)
@luoe - an example of people wanting better console messages from the browser :)

Comment 5 by l...@chromium.org, Oct 31 2017

Cc: dominickn@chromium.org
Components: Blink>AppManifest
Thanks for the report, and sorry for the late reply.

It looks like SVG mime-type icons are ignored in the app manifest.  It seems to allow only 'supported image types':
https://cs.chromium.org/chromium/src/third_party/WebKit/common/mime_util/mime_util.cc?dr=CSs&l=27

However examples on MDN and in the spec do show SVGs.
https://www.w3.org/TR/appmanifest/#icons-member
https://developer.mozilla.org/en-US/docs/Web/Manifest#icons

dominickn@, do you know whether SVGs are planned to be supported for app icons?

If not, perhaps we could update our console error text to docs with a list of supported image types.
Components: -Blink>AppManifest UI>Browser>WebAppInstalls
We are looking into SVG icon support, but it's not a high priority at the moment. For now we can add PNG to the error string to clarify the issue.
Specifying the supported formats would be a satisfactory resolution.
Project Member

Comment 8 by bugdroid1@chromium.org, Oct 31 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/388128a9765480d55f8198e2db9a798bbbbe30e9

commit 388128a9765480d55f8198e2db9a798bbbbe30e9
Author: Dominick Ng <dominickn@chromium.org>
Date: Tue Oct 31 03:26:43 2017

Clarify the console error when a PNG icon is not available for add to homescreen.

BUG= 761682 

Change-Id: I6eff6704ad19ddf9d3aa5b2167af12d9e643b044
Reviewed-on: https://chromium-review.googlesource.com/745684
Reviewed-by: Ben Wells <benwells@chromium.org>
Commit-Queue: Dominick Ng <dominickn@chromium.org>
Cr-Commit-Position: refs/heads/master@{#512731}
[modify] https://crrev.com/388128a9765480d55f8198e2db9a798bbbbe30e9/chrome/browser/installable/installable_logging.cc

Comment 9 by l...@chromium.org, Oct 31 2017

Cc: -dominickn@chromium.org l...@chromium.org
Owner: dominickn@chromium.org
Status: Fixed (was: Assigned)
Thanks so much for the quick fix, dominickn@!  I've put you as owner for credit.

Sign in to add a comment