Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Localhost sent an invalid response for my angular app

Tags:

I have a project in my local created with springBoot, java, jHipster, Angular, etc and I want to run it. Usually I have used mvnw to run the project. Now I changed computer so when running mvnw in cmd it says app running in https://localhost:8080 and when I go to this link I cannot have access to the app.

This is the message:

This site can’t provide a secure connection
localhost sent an invalid response.
Try running Windows Network Diagnostics.
ERR_SSL_PROTOCOL_ERROR

Maybe I need to install apache so I can access to the projects in localhost? I do not remeember if I had apache installed in my old pc wheer I could access to teh app.

I did netstat -ano | findstr 8080 in cmd and found in task manager that port 8080 is used by java.exe. Maybe it is a port issue? Thanks!

like image 700
coolest Avatar asked Oct 06 '18 10:10

coolest


3 Answers

You have to use the HTTP protocol instead, as you don't need to use a SSL Certificate.

Change it from:

https://localhost:8080 

To:

http://localhost:8080 

Then you should not have the error again.

like image 94
Jonathan Gagne Avatar answered Oct 19 '22 23:10

Jonathan Gagne


If changing to http does not work for you: in chrome, go to url: chrome://net-internals/#hsts

Under Delete domain security policies enter localhost or your problem domain and click the delete button on screen

like image 41
Gerrie Pretorius Avatar answered Oct 20 '22 00:10

Gerrie Pretorius


if you are opening in 'localhost' , then you have to provide http, because the local computer cannot provide a secure connection(https). so, try this....

like image 37
Yougendar Avatar answered Oct 19 '22 23:10

Yougendar