Home > Enterprise >  Everytime I run Angular I have a problem with the SSL why is that?
Everytime I run Angular I have a problem with the SSL why is that?

Time:11-27

In the past when I run Angular projects on my pc it was straight forward, but now every project I run give this kind of errors:

enter image description here

I know is the think is the lack of SSL certificate, but since I remember I've never had to add the SSL certificate to my projects in the past, and they don't mention it in the Angular tutorials, what happen is because the versions of Angular or maybe I change something in my pc and now I have to add it to every project I create?

CodePudding user response:

This might be a duplicate of ERR_SSL_PROTOCOL_ERROR not able to see https localhost pages in chrome browser.

But here you have two quick steps to validate:

  1. are you using HTTPS in the url? Is your url looking something like this: https://localhost:4200? If yes, change https with simple http and try again.

  2. if point no. 1 didn't help because you were already on http, try clearing all the data of the http://localhost:4200 (or the port you're using), including cache, local storage, session storage etc. This should do the trick (it did in my case).

  3. if you're on Windows, make sure that you don't have any aliases for localhost or 127.0.0.1 inside of the 'hosts' file (found at "C:\Windows\System32\drivers\etc\hosts").

Hope either of these will help you.

  • Related