Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

like image 274
Kngh2 Avatar asked Dec 16 '19 08:12

Kngh2


People also ask

Why does Chrome say certificate is invalid?

Chrome displays these errors if some security codes are missing and the website is running with an outdated SHA algorithm or system's TLS version is outdated. Know how to solve This web page is not available and ERR_SSL_VERSION_OR_CIPHER_MISMATCH errors.

How to fix “net::err_CERT_authority_invalid” error in chrome?

Sometimes, the corrupted Chrome cache can cause the “NET::ERR_CERT_AUTHORITY_INVALID” issue. So, you can try clearing it to fix the problem. Here is a guideline below for you. Step 1: In the Chrome page, press Ctrl + Shift + Delete keys at the same time to open the Clear browsing data window.

How to fix invalid certificate authority error in Google Chrome?

Contact the website admin To permanently fix the Invalid Certificate Authority error you need to contact the website admin to re-install the SSL Certificate of a valid Certificate Authority. 2. Update your Google Chrome

How do I serve my angular application over HTTPS?

You should now be able to serve your Angular application locally over HTTPS using your own trusted self-signed certificate. This is a nifty and handy feature to have at your disposal. My personal preference is to use the config file to contain my private key and certificate paths, and then enable SSL on demand.

What is Ng serve in angular?

ng serve ng serve is a dedicated development server prepackaged within the Angular CLI. It provides a great deal of functionality to make your development process smoother.


1 Answers

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

like image 58
Andrei Avatar answered Oct 29 '22 21:10

Andrei