-
-
Notifications
You must be signed in to change notification settings - Fork 26.8k
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
Service Worker Bug in Production, works in dev. #3516
Comments
You're seeing this because Back when service worker generation was added to this project, I'm fairly positive that I'm going to take a look through https://github.com/zeit/serve/releases and https://github.com/pillarjs/send/releases (which appears to handle the HTTP communications under the hood) to figure out when this behavior changed, and whether it was intentional. If |
It looks like this is due to There are a few different options:
|
Thank you so much for looking into it! |
Is this a bug report?
Yes
Can you also reproduce the problem with npm 4.x?
Yes
Environment
node -v
: 8.2.1npm -v
: 4.6.1yarn --version
(if you use Yarn): 1.2.1npm ls react-scripts
(if you haven’t ejected): emptyOperating system: Windows 10 Pro Insider Preview Build 17025 64Bit
Browser and version (if relevant): Chrome: 62.0.3202.94 Firefox: 57.0
Steps to Reproduce
(Write your steps here:)
npm run build
oryarn build
localhost:5000
in ChromestaticCacheName
variable inbuild/sw.js
and reload page in chromeExpected Behavior
Expected the new Service Worker to be "waiting to activate" in Chrome Dev Tools Application tab.
Actual Behavior
New Service Worker is quickly flashing up as installing but vanishes again shortly after.
Additional Information
Doing the same steps leads to the intended behaviour in Firefox.
If I hit Update in Chrome Dev Tools application tab, the App works as expected.
Editing the file in the
public
folder while in dev mode leads to the intended behaviour in Chrome after hot reload, too.The text was updated successfully, but these errors were encountered: