Kshitij Dhyani
Kshitij Dhyani

Reputation: 823

Live Server VScode: This page isn’t working 127.0.0.1 didn’t send any data. ERR_EMPTY_RESPONSE

I wanted to establish a live server , and quickly came across this extension.

After installing I clicked on the Go live button on right hand side corner.

A tabs automatically opens up in chrome browser , with this error message.

I have tried doing this , with no success.

enter image description here

Upvotes: 11

Views: 41066

Answers (3)

Kshitij Dhyani
Kshitij Dhyani

Reputation: 823

This worked for me ,

I found this solution on a Github issue thread over here.

Just simply tick the checkbox stating Use Local Ip in the settings of vscode.

enter image description here

this will use your local IP address
if You want 127.0.0.1 then Follow these steps :
Either you can change PORT no as sometimes the default 5500 port is occupied by some other service by just going to settings.json and add "liveServer.settings.port": [PORT_NO] (as it is with quotes)
you can add any port number as you want Example
"liveServer.settings.port": 5200 enter image description here

Upvotes: 43

S.SENTHILNATHAN
S.SENTHILNATHAN

Reputation: 21

It seems like another process is running on the same port as you're live-server extension is running.

Solution:

  • Go to Settings > extensions > live server config > settings:port option.
  • Choose edit in settings.json option.
  • In the json file change "liveServer.settings.port":<port_number> to the port number of your choice which is not in use by any other process.

Cause of the error:

  • As initially I said another process in the OS is currently running on the extxact port number as yours (here it's 5500).
  • To check whether the port is currently in use, enter the following command in the command prompt or Powershell:

telnet 127.0.0.0 5500

if there is no message or any other text is shown then it is used by another process. To check which process is using the port, use the following command:

netstat -anob

it will print informations of process using port numbers along with IP, check for 127.0.0.1 IP (i.e. localhost) and the 5500 port, you'll be able to find the process. Then check what process if couln't able to understand search for the same process in internet.

Upvotes: 0

Chandana_Akriti
Chandana_Akriti

Reputation: 91

yes, the above answer worked for me too. Steps to follow if You are a beginner like me:

  1. Click manage(it has an icon like setting).
  2. Select setting from the list.
  3. Select user and then expand Extension.
  4. Scroll down till you find Use local Ip and check if it is unchecked.
  5. Woohoo!! Test your live server, will work now.

Upvotes: 6

Related Questions