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.
,
Sep 4 2017
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" }
,
Sep 4 2017
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
,
Sep 14 2017
@luoe - an example of people wanting better console messages from the browser :)
,
Oct 31 2017
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.
,
Oct 31 2017
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.
,
Oct 31 2017
Specifying the supported formats would be a satisfactory resolution.
,
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
,
Oct 31 2017
Thanks so much for the quick fix, dominickn@! I've put you as owner for credit. |
||||||
►
Sign in to add a comment |
||||||
Comment 1 by sc00335...@techmahindra.com
, Sep 4 2017Labels: Needs-Triage-M60 Triaged-ET Needs-Feedback