-1

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?

R. Richards
  • 24,603
  • 10
  • 64
  • 64
armando t
  • 131
  • 1
  • 4
  • 13
  • First of all, angular and all the known technologies are being deployed on linux for real environments, so use with windows don't makes sense. How are you running the angular web on your localhost? Try it on a private browser window and sahre us the result. Also try on several browsers – JRichardsz Nov 27 '22 at 01:18

1 Answers1

0

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.

Mihai Paraschivescu
  • 1,261
  • 13
  • 12
  • When I change Https to Http, it automatically change to httpS when I hit enter, but why my question is because in the past it didn't happen, angular always has ran with https and everything was fine, I don't know if it automatic added SSL but if so, why it changed ? – armando t Nov 27 '22 at 01:22
  • 1
    By default, Angular doesn't start with the SSL activated, so it means that you have it manually configured to act like that. In this context, my best guess is that so far you were running it with a SSC (self signed certificate) that recently expired? – Mihai Paraschivescu Nov 27 '22 at 01:26
  • 1
    I have the Angular cli configured for running with SSL autmatic – armando t Nov 27 '22 at 02:20