ritwickdey / vscode-live-server

Launch a development local Server with live reload feature for static & dynamic pages.
https://ritwickdey.github.io/vscode-live-server
MIT License
5.58k stars 1.2k forks source link

live server not reloading automatically #452

Open hillar10n opened 5 years ago

hillar10n commented 5 years ago

I'm submitting a...


[x] Regression (a behavior that used to work and stopped working in a new release)
[x] Bug report  <!-- Please search GitHub for a similar issue or PR before submitting -->
[ ] Feature request
[x] Documentation issue or request

## Current behavior

live server not reloading automatically

## Expected behavior

it reload without manually reloading the browser

## Environment

```html
Browser:

- [x] Chrome (desktop) version 
- [x] Firefox version 

For Tooling issues:

- Live Server: 5.6.1
- Platform:  Windows
- Visual Studio Code: 1.33.1
hillar10n commented 5 years ago

Can anybody please answer me???

pordemoni commented 5 years ago

Same goes for me. I noticed it recently. Live server would serve the file in the browser, but it would not refresh the browser automatically upon saving the file.

What I've tried:

pordemoni commented 5 years ago

SOLVED

In my case: I had my HTML file inside a folder, which name starts with a period .

Don't do this 👇

http://127.0.0.1:5500/.folder/index.html

alfarians commented 5 years ago

I'm experiencing the same problem here. I think the recent VSCode update made it unworking as expected. Before updating, it worked well.

jeffus07 commented 5 years ago

I'm experiencing the same problem here. I think the recent VSCode update made it unworking as expected. Before updating, it worked well.

Yes, the recent update has broken it

eletitos commented 5 years ago

Hi, I have the same problems. Auto-refreshing isn´t working.

My enviroment: Windows 10. VSCode 1.35.1 (I have also tried in 1.34 and it didn't work either) Live server: 5.6.1 Browser: Chrome aor Firefox (I have tried in both of them)

I have tried re-installing, and deleting the files from extension file for a completed resetting. Any solution?

dijiflex commented 5 years ago

I too have the same problem . Live reload not working

Chrome Version: 75.0.3770.100 (Official Build) (64-bit) Vscode version 1.36 Live server version 5.6.1

stevekb commented 4 years ago

I had the same issue and my problem was that my html file wasn't encoded in utf8

ghost commented 4 years ago

I had the same issue. Until now, i couldn't figure out what's the problem. My environment: Windows 10 Chrome Version: 76.0.3809.100 (Official Build) (64-bit) VSCode 1.36.1 Live Server 5.6.1

So far, it's been a random occurrence for me when i encounter this "page doesn't reload automatically". I sometimes have it working after i click save, but only after a couple of minutes until the "auto-reload" doesn't work anymore. When i restarted my computer, it's a 50/50 chance that LiveServer will work correctly. Right now, i dont have a reliable solution as what may causing this problem. I think it could be my Windows 10, but i don't know how to check it.

anemish1996 commented 4 years ago

Make sure to save your workspace configuration then it will work.

ghost commented 4 years ago

Having the same problem after updating to 1.37.1, tried deleting ritwickdey.liveserver-5.6.1 from C:\Users\USERNAME\extensions\ritwickdey.liveserver-5.6.1, and re-installing VS CODE, but not working yet as well.

donnyv commented 4 years ago

It only refreshes after I save the doc for me.

positesitesite commented 4 years ago

It only refreshes after I save the doc for me.

Had the same issue. Was solved by changing autosave option in setting to afterDelay.

StarBright3 commented 4 years ago

Make sure meta charset = "UTF-8" is in the head.

moghaazi commented 4 years ago

Make sure meta charset = "UTF-8" is in the head.

Worked For Me, Thanks Man

tyler-ray commented 4 years ago

Works on my work computer, not my personal computer. , refreshed, reloaded, uninstalled & re-installed several different ways. Still not auto-refreshing. Console says "live reload enabled"... I've narrowed my open folders to just one,...

tjbulick commented 4 years ago

I had the same issue and my problem was that my html file wasn't encoded in utf8

thanks bro, it worked

jefflundberg commented 4 years ago

I was having the same issue.

It seems to work fine if I open a specific file with Live Server by either the Ctrl-Shift-P Command Pallet, Right-click menu, or Alt-L Alt-O key command. It doesn't work properly if I start Live Server by clicking "Go Live" in the status bar at the bottom.

Hope this helps someone!

kottuzik commented 4 years ago

I was having the same issue.

It seems to work fine if I open a specific file with Live Server by either the Ctrl-Shift-P Command Pallet, Right-click menu, or Alt-L Alt-O key command. It doesn't work properly if I start Live Server by clicking "Go Live" in the status bar at the bottom.

Hope this helps someone!

This really works.

vronney commented 4 years ago

Anyone able to get Live Server to update in Chrome?

kottuzik commented 4 years ago

Mine is working.

On Tue, Dec 24, 2019, 20:32 Ronney Vargas notifications@github.com wrote:

Anyone able to get Live Server to update in Chrome?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/ritwickdey/vscode-live-server/issues/452?email_source=notifications&email_token=AGIN2DIXLPG5S34G3ZF2Y53Q2JITLA5CNFSM4HISWZDKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEHTQP3Y#issuecomment-568788975, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGIN2DNZ4VHVWVRB2UEKIWLQ2JITLANCNFSM4HISWZDA .

Python-Test-Engineer commented 4 years ago

I really like this extension and have used it for a long time. Tonight it does not reload and I need to a hard refresh to get current page.

Reinstalled and checked for updates to no avail.

Would love to get it back working as I really like it!

Thanks for all the work you have put in.

Craig

ArrestedMango commented 4 years ago

Was having the same issue. Looks like it was as simple as how I was opening the file. When I go to File > Open Folder, it seems to work every time. When I open the individual files, it doesn't work. This thread was the key, Thank you!

hcientist commented 4 years ago

I just found this, and then randomly at the same time I noticed a notification in vscode telling me that live reload isn't possible without head and body (I was editing a file that's just an html fragment)

sonicemma commented 4 years ago

I've been having the issues on two different computers, both using Windows 10.

Both times, my CSS file was not updating. My html file was updated, but oddly enough, not CSS.

This was fixed by hard refreshing to show changes.

sntoshx commented 4 years ago

There's one thing that resolves the issue. • Open settings. • Search for 'autosave'. • Set it to 'afterDelay'. • Just below that, set the AutoSaveDelay to anything very less like 5 (I have set it to 1) • Now search for 'Wait' in settings. • In LiveServer > Settings:Wait, set the value very low (e.g. 3). This should help regardless of platforms :)

ceign commented 4 years ago

SOLVED I have the same problem, like @pordemoni , the name of my folder starts with '#', change the start character for a letter and the problem was solved.

yuri117 commented 4 years ago

@yednaphsotnas Thanks, dude.

10times-remote commented 4 years ago

I NGINX server and able to load my website using proxy, but it does reload if i make change & save in a html.twig file. Please help!

wilsonrg commented 4 years ago

Live Server nĂŁo atualiza apĂłs salvar arquivo html via vscode

VersĂľes:

Tentativas de reparo:

AlguÊm tem uma solução por favor?

lchugh74 commented 4 years ago

There's one thing that resolves the issue. • Open settings. • Search for 'autosave'. • Set it to 'afterDelay'. • Just below that, set the AutoSaveDelay to anything very less like 5 (I have set it to 1) • Now search for 'Wait' in settings. • In LiveServer > Settings:Wait, set the value very low (e.g. 3). This should help regardless of platforms :)

This worked for me.. thanks 💃

icematthews commented 4 years ago

Was having the same issue. Looks like it was as simple as how I was opening the file. When I go to File > Open Folder, it seems to work every time. When I open the individual files, it doesn't work. This thread was the key, Thank you!

Thanks this works

wilsonrg commented 4 years ago

Meu Live Server voltou a funcionar após instalar outro plugin chamado Live Server Preview Instalei, reiniciei o VSCode e testei o Live Server que funcionou corretamente. Espero que outras pessoas possam ser ajudadas com esta solução estranha assim como eu fui.

nandacosta-dev commented 4 years ago

Meu Live Server voltou a funcionar após instalar outro plugin chamado Live Server Preview Instalei, reiniciei o VSCode e testei o Live Server que funcionou corretamente. Espero que outras pessoas possam ser ajudadas com esta solução estranha assim como eu fui.

O meu nĂŁo funcionou de jeito nenhum. nĂŁo atualiza sozinho como deveria ser.

sicilmedia commented 4 years ago

For those of you that are still having this problem, there could be some conflicts with some browser extensions you may have installed on your browser. To rule this out you can open your project on a private/incognito browser tab, which by default should disable extensions. Another issue that may arise is when you're using a content security policy (CSP) which is set to block inline scripts. Hope this helps.

Go3shom commented 4 years ago

SOLVED

In my case: I had my HTML file inside a folder, which name starts with a period .

Don't do this 👇

http://127.0.0.1:5500/.folder/index.html

Same here but mine was #folderName

GabrielNicolasAvellaneda commented 4 years ago

Looks like that live server fails to refresh if you have some issue with your html. In my case I had a silly mistake, I had a self-closing script tag <script src="index.js" />. Which Chrome recognized and properly loaded the javascript file but Live Server didn't

wmilambiling commented 4 years ago

guilty as charged! this worked for me.

mdrasheduzzamanakash commented 4 years ago

make sure you have written html code with html tag not just body elements. Sometimes it doesn't work without proper html format.

elspnm commented 4 years ago

with windows 7 and recent chrome v81 works fine but in windows 10 it is not launching the browser. Tried to run with compatibility mode still not launching.

Only shows port info but browser not opening at all

Chi-coder commented 4 years ago

This is so frustrating especially for a beginner trying to get a grasp on things. The extension suddenly stopped working. I've deleted, reinstalled, followed the settings doc to configure the extension in settings.json but nothing. Clearly there's something interfering with the software running in the browsers, because right in the console it shows the Live Server icon and even runs but doesn't open the browsers. 🤦🏽‍♂️ 15899222299953776176068150227381 15899223855033952867499278097342

Darkmift commented 4 years ago

Pretty sure its safe to say this repo is no longer maintained by the creator.

MarkTRoss commented 4 years ago

In my case, I did have it under a path called Notes and moving it out made not difference. I did'ht have the html/head/utf-8 set as I was only play with code and below fix it. (added space after < so I could post the code)_

< !doctype html> < html> < head> < meta charset="utf-8"> .. .. < /head> < /html>

Sh-4d0w commented 4 years ago

There's one thing that resolves the issue. • Open settings. • Search for 'autosave'. • Set it to 'afterDelay'. • Just below that, set the AutoSaveDelay to anything very less like 5 (I have set it to 1) • Now search for 'Wait' in settings. • In LiveServer > Settings:Wait, set the value very low (e.g. 3). This should help regardless of platforms :)

This solved my problem! Thank you so much.. I've been trying to find a solution for a while now.. After i changed the following settings it works like magic for me auto reloading.. Thanks!

timjanssens commented 4 years ago

When i start the live server with windows i am able to see the changes. When i switch to remote-WSL the site doesn't update anymore when i save. Going back to "reopen folder in Windows" and the site is updating again. Any solution for this?

bartek-swiderski92 commented 4 years ago

I never could get autorefresh to work, tried opening through 'Go Live button, RMB, changing VSC settings to autosave auto delay, changing liveserver delay to 5, (html already in utf-8) nothing has worked, I always had to refresh it manually in the browser.

Problem was Firefox, when I tried in chrome, everything works as it supposed to be, not sure where the problem is though...

noobato1 commented 4 years ago

SOLVED (For me at least)

In settings search for "useWebExt" en check you DON'T have it enabled. I just unchecked this and now it's working!

marjantaskov commented 4 years ago

@noobato1 thank you bro, thanks for help, I LOVE YOU <3!

deramirez1 commented 3 years ago

I was able to fix this by changing to a different distros. I was running WSL2-Ubuntu 20.04 with another workspace. I had switched workspaces to start another project but I was stilling running on the WSL distro. Steps I took to change it:

AleZerbini commented 3 years ago

SOLVED (for me at least)

I installed the Live Server Chrome extension in my browser, enabled the Live Reload setting and reloaded the page once. From that moment on, the automatic reload started working! Hope it helps!