New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Brackets won't connect to Live Preview #5250

Closed
Mac944 opened this Issue Sep 18, 2013 · 22 comments

Comments

Projects
None yet
@Mac944

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

This comment has been minimized.

Member

jasonsanjose commented Sep 18, 2013

@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

This comment has been minimized.

Mac944 commented Sep 19, 2013

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

@eddieyangtx

This comment has been minimized.

eddieyangtx commented Sep 19, 2013

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

This comment has been minimized.

Member

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

This comment has been minimized.

Contributor

redmunds commented Mar 6, 2014

Haven't heard back from bug filer. Closing.

@redmunds redmunds closed this Mar 6, 2014

@scoumbourdis

This comment has been minimized.

scoumbourdis commented Mar 13, 2014

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

This comment has been minimized.

Member

njx commented Mar 13, 2014

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

@redmunds

This comment has been minimized.

Contributor

redmunds commented Mar 13, 2014

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

This comment has been minimized.

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

This comment has been minimized.

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

@vilic

This comment has been minimized.

vilic commented Dec 7, 2014

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

@Bristoled

This comment has been minimized.

Bristoled commented Dec 14, 2014

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

This comment has been minimized.

Contributor

redmunds commented Dec 14, 2014

@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.

@Bristoled

This comment has been minimized.

Bristoled commented Dec 14, 2014

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

This comment has been minimized.

taptapper commented Apr 15, 2015

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

This comment has been minimized.

ArunKaza commented Apr 16, 2015

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

@aldoblack

This comment has been minimized.

aldoblack 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

This comment has been minimized.

freeRajeev commented Oct 14, 2016

Run as Adminstrator

@beanamonster

This comment has been minimized.

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

This comment has been minimized.

beanamonster commented Apr 18, 2017

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

This comment has been minimized.

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

This comment has been minimized.

blarney2000 commented Sep 15, 2017

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment