Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.

Live Preview Suddenly Stopped Working #11653

Closed
ysbordain opened this issue Sep 1, 2015 · 7 comments
Closed

Live Preview Suddenly Stopped Working #11653

ysbordain opened this issue Sep 1, 2015 · 7 comments

Comments

@ysbordain
Copy link

It was working fine and suddenly I started getting the attached "Connecting to Browser" errors and Chrome launches 'file:///C:/Program%20Files%20(x86)/Brackets/www/LiveDevelopment/launch.html' that hangs at "Waiting".

I have uninstalled and reinstalled Brackets and every folder related to it.
I have rebooted my PC several times.

The live preview base URL is http://localhost/Getting%Started/.
I am running Brackets Release 1.4 build 1.4.0-16380 (release 273804e).
I am running Chrome Version 44.0.2403.157 m.

I have read the Troubleshooting page and, frankly, it doesn't help me much. The instructions are, at best, ambiguous.

Please help!

live preview connecting

connecting to browser

@redmunds
Copy link
Contributor

redmunds commented Sep 1, 2015

@ysbordain

I have read the Troubleshooting page and, frankly, it doesn't help me much. The instructions are, at best, ambiguous.

Thank you for finding and going through the Troubleshooting page. Many people don't even make it that far before asking for help.

Live Preview is a complex feature and many contributors (including myself) have put a lot of time trying to put all of our knowledge in the Troubleshooting page, so please don't dismiss it so quickly. Please list any particular items in the Troubleshooting page that you don't understand and we'll try to help you (and improve the doc).

Also, search through Brackets Closed Issues for many discussions on the same topic.

Note that you'll may get more responses in brackets-dev forum.

@ysbordain
Copy link
Author

Thank you for your fast response.

Would you like me to list the links that I have gone to and what I did?

@ysbordain
Copy link
Author

Hi.

Perhaps these errors in "Show Developer Tools" will help?

Error watching project root: C:/Program Files (x86)/Brackets/samples/root/Getting Started/ Max connection attempts reached/project/ProjectManager.js:751 (anonymous function)
/./ims/IMSProxy.js:30 Max connection attempts reached/./ims/IMSProxy.js:30 (anonymous function)
/utils/NodeConnection.js:89 WebSocket connection to 'ws://localhost:64488/' failed: Error in connection establishment: net::ERR_CONNECTION_TIMED_OUT
http://127.0.0.1:9222/json Failed to load resource: net::ERR_CONNECTION_TIMED_OUT
/utils/NodeConnection.js:89 WebSocket connection to 'ws://localhost:64488/' failed: Error in connection establishment: net::ERR_CONNECTION_TIMED_OUT
http://127.0.0.1:9222/json Failed to load resource: net::ERR_CONNECTION_TIMED_OUT
/utils/NodeConnection.js:89 WebSocket connection to 'ws://localhost:64488/' failed: Error in connection establishment: net::ERR_CONNECTION_TIMED_OUT
http://127.0.0.1:9222/json Failed to load resource: net::ERR_CONNECTION_TIMED_OUT
2/utils/NodeConnection.js:89 WebSocket connection to 'ws://localhost:64488/' failed: Error in connection establishment: net::ERR_CONNECTION_TIMED_OUT
http://127.0.0.1:9222/json Failed to load resource: net::ERR_CONNECTION_TIMED_OUT
/utils/NodeConnection.js:89 WebSocket connection to 'ws://localhost:64488/' failed: Error in connection establishment: net::ERR_CONNECTION_TIMED_OUT
http://127.0.0.1:9222/json Failed to load resource: net::ERR_CONNECTION_TIMED_OUT
/utils/NodeConnection.js:89 WebSocket connection to 'ws://localhost:64488/' failed: Error in connection establishment: net::ERR_CONNECTION_TIMED_OUT
73/utils/NodeConnection.js:89 WebSocket connection to 'ws://localhost:64488/' failed: WebSocket opening handshake timed out
/LiveDevelopment/LiveDevelopment.js:1180 Uncaught TypeError: Cannot read property 'reject' of null
http://127.0.0.1:9222/json Failed to load resource: net::ERR_CONNECTION_TIMED_OUT
3http://127.0.0.1:9222/json Failed to load resource: net::ERR_CONNECTION_REFUSED
http://127.0.0.1:9222/json Failed to load resource: net::ERR_CONNECTION_TIMED_OUT
/LiveDevelopment/LiveDevelopment.js:1180 Uncaught TypeError: Cannot read property 'reject' of null
5http://127.0.0.1:9222/json Failed to load resource: net::ERR_CONNECTION_TIMED_OUT
/LiveDevelopment/LiveDevelopment.js:1180 Uncaught TypeError: Cannot read property 'reject' of null
5http://127.0.0.1:9222/json Failed to load resource: net::ERR_CONNECTION_TIMED_OUT
/LiveDevelopment/LiveDevelopment.js:1180 Uncaught TypeError: Cannot read property 'reject' of null
5http://127.0.0.1:9222/json Failed to load resource: net::ERR_CONNECTION_TIMED_OUT
/LiveDevelopment/LiveDevelopment.js:1373 Uncaught TypeError: Cannot read property 'promise' of null
/project/ProjectModel.js:500 Unhandled exception in getAllFiles handler: TypeError: Cannot read property 'done' of null TypeError: Cannot read property 'done' of null
at _doLaunchAfterServerReady (/LiveDevelopment/LiveDevelopment.js:1248:22)
at Object.eval (/LiveDevelopment/LiveDevelopment.js:1366:21)
at j (file:///C:/Program%20Files%20(x86)/Brackets/www/thirdparty/thirdparty.min.js:559:26911)
at Object.k.add as done
at Object.eval (/LiveDevelopment/LiveDevelopment.js:1365:18)
at j (file:///C:/Program%20Files%20(x86)/Brackets/www/thirdparty/thirdparty.min.js:559:26911)
at Object.k.fireWith as resolveWith
at Object.e.(anonymous function) (file:///C:/Program%20Files%20(x86)/Brackets/www/thirdparty/thirdparty.min.js:559:28704)
at Object. (file:///C:/Program%20Files%20(x86)/Brackets/www/thirdparty/thirdparty.min.js:559:28280)
at j (file:///C:/Program%20Files%20(x86)/Brackets/www/thirdparty/thirdparty.min.js:559:26911)
2http://127.0.0.1:9222/json Failed to load resource: net::ERR_CONNECTION_TIMED_OUT
/LiveDevelopment/Inspector/Inspector.js:264 GET http://127.0.0.1:9222/json net::ERR_CONNECTION_TIMED_OUT
/LiveDevelopment/Inspector/Inspector.js:264 GET http://127.0.0.1:9222/json net::ERR_CONNECTION_TIMED_OUT

@redmunds
Copy link
Contributor

redmunds commented Sep 1, 2015

Would you like me to list the links that I have gone to and what I did?

Start with the items that you thought were "ambiguous".

Error watching project root: C:/Program Files (x86)/Brackets/samples/root/Getting Started ...

I'm not sure why you can't watch the root of the Getting Started project. Maybe because you are not an admin? Use File > Open Folder... to select the root folder of one of your own projects and see if Live Preview works there. If you don't have a project handy, try copying the Getting Started folder to somewhere that you have access.

@ysbordain
Copy link
Author

List of what I have tried:

  1. Uncheck the "Continue running background apps when Google Chrome is closed" setting

From https://groups.google.com/forum/#!topic/brackets-dev/fcKT12m1xLU

  1. Go to command prompt. Run chrome with this command
    "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe --args --enable-remote-debugger --remote-debugging-port=9222"

From #9188

  1. If you specified a "Base URL," make sure your local server is already running - Brackets will not start it for you.

From #9990
In my case, I am not using a local server (at least I don't think so―how do I verify?). The base server is blank.

  1. Created a new .html file in the directory C:\Users\ycbordai\js\Bootstrap. Got the following errors:
    Failed to load resource: net::ERR_CONNECTION_TIMED_OUT
    /filesystem/FileSystem.js:896 Failed to watch root: C:/Program Files (x86)/Brackets/samples/root/Getting Started/ Max connection attempts reached
    /project/ProjectManager.js:751 Error watching project root: C:/Program Files (x86)/Brackets/samples/root/Getting Started/ Max connection attempts reached/project/ProjectManager.js:751 (anonymous function)
    /./ims/IMSProxy.js:30 Max connection attempts reached
    /utils/NodeConnection.js:89 WebSocket connection to 'ws://localhost:50204/' failed: Error in connection establishment: net::ERR_CONNECTION_TIMED_OUT
    http://127.0.0.1:9222/json Failed to load resource: net::ERR_CONNECTION_TIMED_OUT
    /utils/NodeConnection.js:89 WebSocket connection to 'ws://localhost:50204/' failed: Error in connection establishment: net::ERR_CONNECTION_TIMED_OUT
    http://127.0.0.1:9222/json Failed to load resource: net::ERR_CONNECTION_TIMED_OUT
    5/utils/NodeConnection.js:89 WebSocket connection to 'ws://localhost:50204/' failed: Error in connection establishment: net::ERR_CONNECTION_TIMED_OUT
    73/utils/NodeConnection.js:89 WebSocket connection to 'ws://localhost:50204/' failed: WebSocket opening handshake timed out
    /LiveDevelopment/LiveDevelopment.js:1180 Uncaught TypeError: Cannot read property 'reject' of null
    5http://127.0.0.1:9222/json Failed to load resource: net::ERR_CONNECTION_TIMED_OUT
    /LiveDevelopment/LiveDevelopment.js:1180 Uncaught TypeError: Cannot read property 'reject' of null

Regarding Ambiguity―please keep in mind that I am a newbie. If this troubleshooting doc is written for experienced developers, then there is probably no problem at all.

  1. Files should be in Current Project
    You can use File > Open to open any file on your computer, but Brackets' definition of a project are the files in the folder opened using File > Open Folder.... Some (but not all) Live Development features require a node server, which means being in the current project, so make sure the files that you want to use with Live Development are in the current project.

From https://github.com/adobe/brackets/wiki/Troubleshooting#live-edit

I get it. Make a folder, save all files in that folder. Ensure that when I open folder, it is pointed to that folder. But node server??? What does this have to do with keeping the files in the same folder and making sure that Open Folder points to the working folder? Can you give an example or send a hyperlink that gives me a quick understanding of what this means in case my error is due to this 'node server'?

  1. HTML File should be in Working Set
    There is a known issue (which is fixed in release 0.43) that if HTML file is in project tree (i.e. not in Working Set), then element highlighting stops working after switching to a CSS (or other?) file and then back to the HTML file. The workaround is to double-click HTML file so it's added to the Working Set.

From https://github.com/adobe/brackets/wiki/Troubleshooting#live-edit

Project tree vs working set…??? I can understand the project tree (I think). Working set?

  1. Updating CSS in Live Preview does not seem to work if has type="text/css", so try removing it.
    Known issues:
    • Bug iframe element is breaking live CSS loading #7935: Live CSS does not update if page contains an iframe (including injected iframes such as ads or social media buttons).

From https://github.com/adobe/brackets/wiki/Troubleshooting#live-edit

What link? How do I find the link in order to make sure that type does not equal "text/css"?
4. Live Preview Page not loading
• If you specified a "Base URL," make sure your local server is already running - Brackets will not start it for you.

How do I specify a "base URL"? How do I find this information?

• Make sure you are not running firewall, network security, or antivirus software that is blocking the connection (try disabling it temporarily to check)
• Make sure you haven't modified your hosts file to remap localhost or 127.0.0.1

Ummm, thanks for the Wikipedia page and no pointer to what info is important there… I guess. Where do I modify the host file?

• Try shutting down background apps in Chrome. In Chrome, go to Settings > Advanced Settings and then uncheck the "Continue running background apps when Google Chrome is closed" setting.

This was helpful. Why? There were clear directions, unlike the rest of the instructions above.

From https://github.com/adobe/brackets/wiki/Troubleshooting#-live-preview-page-not-loading

  1. Live Preview Chrome Issues
    Stable Chrome
    Brackets is verified with the current stable Chrome. If chrome is not configured to automatically update to the latest version, then be sure to check for updates. It usually works with current beta, dev, or canary versions of Chrome, but if you are having a problem switch back to stable Chrome before opening an issue.

From https://github.com/adobe/brackets/wiki/Troubleshooting#-live-preview-page-not-loading

I spent 25 minutes trying to figure out whether my version of Chrome was beta, dev, or stable (canary). How to switch to another version? I still have no idea.

@redmunds
Copy link
Contributor

redmunds commented Sep 2, 2015

In my case, I am not using a local server (at least I don't think so―how do I verify?). The base server is blank.

Correct. Set base server to blank to use internal node server.

Regarding Ambiguity―please keep in mind that I am a newbie. If this troubleshooting doc is written for experienced developers, then there is probably no problem at all.

Goal is for doc to be helpful to everyone.

I get it. Make a folder, save all files in that folder. Ensure that when I open folder, it is pointed to that folder. But node server??? What does this have to do with keeping the files in the same folder and making sure that Open Folder points to the working folder? Can you give an example or send a hyperlink that gives me a quick understanding of what this means in case my error is due to this 'node server'?

Builtin (internal) server uses node. It can only access files under project root. Using File > Open Folder... sets the project root.

Project tree vs working set…??? I can understand the project tree (I think). Working set?

Project tree is displayed on left. Working set is list of files at top of left column. This list of files is analogous to tabs you see across the top of some editors.

Note that you can use File > Open... or drag/drop to open a file in Brackets that is outside of current project. This is handy for viewing files outside of your project, but these files do not work in Live Preview.

What link? How do I find the link in order to make sure that type does not equal "text/css"?

This is referring to type attribute of <link> tag in your HTML.

How do I specify a "base URL"? How do I find this information?

File > Project Settings... This is same as "base server" you referred to above.

Ummm, thanks for the Wikipedia page and no pointer to what info is important there… I guess. Where do I modify the host file?

Look at "Location in the file system" section to find location on your OS.

This was helpful. Why? There were clear directions, unlike the rest of the instructions above.

A background app caused a bug in the past. We're not sure of the exact cause, so this is simply suggested as something to "try".

I spent 25 minutes trying to figure out whether my version of Chrome was beta, dev, or stable (canary). How to switch to another version? I still have no idea.

I agree that Google does not make this clear or easy to switch. The only reliable way I have found to do it is to remove all Chrome apps from your system. If you are using Mac, then also Empty Trash because file associations are not removed when something is moved to Trash. Then re-install Chrome stable.

@ysbordain
Copy link
Author

Still not working but there also seems to be no help provided.

I switched to a different PC and set a restore point before downloading Bootstrap in case this problem occurs. It works fine on a different PC.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants
@redmunds @ysbordain and others