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

Mac: Live View Not Working #4228

Closed
ShMcK opened this issue Jun 14, 2013 · 55 comments
Closed

Mac: Live View Not Working #4228

ShMcK opened this issue Jun 14, 2013 · 55 comments
Assignees

Comments

@ShMcK
Copy link

ShMcK commented Jun 14, 2013

Live View never worked.

Updated Chrome, sprite 26 of Brackets, updated Mac OS 10.7.5

Computer repeatedly spontaneously tries to run "file:///Applications/Brackets%20Sprint%2026.app/Contents/www/LiveDevelopment/launch.html" but nothing opens. The file will not open.

@redmunds
Copy link
Contributor

Could you be running into the issue described in #4055? If you installed Chrome after Brackets, then try removing and re-installing Brackets.

@ShMcK
Copy link
Author

ShMcK commented Jun 14, 2013

I tried removing and re-installing Brackets but the problem remains.

@redmunds
Copy link
Contributor

Have you gone through the Troubleshooting Doc?

@ShMcK
Copy link
Author

ShMcK commented Jun 15, 2013

Yes, however the only advice for Mac Users having trouble with LIve View is to restart your computer.

@redmunds
Copy link
Contributor

Where are you seeing that error message?

What is the name and file extensions of the file you are trying to preview? Live Preview only works on HTML files.

@ShMcK
Copy link
Author

ShMcK commented Jun 15, 2013

If I try on a CSS file, I get a normal error telling me to use HTML files.

However, with HTML files there is no error message. The lightning bolt only goes to half and provides no functionality.

@redmunds
Copy link
Contributor

Does Live Preview fail for all HTML pages, or only certain ones? For example, does it work for a simple, static "Hello, World" HTML page?

@ShMcK
Copy link
Author

ShMcK commented Jun 16, 2013

Good question. Yes, it fails for all html pages.

@ShMcK
Copy link
Author

ShMcK commented Jun 16, 2013

The key to the problem may be related to one strange phenomena.

Occasionally, after several minutes of pressing live view my Chrome browser will try to load this:
file:///Applications/Brackets%20Sprint%2026.app/Contents/www/LiveDevelopment/launch.html

However, the page never loads and has the tab title "Waiting..."

@ghost ghost assigned redmunds Jun 17, 2013
@gruehle
Copy link
Member

gruehle commented Jun 17, 2013

Reviewed. Medium priority to @redmunds. Please re-assign to jason if you dont' have time to resolve before your sabbatical.

@ShMcK
Copy link
Author

ShMcK commented Jun 18, 2013

Additionally, Live Re-load on Google Chrome won't work with the following warning:

"Could not connect to LiveReload server. Please make sure that LiveReload 2.3 (or later) or another compatible server is running."

@redmunds
Copy link
Contributor

Maybe the LiveReload plugin is conflicting with Brackets Live Preview. The purpose of Live Preview is to provide the same functionality, so I don't know why you would also need LiveReload. Does Live Preview work if you disable/uninstall Live Reload?

@ShMcK
Copy link
Author

ShMcK commented Jun 19, 2013

I downloaded Live Re-load at a later date. I had to switch to Sublime Text 2 due to this issue with Brackets.

@gruehle
Copy link
Member

gruehle commented Jun 19, 2013

@shmckay - do you have anti-virus software installed? If so, which one?

@ShMcK
Copy link
Author

ShMcK commented Jun 20, 2013

I only use ClamXav (though very rarely). I ran it this morning, no viruses found.

@gruehle
Copy link
Member

gruehle commented Jun 20, 2013

The virus checker could be interfering with launching the node server or Chrome. I installed ClamXav, but didn't run into any problems.

What about firewall software? Live Preview starts up a node server that listens on a randomly-generated port number. If you have a firewall installed, that could be blocking the connection.

Sorry to keep throwing out questions like this! It would be great to get to the bottom of this problem, and I really appreciate your cooperation.

@ShMcK
Copy link
Author

ShMcK commented Jun 20, 2013

I don't have any firewall software installed. I also appreciate your help, thank you.

@nicohman
Copy link

I also have problems with the Live Preview; My Chrome browser tries to load that page over and over, but always closes itself.

@ghost ghost assigned gruehle Jun 26, 2013
@skeet70
Copy link

skeet70 commented Jun 27, 2013

I also have this problem. Works fine on Windows, but on Mac I click Live Preview and it does nothing, not even the page loading over and over like these guys are having. This is on a freshly installed Sprint 26 DMG, no other Brackets files on the computer.

If I click Live Preview this shows up in the console:

GET http://127.0.0.1:9222/json 504 (Server denies connection.) /Applications/Brackets%20Sprint%2026.app/Contents/www/LiveDevelopment/Inspector/Inspector.js:230
Uncaught SyntaxError: Unexpected token < /Applications/Brackets%20Sprint%2026.app/Contents/www/LiveDevelopment/Inspector/Inspector.js:223

If I tell it to log the Node state to the console, it says it's on port 50071, and navigating there shows Brackets-Shell Server. I tried changing the Project Base URL to that port, but it still tried 9222. Cmd+E also doesn't work, no errors, but clicking anywhere in an HTML document has the error Uncaught TypeError: Cannot read property 'ref' of undefined LiveDevelopment/Agents/HighlightAgent.js:102.

Everything else I've been able to test so far works fine.

@RaymondLim
Copy link
Contributor

@skeet70 @shmckay and @nicohman

Can you try typing http://127.0.0.1 in your Chrome browser and let us know whether you see It works! or something else?

And also can you tell us your Chrome version number?

@skeet70
Copy link

skeet70 commented Jun 27, 2013

Typing http://127.0.0.1 shows Server denies connection. Is there some context to that? Should I have Brackets running or anything?

Chrome version is Version 27.0.1453.116.

UPDATE: this is being tracked with #7101

@ShMcK
Copy link
Author

ShMcK commented Jun 27, 2013

Typing http://127.0.0.1 returns:

"Oops! Google Chrome could not connect to 127.0.0.1"

Chrome version is Version 27.0.1453.116.

@nicohman
Copy link

Okay, this is just a little freaky, but I just tried Live View again and it worked perfectly!

@RaymondLim
Copy link
Contributor

It looks like the removal of "Web Sharing" in Mountain Lion is affecting Brackets' use of localhost for Live Preview. We'll investigate for a solution. In the mean time, you may want to try enabling "Web Sharing" and see it fixes the issue. You can check this http://reviews.cnet.com/8301-13727_7-57481978-263/how-to-enable-web-sharing-in-os-x-mountain-lion/ to enable it.

@ShMcK
Copy link
Author

ShMcK commented Jun 27, 2013

After I enabled "Web Sharing" the issue was fixed. Live view works in Brackets.

Strangely, "Live Reload" in Chrome still doesn't work, but that's not a Brackets related issue.

@skeet70
Copy link

skeet70 commented Jun 28, 2013

Enabling Web Sharing didn't fix it for me, same issues as my above post.

@RaymondLim
Copy link
Contributor

@skeet70
Can you try the followings?

  1. Select Debug > Log Node State to Console.
  2. Open Debug > Show Developer Tools. It will open dev. tools in Chrome.
  3. In Chrome browser click on Console tab and find out the node port. Mine is showing NodeDebugUtils] Node is listening on port 55882.
  4. Open another tab in Chrome and type http://127.0.0.1:[port number].

Let us know whether you can go through all the steps and what you see after using the node port.

Thanks.

@skeet70
Copy link

skeet70 commented Jun 28, 2013

I tried that in my above comment. The server is starting by default on ports in the 58000+ range, right now 59931. If I go to that manually it shows Brackets-Shell Server in the tab. Sorry I didn't notice your comment earlier :S.

@skeet70
Copy link

skeet70 commented Jul 16, 2013

Yeah just tried it, this was the debug output:

[NodeDebugUtils] Node is listening on port 52863 NodeDebugUtils.js:56
GET http://127.0.0.1:9222/json 504 (Server denies connection.) Inspector.js:230
    getDebuggableWindows Inspector.js:230
    connectToURL Inspector.js:312
    _openInterstitialPage LiveDevelopment.js:820
    _doLaunchAfterServerReady LiveDevelopment.js:928
    (anonymous function) jquery-2.0.1.min.js:4
    l jquery-2.0.1.min.js:4
    c.fireWith jquery-2.0.1.min.js:4
    i.(anonymous function) jquery-2.0.1.min.js:4
    (anonymous function) jquery-2.0.1.min.js:4
    l jquery-2.0.1.min.js:4
    c.fireWith jquery-2.0.1.min.js:4
    i.(anonymous function) jquery-2.0.1.min.js:4
    _nodeConnection.domains.staticServer.getServer.done.fail._baseUrl main.js:146
    l jquery-2.0.1.min.js:4
    c.fireWith jquery-2.0.1.min.js:4
    NodeConnection._receive NodeConnection.js:415
Uncaught SyntaxError: Unexpected token < Inspector.js:223
    onLoad

Still doesn't work for me.

@gruehle
Copy link
Member

gruehle commented Jul 17, 2013

@skeet70 Thanks, this is helpful. It looks like it's a problem opening a WebSocket connection to the Chrome remote debugging port.

Are you running any other apps that are using port 9222?
What happens if you open a Chrome tab and navigate to http://localhost:9222?
And finally, can you try manually starting Chrome with remote debugging enabled: enter
open -a "Google Chrome" --args "--remote-debugging-port=9222" in a Terminal window.

@skeet70
Copy link

skeet70 commented Jul 18, 2013

There aren't any other apps running using port 9222. I get a server denies connections error when I go to localhost:9222 in Chrome. If I use open -a "Google Chrome" --args "--remote-debugging-port=9222" in a Terminal to open Chrome, Live Preview works, and Inspectable Pages shows up at localhost:9222.

@gruehle
Copy link
Member

gruehle commented Jul 18, 2013

OK, I think we're getting somewhere!

If you quit Chrome and start Live Preview, does Chrome launch? If yes, after several seconds do you see a "Connecting to Browser" error in Brackets with a "Relaunch Chrome" button?

Can you try disabling all Chrome extension and see if that makes any difference?

@skeet70
Copy link

skeet70 commented Jul 18, 2013

Yeah! Quitting Chrome and using Live Preview doesn't launch a Chrome window, disabling all extensions didn't change any behavior either.

@gruehle
Copy link
Member

gruehle commented Jul 18, 2013

What do you get if you enter this in a terminal window:

mdfind "kMDItemCFBundleIdentifier == 'com.google.Chrome'"

What happens if you try to launch Chrome by it's bundle identifier:

open -b com.google.Chrome

@skeet70
Copy link

skeet70 commented Jul 18, 2013

Murph@MurphMac /Applications> mdfind "kMDItemCFBundleIdentifier == 'com.google.Chrome'"
/Applications/Google Chrome.app

Using open -b com.google.Chrome opens Chrome just fine.

@gruehle
Copy link
Member

gruehle commented Jul 19, 2013

I posted an instrumented build here.

This build logs several messages to the console when starting live development. Can you download the zip file, unpack it, and try running live preview with this build.

After starting live preview, open Console.app and search for Brackets. You should see lines like this:
image

What output do you see?

@skeet70
Copy link

skeet70 commented Jul 22, 2013

Regardless of whether Chrome is already running or not, when live preview is started it only logs this to the console:

7/22/13 1:43:34.407 PM Brackets: Performance: Please update this scripting addition to supply a value for ThreadSafe for each event handler: "/Library/ScriptingAdditions/SIMBL.osax"

@gruehle
Copy link
Member

gruehle commented Jul 22, 2013

That message is coming from SIMBL. It should be harmless, but I wonder if SIMBL is interfering with Chrome launching somehow. Can you try removing it? Are you running another utilities that could be affecting app launching (virus scanners, etc.)?

@skeet70
Copy link

skeet70 commented Jul 25, 2013

Sorry, that SIMBL warning is only there when Brackets starts, nothing is actually logged when Live Preview is clicked. I don't have any utilities that would affect app launching. How would I remove SIMBL, to make sure that's not the problem?

@gruehle
Copy link
Member

gruehle commented Jul 25, 2013

According to this thread, you get the uninstaller when you download SIMBL.

@skeet70
Copy link

skeet70 commented Jul 25, 2013

Hmmmm. I never actually downloaded SIMBL, so if it's there, it's from some other application or something. It looks like it may be TotalTerminal which I use constantly every day, so I'd like to not remove SIMBL if not necessary.

Are there any other steps I could take to help debug this? I'm re-downloading the instrumented build you posted before to check it again just in case I missed something.

@njx
Copy link
Contributor

njx commented Aug 29, 2013

@gruehle - not sure we need to open this to this sprint, but it might be good to verify that SIMBL/TotalTerminal is what's causing the problem, so we can at least release-note it.

@ghost
Copy link

ghost commented Sep 7, 2013

Code Bounty

@skeet70
Copy link

skeet70 commented Sep 9, 2013

Just tried out Sprint 30,

GET http://127.0.0.1:9222/json 504 (Server denies connection.) Inspector.js:230
    getDebuggableWindows Inspector.js:230
    connectToURL Inspector.js:312
    _openInterstitialPage LiveDevelopment.js:791
    _doLaunchAfterServerReady LiveDevelopment.js:903
    l jquery-2.0.1.min.js:4
    c.fireWith jquery-2.0.1.min.js:4
    i.(anonymous function) jquery-2.0.1.min.js:4
    (anonymous function) jquery-2.0.1.min.js:4
    l jquery-2.0.1.min.js:4
    c.fireWith jquery-2.0.1.min.js:4
    i.(anonymous function) jquery-2.0.1.min.js:4
    (anonymous function) StaticServer.js:118
    l jquery-2.0.1.min.js:4
    c.fireWith jquery-2.0.1.min.js:4
    NodeConnection._receive NodeConnection.js:415
Uncaught SyntaxError: Unexpected token < Inspector.js:223
    onLoad

Still not working for me.

@peterflynn
Copy link
Member

Sounds like this may be the same problem as #4688.

@shinybear
Copy link

Not working for me either. Have you guys found any solutions for this problem yet?

@redmunds
Copy link
Contributor

redmunds commented Mar 8, 2014

The conversations here have gone stale. Closing.

@redmunds redmunds closed this as completed Mar 8, 2014
@dangelov
Copy link

I have the same issue. When I click on "Live Preview", it only shows half-lit and Chrome never runs.

What I've found to always work in this case, is click Debug > Show Developer Tools - this opens a new Chrome instance. Then, clicking Live Preview works properly.

If you already tried to run Live Preview and it's stuck in it's half-lit mode, the above will not work, unless you Debug > Reload With Extensions and then follow the steps above again (show developer tools, open live preview).

@redmunds
Copy link
Contributor

This is a long, detailed thread so it likely not the same exact issue. Please open a new issue. In addition to this info, also provide the version of Brackets, your OS/version, which version of Chrome do you have installed. Also, explain what you mean by "half-lit mode" -- I don't know what that means. Thanks.

@dangelov
Copy link

@redmunds sure. Opening a new issue now.

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

10 participants