Search code examples
angulargoogle-chromesslhttpslocalhost

Angular default app ng serve: privacy error in Chrome: NET::ERR_CERT_AUTHORITY_INVALID


I'm trying to follow this guide https://angular.io/guide/setup-local. I installed node.js and angular cli and build default app:

ng new my-app

Now i want to start app:

cd my-app
ng serve --open

It starts ok:

** Angular Live Development Server is listening on localhost:4200, open your browser on https://localhost:4200/ **
i 「wdm」: Compiled successfully.

But when i open page in Chrome it is privacy error

When i tried to open it in Firefox it all work great. I tried to start app with next command:

 ng serve --open --ssl true

Still the same error. Any help? At this point i don't need https, i just want to be able to open my app in Chrome.

+

I posted wrong error code. I get this: ERR_SSL_PROTOCOL_ERROR


Solution

  • open chrome://flags/#allow-insecure-localhost, enable this flag and restart chrome. Chrome will then ignore wrong certificates for localhost