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

Brackets won't connect to Live Preview #5250

Closed
Mac944 opened this issue Sep 18, 2013 · 23 comments
Closed

Brackets won't connect to Live Preview #5250

Mac944 opened this issue Sep 18, 2013 · 23 comments

Comments

@Mac944
Copy link

Mac944 commented Sep 18, 2013

Hello,

I've just downloaded Brackets Sprint 30 and attempting to use Live Preview.

It's a Windows 7 PC that I use at work which has a firewall and Sophos installed.

Chrome was installed prior to Brackets.

I've also rebooted.

Any ideas?

Many thanks

@jasonsanjose
Copy link
Member

@Mac944 the next time you start brackets, can you open http://localhost:9234 before you try live preview? That URL opens developer tools for brackets and you will see logs if available.

@Mac944
Copy link
Author

Mac944 commented Sep 19, 2013

@jasonsanjose there doesn't appear to be any logs, just a blank screen?

@eddieyangtx
Copy link

hi,

Brackets worked fine before, but not now.
I check the developer tools, and find the error message as below

Failed to load resource: the server responded with a status of 502 (Fiddler - Connection Failed) http://127.0.0.1:9222/json
Uncaught SyntaxError: Unexpected token B

Please help!
Thanks!

@njx
Copy link
Contributor

njx commented Sep 23, 2013

@Mac944 - it might have to do with your firewall settings. Is there anything that might be blocking communications between processes on the same machine?

@eddieyangtx - it looks like you have a proxy server (Fiddler) installed. Could that be blocking something?

Marking move to backlog. We have a number of these issues and we should group them together and figure out if there's something we could do to improve the situation.

@redmunds
Copy link
Contributor

redmunds commented Mar 6, 2014

Haven't heard back from bug filer. Closing.

@redmunds redmunds closed this as completed Mar 6, 2014
@scoumbourdis
Copy link

Hello guys,

I hope this will help someone out-there that had the same problem with me. After some hours investigation, I've realized that the proxy server is simply blocking the brackets live preview. Thanks @njx to point that out. Once you have the same issue (live preview is loading for ever...), just disable the proxy completely then close the brackets, open the brackets again and try to open the live preview . Now it should work as expected. It worked for me :)

Cheers
Johnny

@njx
Copy link
Contributor

njx commented Mar 13, 2014

Great, thanks for confirming that. @redmunds - might be worth adding something to the Troubleshooting doc regarding this?

@redmunds
Copy link
Contributor

Yes, that would be good, but I actually am not quite sure how the new proxy thingy works.

@dangoor Can you add a section to the Live Preview section of Troubleshooting doc about the proxy problem? Might also be worth adding something to the Live Preview section of the How to Use Brackets doc as well.

@dangoor
Copy link
Contributor

dangoor commented Mar 18, 2014

@redmunds This is unrelated to the new proxy preference. Currently, the proxy preference is used to tell extension installation that Node needs to run the traffic through a proxy.

CEF automatically uses the system proxy configuration, so if someone is using a proxy at the system level, all HTTP traffic will run through the proxy. I don't know why a proxy would block the live preview traffic, but apparently it happens.

@ashiwal
Copy link

ashiwal commented Jun 24, 2014

hi, it might help. you can bypass proxy for local web requests.

http://msdn.microsoft.com/en-us/library/vstudio/ms178120(v=vs.100).aspx

@vilicvane
Copy link

I am experiencing the same issue, it seems that there's nothing listening to port 9222 at all. (Though 9234 works.)

@ImantsSkultans
Copy link

Just today realized that Brackets Live Preview stopped to work... few days ago everything was ok.
It just shows: Loading / Live Preview: Connecting ... and nothing happens.

Console shows:
enable failed on agent css -> ErrorNotification.js:125
DOM agent needs to be enabled first. Object Object -> ErrorNotification.js:125
Assertion failed: Attempted to call remote method without objectId set. -> /LiveDevelopment/Agents/RemoteAgent.js:58
Some arguments of method 'Runtime.callFunctionOn' can't be processed
Parameter 'objectId' with type 'String' was not found. Object Object -> ErrorNotification.js:125

Update: uninstalled Chrome v40 (some beta) and installed Chrome v39 and Brackets Live Preview works again.

@redmunds
Copy link
Contributor

@Bristoled

DOM agent needs to be enabled first

This indicates that you are using Chrome beta v40, which does not work with Brackets 1.0. We will be releasing Brackets 1.1 Release Candidate builds soon that fixes this issue, or you can revert to Chrome stable v39.

@ImantsSkultans
Copy link

Thank You Redmund - I also went to this conclusion after 2 hours of messing and downgraded to Chrome stable v39 :) So hope to see Brackets 1.1 soon!

@taptapper
Copy link

I'm new to Brackets! Started yesterday. I was also having this problem with Live Preview not working. I Installed latest Brackets 1.2 and updated Chrome yesterday. Live Preview took forever to open Chrome, then showed the Live Preview crash message. I'm Running Windows 7.

Using some manual opens and what jasonsanjose commented on Sep 18, 2013 fixed it for me.

  • Open a project in Brackets. Something with an html page.
  • Open Chrome manually and load one of the html files that's in Brackets.
  • Open a new tab in that same Chrome instance and navigate to http://localhost:9234.
    For me that took a looong time to open. Eventually it ran and started popping code in a sidebar and on the main page.

That 9234 tab is now running the Live Preview from brackets. But it's still not 100%.

Next go back to Brackets (leave that Chrome running). Click Live Preview. Brackets should open a new instance of Chrome with a running live preview.

For me, that works. As long as I leave my manual Chrome open with it's sidebars etc. the LP that Brackets opens works as advertised.

Thanks! This is exciting. I'm trying to transition from Dreamweaver and Brackets is a lot of fun so far. I hope this method helps someone

"@Mac944 the next time you start brackets, can you open http://localhost:9234 before you try live preview? That URL opens developer tools for brackets and you will see logs if available."

@ArunKaza
Copy link

@taptapper : Can you send me your email ID to arunk@adobe.com?
We would like to connect with you and discuss more.

@aldo-o
Copy link

aldo-o commented Apr 21, 2016

@njx , may be a 3 years old thread but it helped me. If Fiddler is running, brackets will stuck on "Live Preview: Connecting... " .

@freeRajeev
Copy link

Run as Adminstrator

@beanamonster
Copy link

beanamonster commented Apr 17, 2017

I just started having this problem. I don't know what Fiddler is, I never knowingly downloaded it and I don't know how to disable it.
Live Preview won't launch and I'm getting these two errors:

Failed to load resource: the server responded with a status of 502 (Fiddler - Connection Failed) Uncaught SyntaxError: Unexpected token T

Note: The syntax error is at index.html:1 but doesn't exist in my project.
Additional note: This error is breaking my Chrome search function when I try to run Live Preview and I have to clear my browsing data to fix it. So that's weird.

@beanamonster
Copy link

Ok, so,
The Chrome fix stopped working and my search function was broken for 8 hours until suddenly all of my programs went offline. I could no longer connect to the internet due to a proxy error (I have no proxy set up, Brackets had not been launched), so I uninstalled Brackets and now I can use my computer again.
Thanks for the free virus, I won't be using it again in the future.

@KwrKy
Copy link

KwrKy commented Apr 19, 2017

So, I was using Brackets this morning, and everything was working fine until about 2 hours ago. Suddenly, live preview stopped working, and no matter what I do I can't seem to get it going again. When I try use LP it does one of three things:

  1. It gives me the "HTML file or index.html" error and refuses to open the file, even though it is an html file with an index.html in the folder for good measure.
  2. It actually does open the preview window but the lightning bolt is only half orange, and there is no standard LP response as I select different elements
  3. I get the Chrome error page "This Site Can't Be Reached: 127.0.0.1 refused to connect."

As far as I know I'm not using any sort of proxy (I'm on a home network), and as far as I know I didn't change anything other than turning the LP feature on and off. Any suggestions?

I'm using an iMac, running the latest version of macOS, Chrome and Brackets.

UPDATE

Restarted my computer, and VOILA, LP is working again. Mods feel free to delete this if redundant, but it is worth noting that:

  1. Before the restart LP wasn't opening in a new chrome window — it opened in a new tab of my current window.
  2. After restart LP is opening in a new Chrome window again.

@blarney2000
Copy link

I have no idea about how to find or modify the proxy. Not much help for non-network people.

But I did find a solution. I just clicked on File --> Enable Experimental Live Preview and the localhost is working again.

@houdini68
Copy link

houdini68 commented Dec 11, 2018

There is a way to make it work without doing (almost) anything that I have tested on Ubuntu Linux (when there is a proxy that is used).
Just disable the network. Then start Brackets, open the file (for example index.html) and then click on the button 'Live Preview'. It should work.
Now activate the network again.

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

No branches or pull requests