pwa-builder / PWABuilder

The simplest way to create progressive web apps across platforms and devices. Start here. This repo is home to several projects in the PWABuilder family of tools.
https://docs.pwabuilder.com
Other
2.54k stars 273 forks source link

[BUG] Manifest and Service Worker not found when building with PWA Builder #4676

Closed Jtschwantes closed 3 months ago

Jtschwantes commented 4 months ago

What happened?

Hi! :)

Our PWA manifest and service worker isn't being found when using the PWA Builder web tool. Initially I thought something might be wrong with our manifest or service worker, but I'm able to successfully download and use the PWA myself, and the manifest and service worker are recognized by my chrome browser:

Here's the report card

image image

Here's the report card, it has nothing on it:

image

We also have a testing platform and for some reason that one works fine. You can change the 'www' to 'integration' in the url on the report card.

I'm hoping to package my app for Android but I can't get past this.

How do we reproduce the behavior?

1.) Go to https://www.pwabuilder.com/reportcard?site=https://www.familysearch.org/africa/ 2.) Notice there is no manifest or service worker found 3.) Go to https://www.familysearch.org/africa/ and inspect the page using the dev tools 4.) The service worker and manifest should be found by the browser just fine

What do you expect to happen?

I expect PWA Builder to be able to find my manifest and service worker if chrome can

What environment were you using?

OS: MacOS, Ventura 13.6, Browser: Chrome 121.0.6167.160 (Official Build) (arm64)

Additional context

Hopefully it's not a waste of time to look into this, I hope I'm not missing anything obvious that I should be doing

jgw96 commented 3 months ago

Hey @Jtschwantes , do yall have any kind of like cloudflare protection or any other similar setup on that app?

Jtschwantes commented 3 months ago

We use imperva, do you think that's preventing PWA Builder from seeing the service worker and manifest?

Jtschwantes commented 3 months ago

@jgw96 We have a WAF that is likely blocking it's requests I guess, is it possible to get user-agent or ip ranges or some other information so we can create an exception for the tool?

jgw96 commented 3 months ago

@Jtschwantes Yes that is what would be preventing PWABuilder from seeing the service worker and manifest. We actually do pass a special user agent, which looks like this "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.110 Safari/537.36 Edg/96.0.1054.57 PWABuilderHttpAgent" . That should fix it, so I'm going to close this issue for now, but please feel free to open a new issue if its still broken.