mockko / livereload

LiveReload applies CSS/JS changes to Safari or Chrome w/o reloading the page (and autoreloads the page when HTML changes)
http://livereload.com/
1.18k stars 56 forks source link

OSX - LiveReload Cannot connect to LiveReload server #91

Open cujojp opened 13 years ago

cujojp commented 13 years ago

Getting this error when trying to run LiveReload LiveReload Cannot connect to LiveReload server: ws://localhost:35729/websocket

LR loads up properly -

Version:  1.6  (compatible with browser extension versions 1.6.x)
Port:     35729
Watching: /Users/cujojp/Sites/source/public
  - extensions: .html .css .js .png .gif .jpg .php .php5 .py .rb .erb .scss
  - live refreshing disabled for .js: will reload the whole page when .js is changed
  - excluding changes in: */.git/* */.svn/* */.hg/*
  - with a grace period of 0.05 sec after each change

LiveReload is waiting for browser to connect.

However in Chrome 14 and now Chrome 15 Dev when trying to execute LiveReload it does not run -

LiveReload Cannot connect to LiveReload server:
ws://localhost:35729/websocket

Currently running OSX 10.6.8 and Chrome 15.0.849.1 dev

NV commented 13 years ago

WebSocket implementation has been updated in Chrome. To make it work you have to use the latest version of em-websocket

gem install em-websocket

I just fixed livereload gem dependency (38cd7fc38c4964dc537f18dda059ec9b77b3cf57). @andreyvit can you publish the gem?

cujojp commented 13 years ago
sudo gem install em-websocket 

Did the trick!

pkrefta commented 13 years ago

I'm using em-websocket-0.3.1 & I still cannot connect to livereload server under OSX Lion. I'm using Chrome 14.0.835.94 beta.

oktav commented 13 years ago

Cool. That fixed it. Using Chrome 14.0.835.94 beta and em-websocket 0.3.1

TobiasBales commented 13 years ago

Chrome 15.0.861.0 dev em-websocket 0.3.1 OS X 10.7.1

Still getting Unknown client speck version 8.

That is using the native app - install the gem and running it works fine. Any plans to release an updated native application?

The gem version connects fine but upon saving a file it prints the following to the console and stops working. /Library/Ruby/Gems/1.8/gems/em-dir-watcher-0.9.4/lib/em-dir-watcher/platform/mac/rubycocoa_watcher.rb:41: [BUG] Segmentation fault ruby 1.8.7 (2010-01-10 patchlevel 249) [universal-darwin11.0]

NV commented 13 years ago

Unknown client speck version 8

Um... what? Where do you see this?

TobiasBales commented 13 years ago

when starting the native app from the terminal using /Applications/LiveReload.app/Contents/MacOS/LiveReload

ghost commented 12 years ago

Installed first time today. Still segfaulting even after sudo gem install em-websocket, and a restart:

Version: 1.6 (compatible with browser extension versions 1.6.x) Port: 35729 Watching: /Users/matt/Private/ws/lap/spcrm

LiveReload is waiting for browser to connect. Browser connected. Browser URL: http://localhost:5400/#leadDetail::{"itemId":"2a113cab828c6fcc8fd5f3d11972d471"}::4499045 /Library/Ruby/Gems/1.8/gems/em-dir-watcher-0.9.4/lib/em-dir-watcher/platform/mac/rubycocoa_watcher.rb:41: [BUG] Segmentation fault ruby 1.8.7 (2010-01-10 patchlevel 249) [universal-darwin11.0]

andreyvit commented 12 years ago

@wtfcoder Please try guard-livereload. We are ready to deprecate our Ruby gem: GUI is handled by LR 2.x, and guard-livereload is a great free console version. No reason for LR 1.x gem to exist.

Feedback on this strategy is accepted at http://help.livereload.com/discussions/suggestions/14.

uchoaaa commented 12 years ago

Worked like a charm! Thanks.

hipertracker commented 12 years ago

It does not work for Ubuntu 10.10 desktop (Linux ubuntu 2.6.35-30-generic #60-Ubuntu SMP Mon Sep 19 20:45:08 UTC 2011 i686 GNU/Linux). I use Ruby 1.9.3-rc1 and guard-livereload gem.

$ ruby -v ruby 1.9.3dev (2011-09-23 revision 33323) [i686-linux]

$ gem list guard-livereload guard-livereload (0.3.1)

$ gem list em-websocket em-websocket (0.3.1)

My browser: Chromium 15.0.876.0 (Developer Build 100131 Linux) with LiveReload extension v 1.6

When I run guard, the console displays message "LiveReload 1.4 is waiting for a browser to connect." but I cannot get connection in the browser.

When I open the page and click LR extension, I get alert: "LiveReload Cannot connect to LiveReload server: ws://0.0.0.0:35728/websocket".

Update: I have just installed the latest stable Chromoum 16.0.903.0 (Developer Build 104276 Linux). Still the same problem with that web socket connection. :(

cujojp commented 12 years ago

Unfortunately this issue has come back. Currently on Google Chrome 16.0.912.0 dev

Agin LR does load up properly.

Version:  1.6  (compatible with browser extension versions 1.6.x)
Port:     35729
Watching: /Users/cujojp/Sites/source/public
  - extensions: .html .css .js .png .gif .jpg .php .php5 .py .rb .erb .scss
  - live refreshing disabled for .js: will reload the whole page when .js is changed
  - excluding changes in: */.git/* */.svn/* */.hg/*
  - with a grace period of 0.05 sec after each change

LiveReload is waiting for browser to connect.

However when using the LR extension, I get the following error.

LiveReload Cannot connect to LiveReload server:
ws://localhost:35729/websocket

And currently running this version of websocket

em-websocket-0.3.2

And still on OSX 10.6.8

andreyvit commented 12 years ago

Hey!

Please try the latest dev build, I've updated our protocol support: http://help.livereload.com/kb/roadmap/latest-development-builds

On Oct 19, 2011, at 10:59 PM, Kaleb White wrote:

Unfortunately this issue has come back. Currently on Google Chrome 16.0.912.0 dev

Agin LR does load up properly.

Version: 1.6 (compatible with browser extension versions 1.6.x) Port: 35729 Watching: /Users/cujojp/Sites/source/public

  • extensions: .html .css .js .png .gif .jpg .php .php5 .py .rb .erb .scss
  • live refreshing disabled for .js: will reload the whole page when .js is changed
  • excluding changes in: /.git/ /.svn/ /.hg/
  • with a grace period of 0.05 sec after each change

    LiveReload is waiting for browser to connect.

However when using the LR extension, I get the following error.

LiveReload Cannot connect to LiveReload server: ws://localhost:35729/websocket

And currently running this version of websocket

em-websocket-0.3.2

And still on OSX 10.6.8

Reply to this email directly or view it on GitHub: https://github.com/mockko/livereload/issues/91#issuecomment-2457672

cujojp commented 12 years ago

Using this has led me to another issue (here: Issue #99 - http://goo.gl/YYrul)

Is their any solution to keeping the shell script?

andreyvit commented 12 years ago

Can you please:

1) see if there are any errors in the browser's error console?

2) try http://help.livereload.com/kb/general-use/using-livereload-without-browser-extensions for now?

3) try in another browser?

3) if that does not help, try an earlier build (LiveReload-2.0a8-dev-oct16.zip) and downgrade to browser extensions 1.x, available from http://help.livereload.com/kb/general-use/browser-extensions

I'm really sorry about the troubles, this is a prerelease in-development build, and contains many changes besides simply web sockets protocol update. I've recently rewritten all browser-side code from scratch, so there are some issues there probably. I would greatly appreciate any info you can give me to debug those!

Regarding the 'shell script' (i.e. the command-line version). I'm really putting all the effort into LR 2. I'm going to deprecate LR1.x in favor of guard-livereload, which is a different command-line tool for the same browser extensions of mine. Those guys are very serious about it, more serious than I'll ever be about LR1.x now.

You might also try to 'gem update em-websocket', it might help with your old LR gem, so that you'd continue using your old browser extensions and your old livereload gem for now.

(Still, give the UI version a second try when the next official alpha version comes out. I'm using it daily myself and I think it's a huge improvement over the command-line tool.)

A.

andreyvit commented 12 years ago

PS: sorry for point you to the GUI app so abruptly. I did not initially realize this request comes from GitHub. Yep, by all means, try to update em-web-socket. They are implementing the web socket protocol, and their commit logs indicates they've merged Protocol 13 support on Oct 19 (https://github.com/igrigorik/em-websocket/commits/). Don't know if they have released a new gem version, though, so you might have to install from source.

paolooo commented 11 years ago

I had the same error "Cannot connect to LiveReload server", but was able to connect to it.

I'm using Windows 7, chrome, vagrant, ang virtualbox.

Here's how you do it: $ ssh -L <port:host:port> <vagrant-ssh-config> $ ssh -L 35729:127.0.0.1:35729 127.0.0.1 -p 2222 -i ~/.vagrant.d/insecure_private_key -l vagrant

http://www.php-beginners.com/could-not-connect-to-livereload-server.html

Hope that helps. :)

bhattpriyank3 commented 10 years ago

livereload dont work....i was trying to use it for 3 days...but it dont work...i find a solution..use livepage chrome extension...