4

I am following the tutorial from https://angular.io/cli, but i am unable to connect to http://localhost:4200 after using the command ng serve from my command prompt.

The page returned the following error: This site can’t provide a secure connection, ERR_SSL_PROTOCOL_ERROR

The project is compiled successfully
  • I had tried allowing nodejs.exe and chrome.exe to in firewall
  • I disabled the Proxy Server From the (Settings -> Advance Settings -> Open Proxy Settings -> LAN settings)
  • I tried telnet cmd>telnet localhost 4200 (successful)
  • I tried connecting from internet explorer, it worked but there is no content in the webpage.

The following are executed within the windows command prompt following the tutorial:

C:\Users\Ufinity\Desktop\test-angular>ng serve

10% building 3/3 modules 0 activei 「wds」: Project is running at http://localhost:4200/webpack-dev-server/
i 「wds」: webpack output is served from /
i 「wds」: 404s will fallback to //index.html

chunk {main} main.js, main.js.map (main) 49.4 kB [initial] [rendered]
chunk {polyfills} polyfills.js, polyfills.js.map (polyfills) 264 kB [initial] [rendered]
chunk {runtime} runtime.js, runtime.js.map (runtime) 6.15 kB [entry] [rendered]
chunk {styles} styles.js, styles.js.map (styles) 9.71 kB [initial] [rendered]
chunk {vendor} vendor.js, vendor.js.map (vendor) 4.08 MB [initial] [rendered]
Date: 2019-09-05T09:55:54.613Z - Hash: 2c73ac9786af94e810bc - Time: 10587ms
** Angular Live Development Server is listening on localhost:4200, open your browser on http://localhost:4200/ **
i 「wdm」: Compiled successfully.

I should be able to connect to http://localhost:4200 and the page should display a welcome to test-angular page.

2 Answers 2

8
  1. Solution 1: Use incognito google chrome to go to http://localhost:4200

  2. Solution 2: Make sure you are not connected to any VPN:

    1. Go to developer tools Chrome 3 dots > More tools > Developer tools
    2. Right click on the refresh button > select > Empty Cache and Hard Reload
    3. Then type http://localhost:4200

Go to developer tools

Empty cache and hard reload

Enter http://localhost:4200

Sign up to request clarification or add additional context in comments.

1 Comment

Solution 1. worked -- I don't know how to use google chrome incognito mode, so, I used "Opera" web-browser with Incognito mode ( ALT+i ).
0

Check baseUrl: 'http://localhost:4200/' in protractor.config.js file

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.