Skip to content
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

OSX - LiveReload Cannot connect to LiveReload server #91

Open
cujojp opened this issue Aug 12, 2011 · 17 comments
Open

OSX - LiveReload Cannot connect to LiveReload server #91

cujojp opened this issue Aug 12, 2011 · 17 comments

Comments

@cujojp
Copy link

cujojp commented Aug 12, 2011

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
Copy link
Member

NV commented Aug 12, 2011

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 (38cd7fc). @andreyvit can you publish the gem?

@cujojp
Copy link
Author

cujojp commented Aug 12, 2011

sudo gem install em-websocket 

Did the trick!

@pkrefta
Copy link

pkrefta commented Aug 18, 2011

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
Copy link

oktav commented Aug 19, 2011

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

@TobiasBales
Copy link

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
Copy link
Member

NV commented Aug 26, 2011

Unknown client speck version 8

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

@TobiasBales
Copy link

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

@ghost
Copy link

ghost commented Sep 19, 2011

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

  • extensions: .html .css .js .png .gif .jpg .php .php5 .py .rb .erb
  • 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.
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
Copy link
Member

@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
Copy link

uchoaaa commented Sep 26, 2011

Worked like a charm! Thanks.

@hipertracker
Copy link

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
Copy link
Author

cujojp commented Oct 19, 2011

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
Copy link
Member

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:
#91 (comment)

@cujojp
Copy link
Author

cujojp commented Oct 19, 2011

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

Is their any solution to keeping the shell script?

@cujojp cujojp closed this as completed Oct 19, 2011
@cujojp cujojp reopened this Oct 19, 2011
@andreyvit
Copy link
Member

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?

  4. 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
Copy link
Member

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
Copy link

paolooo commented Mar 11, 2013

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
Copy link

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

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

No branches or pull requests

10 participants