adobe / brackets

An open source code editor for the web, written in JavaScript, HTML and CSS.
http://brackets.io
MIT License
33.25k stars 7.63k forks source link

Launching Live Preview just after Brackets start uses file:/// protocol #8755

Open marcelgerber opened 10 years ago

marcelgerber commented 10 years ago
  1. Start Brackets, open "Getting started" Project, and restart Brackets (you may restart it without extension as well)
  2. Quickly launch Live Preview and wait for the window to load
  3. Open Brackets' DevTools (F12) then

Result: The browser window uses the file:/// protocol. Therefore, pushing changes won't work. There is at least one error logged in the console. Expected: The Live Preview should use the Live Preview server.

redmunds commented 10 years ago

@MarcelGerber How quickly do you have to do step 2? It sounds like the nodejs server has not yet started because the fall-back is to open page with file:// protocol.

marcelgerber commented 10 years ago

Guess it's 5 to 15 seconds. But even if the node server isn't started yet, we can still do something better (like a longer waiting time). And btw, this issue causes a console.error that we can probably avoid.

redmunds commented 10 years ago

I am not sure if we can tell the difference between "nodejs server is still initializing" and "nodejs server is down" cases. We might just need to document this in Troubleshooting page.