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.69k stars 282 forks source link

PWABuilder reports error that I can't reproduce with any browser. #2195

Closed surferjeff closed 2 years ago

surferjeff commented 2 years ago

Describe the bug PWABuilder reports:

Test results could not be gathered for http://freesplit.app because TypeError: t.service_worker[0] is undefined

URL to app The URL to the app that we can use to reproduce this issue.

https://freesplit.app/

To Reproduce

Visit https://www.pwabuilder.com/testing?site=http://freesplit.app

Expected behavior I expect pwabuilder's tests to pass.

Additional info (please complete the following information):

ghost commented 2 years ago

Hello surferjeff, thank you for opening an issue with us!

I have automatically added a "needs triage" label to help get things started. Our team will investigate the issue and help solve it ASAP. Other community members may also look into the issue and provide feedback 🙌

jgw96 commented 2 years ago

Hey @surferjeff , when is this error message popping up? I was able to go all the way to the report card page with your PWA, where I see you have a manifest and service worker.

surferjeff commented 2 years ago

The error message pops up about 3 seconds after I click on the link. I tried again now: image

JudahGabriel commented 2 years ago

Maybe occurs only on Mac? Let me try to repro on my Mac with Safari and Chrome.

jgw96 commented 2 years ago

Thanks @JudahGabriel ! Maybe its Safari specific

JudahGabriel commented 2 years ago

I'm unable to repro. It works for me on Mac Safari and Mac Chrome. 🤷‍♀️

@surferjeff are you able to consistently hit this issue?

JudahGabriel commented 2 years ago

I see some places in the code where this could potentially happen. Submitting a PR to fix those momentarily.

surferjeff commented 2 years ago

Thanks @JudahGabriel ! Maybe its Safari specific

I haven't tried it with Safari. My earlier screenshots and error messages were with Firefox.

I tried the same link with Chrome on Mac OS now, and I see a different error: image

surferjeff commented 2 years ago

I'm unable to repro. It works for me on Mac Safari and Mac Chrome. 🤷‍♀️

@surferjeff are you able to consistently hit this issue?

Yes, it happens every time I visit https://www.pwabuilder.com/testing?site=http://freesplit.app. I tried again now and saw the same result.

JudahGabriel commented 2 years ago

Ah. The issue is that you have an HTTP (not HTTPS) address listed in the URL.

When that happens, we punt early...but didn't properly check for results later.

This is fixed as part of https://github.com/pwa-builder/PWABuilder/pull/2200. Once that's merged, the issue will be fixed.

surferjeff commented 2 years ago

Thank you @JudahGabriel! I switched it to https:, and it works!