Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

LiveReload not working Guard (Firefox)

I'm having a fun issue, I have LiveReload working in Chrome, so I know it's installed right, but I can't for the life of me get it going on Firefox 9.0.1. I activate the icon on my site and it just stays red, with the following symptom showing in my guard terminal.

Browser connected.
Browser URL: {"command":"hello","protocols":["http://livereload.com/protocols/connection-check-1"]}
Browser disconnected.

Here's my guardfile.

guard 'livereload' do
  watch(%r{app/.+\.(erb|haml)})
  watch(%r{app/helpers/.+\.rb})
  watch(%r{(public/|app/assets).+\.(css|js|html)})
  watch(%r{(app/assets/.+\.css)\.s[ac]ss}) { |m| m[1] }
  watch(%r{(app/assets/.+\.js)\.coffee}) { |m| m[1] }
  watch(%r{config/locales/.+\.yml})
end

I did some research on the subject and all I can find are people reporting issues and then reporting back that it just cleared up, without any explanation from the developers. Fun!

like image 721
Jeff Ancel Avatar asked Jan 03 '12 10:01

Jeff Ancel


People also ask

What version of Firefox does livereload - web extension support?

Web extension based version of LiveReload. Supports Firefox 57 (Firefox Quantum) How are you enjoying LiveReload - Web extension? If you think this add-on violates Mozilla's add-on policies or has security or privacy issues, please report these issues to Mozilla using this form.

Can livereloadx be used as a grunttask?

LiveReloadXalso works as a Grunttask. Although grunt-contrib-watchsupports LiveReload, it supports only “add manually” method and “browser extension” method. With LiveReloadX, you can use “static mode” and “proxy mode”.

How does livereloadx work with WebSocket?

running as a web server on port 35729which serves livereload.jsand acts as a WebSocket server. When a browser load livereload.js, it connects to the LiveReloadX server using WebSocket. If you modify files under path/to/dir, the server tells all clients to reload by themselves.

Does grunt-contrib-Watch support livereloadx?

Although grunt-contrib-watchsupports LiveReload, it supports only “add manually” method and “browser extension” method. With LiveReloadX, you can use “static mode” and “proxy mode”. How to Start Setup Grunt environment by following Getting started - Grunt: The JavaScript Task Runner.


2 Answers

Latest Firefox seems to be unable to inject chrome:// urls into the host page unlees the corresponding resource has additional "contentaccesible" manifest attribute.

I've added that and submitted a pull request: https://github.com/livereload/livereload-extensions/pull/8

You can grab the fixed plugin package here: https://github.com/downloads/siasia/livereload-extensions/LiveReload-2.0.9.xpi

like image 137
Artyom Olshevskiy Avatar answered Sep 29 '22 18:09

Artyom Olshevskiy


I'm in the same boat. Have you tried using the non-browswer extension method:

http://help.livereload.com/kb/general-use/using-livereload-without-browser-extensions

...also, you can use the following gem to automatically inject the script in your test environment:

https://github.com/johnbintz/rack-livereload

like image 44
Dan Caddigan Avatar answered Sep 29 '22 19:09

Dan Caddigan