Skip to content

Doesn't create a valid PWA by default #4339

Closed
@corysimmons

Description

@corysimmons

Is this a bug report?

Yes

Did you try recovering your dependencies?

Yes

Which terms did you search for in User Guide?

  • lighthouse
  • pwa

Environment

  1. node -v 8.11.1:
  2. npm -v 5.6.0:
  3. npm ls react-scripts (if you haven’t ejected): 1.1.4

Then, specify:

  1. Operating system: macOS High Sierra
  2. Browser and version (if relevant): Chrome 65

Steps to Reproduce

Fresh CRA + Netlify w/ HTTPS ==> Lighthouse === not a valid PWA.

(Write your steps here:)

  1. create-react-app foo --use-npm
  2. Push app to Github
  3. Have Netlify manage it
  4. Associate with domain
  5. Use Netlify to generate Let's Encrypt cert
  6. Set "Deploy Settings" to "Build command: npm run build" and "Publish Directory: build"
  7. Verify site works/exists on https
  8. Run Lighthouse PWA audit
  9. See errors:

image

Here's the demo code (fresh CRA): https://github.com/corysimmons/test-cra-pwa-netlify/tree/55643ddf023d2eb4b267ca72f568268752ea398a

Here's the site: https://testing-1-2-3.com

The image sizes are easy enough for me to fix (although they should be in CRA tbh), but the Service worker does not successfully serve the manifest's start_url. confuses me.

I've tried changing the start_url to:

  • ./index.html
  • ./
  • .
  • index.html
  • https://testing-1-2-3.com
  • ./build
  • ./build/index.html

...and keep getting the same failure.

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions