Unhandled Rejection (SecurityError): The operation is insecure. On a fresh create-react-app project

This problem seems to only happen in Firefox. Edge worked fine.

After creating the project, in index.js change:

serviceWorker.register();
//serviceWorker.unregister();

Still trying to figure whose fault this is, but this should get you going.


I had this error occur as well. Was able to clear it up by deleting the create-react-app serviceWorker.js file


Another solution found in the link in the answer by Niraj Niroula:

If you want to keep the Delete cookies and site data when Firefox is closed option enabled, click on the Manage Exceptions button and add localhost (with the protocol and port) to the exceptions list:

cookie and site data deletion exceptions