Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

5.0.0: Issues on Chrome 95 #725

Closed
frederikhors opened this issue Oct 28, 2021 · 4 comments
Closed

5.0.0: Issues on Chrome 95 #725

frederikhors opened this issue Oct 28, 2021 · 4 comments
Labels
bug Something isn't working released

Comments

@frederikhors
Copy link

Describe the bug
Updating today from 4 to 5 and using the below simple command gives a manifest that Chrome 95 doesn't like:

image

To Reproduce
Steps to reproduce the behavior:

  1. npx pwa-asset-generator ./src/icons/icon.svg ./static/icons/ --index ./src/index.html --manifest ./static/manifest.json --type png --icon-only --favicon --padding false

Generates this manifest.json:

{
  "name": "MyApp",
  "description": "MyApp",
  "short_name": "MyApp",
  "start_url": ".",
  "display": "standalone",
  "background_color": "#ffffff",
  "theme_color": "#333333",
  "icons": [
    {
      "src": "images/icons/manifest-icon-192.maskable.png",
      "sizes": "192x192",
      "type": "image/png",
      "purpose": "maskable"
    },
    {
      "src": "images/icons/manifest-icon-512.maskable.png",
      "sizes": "512x512",
      "type": "image/png",
      "purpose": "maskable"
    }
  ]
}

Expected behavior
I would like to have a default configuration to follow for no issues in Chrome.

System (please complete the following information):

  • OS: win 10
  • node version: 14
  • npm version: 8.1.1
  • cli version: 5.0.0
@frederikhors frederikhors added bug Something isn't working needs verification Bug needs to be verified with reproduction labels Oct 28, 2021
@mattostanik
Copy link

I had the same issue today. I changed purpose to "any maskable" in my manifest and that resolved the issue. But Chrome does now give me a warning that "any maskable" is discouraged.

@frederikhors
Copy link
Author

I fixed it writing manually an entri in manifest icons array for any only. It should be create automatically I think.

@onderceylan onderceylan removed the needs verification Bug needs to be verified with reproduction label Nov 7, 2021
@onderceylan
Copy link
Collaborator

Thanks for reporting this issue. As of latest changes on Chrome and Lighthouse audits,

  • maskable any value is not recommended anymore.
  • There should be at least one icon with the any purpose, or without the purpose altogether
  • There should be at least oen icon with the maskable purpose

I'm working on a change to reflect this requirements update.

onderceylan added a commit that referenced this issue Nov 7, 2021
Chrome and Lighthouse audits expect both icons with any and maskable purposes to be present in the
manifest file.

BREAKING CHANGE: In addition to 2 icons with `maskable` purpose in the manifest file, 2 more icon
entries of the same icons with `any` purpose is added to the manifest output.

fix #725
@onderceylan onderceylan mentioned this issue Nov 7, 2021
onderceylan pushed a commit that referenced this issue Nov 7, 2021
# [6.0.0](v5.0.1...v6.0.0) (2021-11-07)

### Bug Fixes

* **main:** add both 'any' and 'maskable' icons to manifest by default ([d7b488d](d7b488d)), closes [#725](#725)
* **main:** fix wrong icons file name when 'pathOverride' option is used ([25cef00](25cef00)), closes [#723](#723)

### BREAKING CHANGES

* **main:** In addition to 2 icons with `maskable` purpose in the manifest file, 2 more icon
entries of the same icons with `any` purpose is added to the manifest output.
@onderceylan
Copy link
Collaborator

🎉 This issue has been resolved in version 6.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working released
Projects
None yet
Development

No branches or pull requests

3 participants