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

No reload after html changes #120

Open
toojee opened this issue Oct 28, 2014 · 9 comments
Open

No reload after html changes #120

toojee opened this issue Oct 28, 2014 · 9 comments

Comments

@toojee
Copy link

toojee commented Oct 28, 2014

Hi! I have an issue with guard-livereload or the chrome/firefox plugin.
When I change the file, the changes are visible in the console but nothin appened...

I do a basic test with a fresh install of ruby/guard/guard-livereload and 2 files :

  • index.html
  • Guardfile

the Guardfile :

guard 'livereload' do
    watch(%r{.+\.html$})
  end

I use :

  • ruby 1.9.3 p545
  • guard 2.6.1
  • chrome plugin 2.0.9
  • the last version of guard-livereload (I don't know how check that)

Some output of this issue:
(The first modification work but the second don't on the browser.
It's weird because it trigger 2 times but nothing appened)
https://gist.github.com/toojee/b619811f61d9e9e18f25

here with LISTEN_GEM_DEBUGGING=1
https://gist.github.com/toojee/b2552317716d43d852d7

LISTEN_GEM_DEBUGGING=2
https://gist.github.com/toojee/b92b32b150a67cbfad08


Here the first discussion on this issue : guard/guard#630

@jibiel
Copy link
Member

jibiel commented Oct 18, 2015

@toojee Do you have any updates or conclusions regarding the issue (#120)?

I have been able to reproduce it today:

$ bundle exec guard
/Users/jibiel/.rvm/gems/ruby-2.2.3@global/gems/guard-livereload-2.4.0/lib/guard/livereload/reactor.rb:48: warning: epoll is not supported on this platform
19:59:18 - INFO - Guard is now watching at '/Users/jibiel/Development/ruby/github/guard/guard-livereload/issues/120'
19:59:55 - INFO - Reloading browser: index.html
20:03:15 - INFO - Reloading browser: index.md

It gives the output but the actual tab is not reloading, although the changes are there — you can see them if you hit Opt + Cmd + U or Cmd + R.

You can spot ruby and the gem versions in the output, LiveReload extension version 2.1.0 (but you may as well disable it, nothing changes and reloads anyway).

Also I'm on OS X, you're on Windows, so I'm guessing this is not platform-related.

@leowebguy
Copy link

Just double check, there are two LiveReload extensions available on Chrome webstore > just make sure you are using the remote (if you are working on a remote server) > https://chrome.google.com/webstore/search/livereload?hl=en-US

@jibiel
Copy link
Member

jibiel commented Oct 25, 2015

Yes, we're talking about LiveReload here, not RemoteLiveReload, thanks for the clarification.

@e2
Copy link
Contributor

e2 commented Oct 26, 2015

The last command is (from the logs): DEBUG - {:command=>"reload", :path=>"G:/test/index.html", :liveCSS=>true}

This means if it's not reloading, the problem is in the livereload.js files.

The next time the web page doesn't refresh, you may want to set a JavaScript breakpoint in the browser at Parser.prototype.process and step through until you see where it leaves off.

Maybe there are console errors in the browser?

You can also add debugs on the performReload and performAlert methods to find out which one is called. And then you can step through.

Let me know, so I can add more useful debugs here and there locate the problem.

@e2
Copy link
Contributor

e2 commented Oct 26, 2015

@jibiel - I've created a thorough troubleshooting section in the Wiki here: https://github.com/guard/guard-livereload/wiki/Troubleshooting

And I've just included info for debugging livereload.js files.

Let me know if you think anything can be improved there.

@jibiel
Copy link
Member

jibiel commented Oct 26, 2015

@e2 Looks decent and good timing, I felt the need of that too. One markdown error thought — always confusing those braces myself, haha.

Can we suggest it for reading here? Maybe include it «Guidelines for contributing» like here.

Also isn't your previous comment worth the Troubleshooting section?

And how about

It's best to create a small repo showing the problem, because it may just be your setup.

at the end of Troubleshooting or Contributing sections?

@e2
Copy link
Contributor

e2 commented Oct 26, 2015

Thanks, @jibiel,

One markdown error thought — always confusing those braces myself, haha.

Yeah, I was supposed to check it, but I forgot. I always remember it was tricky, but never end up guessing right.

Can we suggest it for reading here? Maybe include it «Guidelines for contributing» like here.

Those links point to new issues - I don't get it...

Also isn't your previous comment worth the Troubleshooting section?

I think I did here: https://github.com/guard/guard-livereload/wiki/Troubleshooting#9-livereloadjs-does-the-reloading

Feel free to improve/add anything there (without checking up with me). I tried to cover enough ground (LiveReload is complex), so it just basically "notes" from browsing the sources.

@jibiel
Copy link
Member

jibiel commented Oct 26, 2015

@e2

Those links point to new issues - I don't get it...

CONTRIBUTING.md
I think we should suggest Troubleshooting section for reading upon new issue creation. Either directly (don't know if it possible) or through CONTRIBUTING.md just like rails repo does it. What do you think?

Feel free to improve/add anything there (without checking up with me).

Sorry if I seem lazy, I just think that to open PR for a couple of .md braces is a moveton.

@e2
Copy link
Contributor

e2 commented Oct 27, 2015

Thanks @jibiel - we can move the discussion here: #152

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

No branches or pull requests

4 participants