0

I'm building a small app in Angular 2 using WebStorm.

When I press Alt+F2 to start the web on Chrome I get an error that my connection is not private and someone try to steal information from my localhost.

NET::ERR_CERT_AUTHORITY_INVALID.
This is the address: https://localhost:63342/angular2/index.html

Additional information: My firewall is not active and there is no antivirus installed.

npm -v is 2.14.12
node -v is 4.3.1
LazyOne
  • 158,824
  • 45
  • 388
  • 391
Stav Alfi
  • 13,139
  • 23
  • 99
  • 171
  • Looks like http://stackoverflow.com/questions/27608922/self-signed-ssl-cert-for-localhost-how-to-make-trusted – Günter Zöchbauer Feb 23 '16 at 18:06
  • The URL uses secure connection (`https` as protocol in your URL) and WebStorm does not provide any SSL certificate (AFAIK) for their built-in simple web server (it is what you are using). If it provides, it would be self signed. In both cases Chrome would be correct. **Possible solution:** change URL to use plain `http` – LazyOne Feb 23 '16 at 18:06
  • @LazyOne How do I do that? – Stav Alfi Feb 23 '16 at 18:18
  • Well ... please check where you are using that URL. It could be one of your Run/Debug Configurations (`Run | Edit Configurations...`). But it also could be taken from your Deployment entry (Check your Settings/Preferences screen -- search for `deployment` in search box). BTW -- does it work if you just change to http in browser address bar? – LazyOne Feb 23 '16 at 18:22
  • I couldnt find anywhere Https, only http. this is the adress in the config: _http_://localhost:63342/angular2/index.html – Stav Alfi Feb 23 '16 at 18:55
  • 1
    In such case I do not know where the `https` is taken from. The only other place I would look at is actual your app -- it can make such internal redirect. I suggest: clear browser cache (as much as you can: cookies etc); restart browser; open dev tools on network tab; type your URL with `http` in it -- see if it will be redirected to `https` one. If yes -- start looking -- was it server response or did it happen after page was loaded etc. – LazyOne Feb 23 '16 at 19:09
  • Try running your app by opening it outside of webstorm and see if you get the same error. – rgvassar Feb 23 '16 at 20:04
  • @LazyOne Thank you very much. Clearing browser cache was the missing part. – Stav Alfi Feb 23 '16 at 22:24

1 Answers1

0

For anyone struggle with this, follow kellen's solution. After that Use @LazyOne 's good advice and clear browser cache (All of it).

Community
  • 1
  • 1
Stav Alfi
  • 13,139
  • 23
  • 99
  • 171