When playing around with service workers in order to make a site a progressive web app I had to test it on my local dev environment. As service workers need to run on https and I use a self-signed certificate for development. This gave me the following error in the console in Chrome
ServiceWorker registration failed: DOMException: Failed to register a ServiceWorker: An SSL certificate error occurred when fetching the script.
The solution is to tell Chrome to accept the certificate even though it is insecure from Chrome’s point of view.