Polymer Starter Kit – ERR_FILE_EXISTS when trying to enable service worker

Asked By: Anonymous

I am trying to follow the instructions from here to enable offline support (Service worker) in my polymer starter kit clone.

However, after making the changes in gulpfile.js, index.html and elements.html, I keep getting the following error whenever I refresh the page.
enter image description here

Also if I change the throttling setting to offline in Chrome Developer Tools and refresh, the page comes back with the “Unable to connect to the Internet” message so clearly the caching isn’t working.

Is there anything else that I need to do?

Update: Just decoded the url (i.e. http://localhost:5000/bower_components/platinum-sw/platinum-sw-register.html&clientsClaim=true&skipWaiting=true&version=1.0) in the error message and ran it in Chrome and got a 404 error. If I remove everything after .html then the file can be found though.


Solution

Answered By: Anonymous

I was having the same issue and turned out it’s because the platinum-sw-cache is set to disabled in the dev development, which means service worker will not work if you run

gulp serve

So to test the PSK offline, you need to call

gulp serve:dist

You can also ignore that ERR_FILE_EXISTS error as explained by @pirxpilot.

techinplanet staff

techinplanet staff


Windows 10 Kaufen Windows 10 Pro Office 2019 Kaufen Office 365 Lizenz Windows 10 Home Lizenz Office 2019 Home Business Kaufen windows office 365 satın al follower kaufen instagram follower kaufen porno