-
Notifications
You must be signed in to change notification settings - Fork 111
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
Getting offline functionalties to work in DevMode #137
Comments
are you using We haven't really spent much time making the plugin work in development other than ensuring the SW registers and stuff correctly. |
Thanks for your time! Do you know an alternative way than yarn dev or now dev to test Service Workers faster than with deploying the site with them every time? |
@Erik-Sovereign |
Thank you very much. I appreciate it. |
[UPDATE: this appears to be an issue on on Firefox on Linux] I am having the same issue - but it seems like it's in prod mode too? If I do a clean clone of the test example and build and This is in Firefox, on Ubuntu. [EDIT: I just tested https://jackhanford.com/ and I am seeing the same errors there too] |
@mrspeaker I'm not seeing those errors on my website in any browser (don't have access to Ubuntu) .. Can you share a screenshot of this happening on my website? |
@hanford - hmm, ok - it must be something in my Firefox then. I have my mac with me today and I'll see if I can figure out what it is. Here's what I get on your page (the warning is because I am blocking Segment.io, but I have white-listed everything else) [Update: Sorry, this appears to be a Firefox/Linux issue: I'll log a bugzilla bug] |
hey friends, going to close this in favor of #155 I'd like to prioritize this and if I have some downtime this seems like the biggest issue people have. |
Hello everyone,
I was trying out the example in next-offline/examples/now2/. I "yarn install" 'd it and deployed it with now. Offline functionalities worked just great!
It didn't work in dev mode though (yarn dev). The only change I made to the files, was adding "generateInDevMode" in next.config.js
Like this:
const nextConfig = { generateInDevMode: true, workboxOpts: { ...
The error thrown on localhost is:
SW registration failed: TypeError: "ServiceWorker script at http://localhost:3000/service-worker.js for scope http://localhost:3000/ encountered an error during installation."
I have the same problem in the project I'm working on. The service worker is registered when hosted with now but not in dev mode. I hope we can fix the issue for everyone in the example so that I can fix it in my project afterwards.
My question is what addtional steps do I have to take to get this to work in dev mode?
Another question is if the offline functionalities or more specific next-offline are generally expected to work in Dev Mode?
Thank you!
The text was updated successfully, but these errors were encountered: