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

sometimes not reloading ("0 client") #42

Open
simonmichael opened this issue Oct 5, 2019 · 0 comments
Open

sometimes not reloading ("0 client") #42

simonmichael opened this issue Oct 5, 2019 · 0 comments

Comments

@simonmichael
Copy link

Thanks a lot for livereloadx!

Sometimes I find it does not load reliably. Here's an example, reproducible on my machine today:

$ pgrep -fl livereloadx
$ lsof -i :8100
$ echo 1 >a.html
$ livereloadx -p 8100 -s . -v --include a.html
2019-10-04 14:58:29 - info:  Config:
2019-10-04 14:58:29 - info:    - mode:   static
2019-10-04 14:58:29 - info:    - port:   8100
2019-10-04 14:58:29 - info:    - filter:
2019-10-04 14:58:29 - info:      1: include "a.html"
2019-10-04 14:58:29 - info:      2: exclude ".{git,svn}/"
2019-10-04 14:58:29 - info:      3: include "*/"
2019-10-04 14:58:29 - info:      4: include "*.{html,shtml,tmpl,xml,css,js,json,jpeg,jpg,gif,png,ico,cgi,php,py,pl,pm,rb}"
2019-10-04 14:58:29 - info:      5: exclude "*"
2019-10-04 14:58:30 - debug: createServer {
  cli: false,
  dir: '.',
  filter: [
    { type: 'include', pattern: 'a.html' },
    { type: 'exclude', pattern: '.{git,svn}/' },
    { type: 'include', pattern: '*/' },
    {
      type: 'include',
      pattern: '*.{html,shtml,tmpl,xml,css,js,json,jpeg,jpg,gif,png,ico,cgi,php,py,pl,pm,rb}'
    },
    { type: 'exclude', pattern: '*' }
  ],
  static: true,
  port: 8100,
  preferLocal: false,
  proxy: '',
  delay: 0,
  verbose: true,
  liveCSS: true,
  liveImg: true
}
2019-10-04 14:58:30 - debug: re: \/((?:a\.html))$
2019-10-04 14:58:30 - debug: re: \/((?:\.git\/|\.svn\/))$
2019-10-04 14:58:30 - debug: re: \/((?:(?!(?:^|\/)\.{1,2}(?:$|\/))(?=.)[^\/]*?\/))$
2019-10-04 14:58:30 - debug: re: \/((?:(?!(?:^|\/)\.{1,2}(?:$|\/))(?=.)[^\/]*?\.html|(?!(?:^|\/)\.{1,2}(?:$|\/))(?=.)[^\/]*?\.shtml|(?!(?:^|\/)\.{1,2}(?:$|\/))(?=.)[^\/]*?\.tmpl|(?!(?:^|\/)\.{1,2}(?:$|\/))(?=.)[^\/]*?\.xml|(?!(?:^|\/)\.{1,2}(?:$|\/))(?=.)[^\/]*?\.css|(?!(?:^|\/)\.{1,2}(?:$|\/))(?=.)[^\/]*?\.js|(?!(?:^|\/)\.{1,2}(?:$|\/))(?=.)[^\/]*?\.json|(?!(?:^|\/)\.{1,2}(?:$|\/))(?=.)[^\/]*?\.jpeg|(?!(?:^|\/)\.{1,2}(?:$|\/))(?=.)[^\/]*?\.jpg|(?!(?:^|\/)\.{1,2}(?:$|\/))(?=.)[^\/]*?\.gif|(?!(?:^|\/)\.{1,2}(?:$|\/))(?=.)[^\/]*?\.png|(?!(?:^|\/)\.{1,2}(?:$|\/))(?=.)[^\/]*?\.ico|(?!(?:^|\/)\.{1,2}(?:$|\/))(?=.)[^\/]*?\.cgi|(?!(?:^|\/)\.{1,2}(?:$|\/))(?=.)[^\/]*?\.php|(?!(?:^|\/)\.{1,2}(?:$|\/))(?=.)[^\/]*?\.py|(?!(?:^|\/)\.{1,2}(?:$|\/))(?=.)[^\/]*?\.pl|(?!(?:^|\/)\.{1,2}(?:$|\/))(?=.)[^\/]*?\.pm|(?!(?:^|\/)\.{1,2}(?:$|\/))(?=.)[^\/]*?\.rb))$
2019-10-04 14:58:30 - debug: re: \/((?:(?!(?:^|\/)\.{1,2}(?:$|\/))(?=.)[^\/]*?))$
2019-10-04 14:58:30 - info:  Enabled static mode.
2019-10-04 14:58:30 - debug: root dir: /Users/simon/src/PLAINTEXTACCOUNTING/plaintextaccounting.org
2019-10-04 14:58:30 - info:  Waiting on port 8100...
2019-10-04 14:58:30 - info:  Watching "/Users/simon/src/PLAINTEXTACCOUNTING/plaintextaccounting.org"...
2019-10-04 14:58:30 - debug:   watching '/'
2019-10-04 14:58:30 - debug:   skipping '.git/'
2019-10-04 14:58:30 - debug:   watching '.idea/'
2019-10-04 14:58:30 - debug:   watching '.idea/markdown-navigator/'
2019-10-04 14:58:30 - debug:   watching 'css/'
2019-10-04 14:58:30 - debug:   watching 'images/'
2019-10-04 14:58:30 - debug:   watching 'old/'
2019-10-04 14:58:30 - debug:   watching 'quickref/'
2019-10-04 14:58:30 - debug:   watching 'quickref/images/'
2019-10-04 14:58:30 - debug:   watching 'vendor/'
2019-10-04 14:58:30 - debug:   watching 'vendor/Skeleton-2.0.4/'
2019-10-04 14:58:30 - debug:   watching 'vendor/Skeleton-2.0.4/css/'
2019-10-04 14:58:30 - debug:   watching 'vendor/Skeleton-2.0.4/images/'
2019-10-04 14:58:30 - debug:   watching 'vendor/foundation6-essential/'
2019-10-04 14:58:30 - debug:   watching 'vendor/foundation6-essential/css/'
2019-10-04 14:58:30 - debug:   watching 'vendor/foundation6-essential/img/'
2019-10-04 14:58:30 - debug:   watching 'vendor/foundation6-essential/js/'
2019-10-04 14:58:30 - debug:   watching 'vendor/foundation6-essential/js/vendor/'

## manually load http://localhost:8100/a.html, browser shows 1

2019-10-04 14:58:57 - debug: path: /a.html
2019-10-04 14:58:57 - debug: append snippet
2019-10-04 14:58:57 - info:  ::ffff:127.0.0.1 - "GET /a.html HTTP/1.1" 200 164
(node:52401) [DEP0066] DeprecationWarning: OutgoingMessage.prototype._headers is deprecated
2019-10-04 14:58:57 - info:  ::ffff:127.0.0.1 - "GET /livereload.js?snipver=2&port=8100 HTTP/1.1" 304 -
2019-10-04 14:59:04 - debug: on connection
2019-10-04 14:59:04 - info:  ::ffff:127.0.0.1 - new connection to websocket server
2019-10-04 14:59:04 - debug: on connection
2019-10-04 14:59:04 - info:  ::ffff:127.0.0.1 - new connection to websocket server
2019-10-04 14:59:04 - debug: on message: {"command":"hello","protocols":["http://livereload.com/protocols/official-6","http://livereload.com/protocols/official-7"],"ver":"2.0.8","snipver":"2"}
2019-10-04 14:59:04 - debug: on message: {"command":"hello","protocols":["http://livereload.com/protocols/official-6","http://livereload.com/protocols/official-7"],"ver":"2.0.8","snipver":"2"}
2019-10-04 14:59:04 - debug: on connection
2019-10-04 14:59:04 - info:  ::ffff:127.0.0.1 - new connection to websocket server
2019-10-04 14:59:04 - debug: on message: {"command":"info","plugins":{"less":{"disable":false,"version":"1.0"}},"url":"http://localhost:8100/#software"}
2019-10-04 14:59:04 - debug: on message: {"command":"hello","protocols":["http://livereload.com/protocols/official-6","http://livereload.com/protocols/official-7"],"ver":"2.0.8","snipver":"2"}
2019-10-04 14:59:04 - debug: on connection
2019-10-04 14:59:04 - info:  ::ffff:127.0.0.1 - new connection to websocket server
2019-10-04 14:59:04 - debug: on message: {"command":"info","plugins":{"less":{"disable":false,"version":"1.0"}},"url":"http://localhost:8100/index.html"}
2019-10-04 14:59:04 - debug: on message: {"command":"info","plugins":{"less":{"disable":false,"version":"1.0"}},"url":"http://localhost:8100/index.html"}
2019-10-04 14:59:04 - debug: on message: {"command":"hello","protocols":["http://livereload.com/protocols/official-6","http://livereload.com/protocols/official-7"],"ver":"2.0.8","snipver":"2"}
2019-10-04 14:59:04 - debug: on connection
2019-10-04 14:59:04 - info:  ::ffff:127.0.0.1 - new connection to websocket server
2019-10-04 14:59:04 - debug: on message: {"command":"info","plugins":{"less":{"disable":false,"version":"1.0"}},"url":"http://localhost:8100/"}
2019-10-04 14:59:04 - debug: on message: {"command":"hello","protocols":["http://livereload.com/protocols/official-6","http://livereload.com/protocols/official-7"],"ver":"2.0.8","snipver":"2"}
2019-10-04 14:59:04 - debug: on message: {"command":"info","plugins":{"less":{"disable":false,"version":"1.0"}},"url":"http://localhost:8100/a.html"}

## (echo 2 >a.html) 

2019-10-04 14:59:14 - debug:   watching '/'
2019-10-04 14:59:14 - debug:   skipping '.git/'
2019-10-04 14:59:14 - debug:   watching '.idea/'
2019-10-04 14:59:14 - debug:   watching '.idea/markdown-navigator/'
2019-10-04 14:59:14 - debug:   watching 'css/'
2019-10-04 14:59:14 - debug:   watching 'images/'
2019-10-04 14:59:14 - debug:   watching 'old/'
2019-10-04 14:59:14 - debug:   watching 'quickref/'
2019-10-04 14:59:14 - debug:   watching 'quickref/images/'
2019-10-04 14:59:14 - debug:   watching 'vendor/'
2019-10-04 14:59:14 - debug:   watching 'vendor/Skeleton-2.0.4/'
2019-10-04 14:59:14 - debug:   watching 'vendor/Skeleton-2.0.4/css/'
2019-10-04 14:59:14 - debug:   watching 'vendor/Skeleton-2.0.4/images/'
2019-10-04 14:59:14 - debug:   watching 'vendor/foundation6-essential/'
2019-10-04 14:59:14 - debug:   watching 'vendor/foundation6-essential/css/'
2019-10-04 14:59:14 - debug:   watching 'vendor/foundation6-essential/img/'
2019-10-04 14:59:14 - debug:   watching 'vendor/foundation6-essential/js/'
2019-10-04 14:59:14 - debug:   watching 'vendor/foundation6-essential/js/vendor/'
2019-10-04 14:59:14 - debug: Change !a.html

2019-10-04 14:59:14 - info:  notify: a.html (5 client) s
2019-10-04 14:59:14 - debug: on close
2019-10-04 14:59:14 - info:  ::ffff:127.0.0.1 - websocket connection closed
2019-10-04 14:59:14 - debug: on close
2019-10-04 14:59:14 - info:  ::ffff:127.0.0.1 - websocket connection closed
2019-10-04 14:59:14 - debug: on close
2019-10-04 14:59:14 - info:  ::ffff:127.0.0.1 - websocket connection closed
2019-10-04 14:59:14 - debug: on close
2019-10-04 14:59:14 - info:  ::ffff:127.0.0.1 - websocket connection closed
2019-10-04 14:59:14 - debug: on close
2019-10-04 14:59:14 - info:  ::ffff:127.0.0.1 - websocket connection closed
2019-10-04 14:59:14 - debug: path: /
2019-10-04 14:59:14 - debug: path: /index.html
2019-10-04 14:59:14 - debug: insert snippet at 64450
2019-10-04 14:59:14 - info:  ::ffff:127.0.0.1 - "GET /index.html HTTP/1.1" 200 64637
2019-10-04 14:59:14 - debug: insert snippet at 64450
2019-10-04 14:59:14 - info:  ::ffff:127.0.0.1 - "GET / HTTP/1.1" 200 64637
2019-10-04 14:59:14 - debug: path: /a.html
2019-10-04 14:59:14 - debug: path: /
2019-10-04 14:59:14 - debug: path: /index.html
2019-10-04 14:59:14 - debug: insert snippet at 64450
2019-10-04 14:59:14 - info:  ::ffff:127.0.0.1 - "GET / HTTP/1.1" 200 64637
2019-10-04 14:59:14 - debug: append snippet
2019-10-04 14:59:14 - info:  ::ffff:127.0.0.1 - "GET /a.html HTTP/1.1" 200 164
2019-10-04 14:59:14 - debug: insert snippet at 64450
2019-10-04 14:59:14 - info:  ::ffff:127.0.0.1 - "GET /index.html HTTP/1.1" 200 64637
2019-10-04 14:59:15 - info:  ::ffff:127.0.0.1 - "GET /livereload.js?snipver=2&port=8100 HTTP/1.1" 304 -
2019-10-04 14:59:15 - debug: path: /css/normalize.css
2019-10-04 14:59:15 - debug: path: /css/skeleton.css
2019-10-04 14:59:15 - info:  ::ffff:127.0.0.1 - "GET /css/skeleton.css HTTP/1.1" 304 -
2019-10-04 14:59:15 - debug: path: /css/site.css
2019-10-04 14:59:15 - debug: path: /css/normalize.css
2019-10-04 14:59:15 - info:  ::ffff:127.0.0.1 - "GET /css/site.css HTTP/1.1" 304 -
2019-10-04 14:59:15 - info:  ::ffff:127.0.0.1 - "GET /css/normalize.css HTTP/1.1" 304 -
2019-10-04 14:59:15 - debug: path: /css/skeleton.css
2019-10-04 14:59:15 - info:  ::ffff:127.0.0.1 - "GET /css/skeleton.css HTTP/1.1" 304 -
2019-10-04 14:59:15 - debug: path: /css/site.css
2019-10-04 14:59:15 - debug: path: /css/normalize.css
2019-10-04 14:59:15 - info:  ::ffff:127.0.0.1 - "GET /css/normalize.css HTTP/1.1" 200 7797
2019-10-04 14:59:15 - debug: end
2019-10-04 14:59:15 - info:  ::ffff:127.0.0.1 - "GET /css/site.css HTTP/1.1" 304 -
2019-10-04 14:59:15 - info:  ::ffff:127.0.0.1 - "GET /css/normalize.css HTTP/1.1" 304 -
2019-10-04 14:59:15 - debug: path: /css/skeleton.css
2019-10-04 14:59:15 - debug: path: /css/normalize.css
2019-10-04 14:59:15 - debug: path: /css/site.css
2019-10-04 14:59:15 - info:  ::ffff:127.0.0.1 - "GET /css/skeleton.css HTTP/1.1" 304 -
2019-10-04 14:59:15 - info:  ::ffff:127.0.0.1 - "GET /css/normalize.css HTTP/1.1" 304 -
2019-10-04 14:59:15 - info:  ::ffff:127.0.0.1 - "GET /css/site.css HTTP/1.1" 304 -
2019-10-04 14:59:15 - debug: path: /css/skeleton.css
2019-10-04 14:59:15 - info:  ::ffff:127.0.0.1 - "GET /css/skeleton.css HTTP/1.1" 304 -
2019-10-04 14:59:15 - debug: path: /css/site.css
2019-10-04 14:59:15 - info:  ::ffff:127.0.0.1 - "GET /css/site.css HTTP/1.1" 304 -
2019-10-04 14:59:15 - info:  ::ffff:127.0.0.1 - "GET /livereload.js?snipver=2&port=8100 HTTP/1.1" 304 -
2019-10-04 14:59:15 - info:  ::ffff:127.0.0.1 - "GET /livereload.js?snipver=2&port=8100 HTTP/1.1" 304 -
2019-10-04 14:59:15 - info:  ::ffff:127.0.0.1 - "GET /livereload.js?snipver=2&port=8100 HTTP/1.1" 304 -
2019-10-04 14:59:16 - info:  ::ffff:127.0.0.1 - "GET /livereload.js?snipver=2&port=8100 HTTP/1.1" 304 -

## (echo 3 >a.html)

2019-10-04 14:59:41 - debug:   watching '/'
2019-10-04 14:59:41 - debug:   skipping '.git/'
2019-10-04 14:59:41 - debug:   watching '.idea/'
2019-10-04 14:59:41 - debug:   watching '.idea/markdown-navigator/'
2019-10-04 14:59:41 - debug:   watching 'css/'
2019-10-04 14:59:41 - debug:   watching 'images/'
2019-10-04 14:59:41 - debug:   watching 'old/'
2019-10-04 14:59:41 - debug:   watching 'quickref/'
2019-10-04 14:59:41 - debug:   watching 'quickref/images/'
2019-10-04 14:59:41 - debug:   watching 'vendor/'
2019-10-04 14:59:41 - debug:   watching 'vendor/Skeleton-2.0.4/'
2019-10-04 14:59:41 - debug:   watching 'vendor/Skeleton-2.0.4/css/'
2019-10-04 14:59:41 - debug:   watching 'vendor/Skeleton-2.0.4/images/'
2019-10-04 14:59:41 - debug:   watching 'vendor/foundation6-essential/'
2019-10-04 14:59:41 - debug:   watching 'vendor/foundation6-essential/css/'
2019-10-04 14:59:41 - debug:   watching 'vendor/foundation6-essential/img/'
2019-10-04 14:59:41 - debug:   watching 'vendor/foundation6-essential/js/'
2019-10-04 14:59:41 - debug:   watching 'vendor/foundation6-essential/js/vendor/'
2019-10-04 14:59:41 - debug: Change !a.html

2019-10-04 14:59:41 - info:  notify: a.html (0 client) 

## (echo 4 >a.html)

2019-10-04 15:00:03 - debug:   watching '/'
2019-10-04 15:00:03 - debug:   skipping '.git/'
2019-10-04 15:00:03 - debug:   watching '.idea/'
2019-10-04 15:00:03 - debug:   watching '.idea/markdown-navigator/'
2019-10-04 15:00:03 - debug:   watching 'css/'
2019-10-04 15:00:03 - debug:   watching 'images/'
2019-10-04 15:00:03 - debug:   watching 'old/'
2019-10-04 15:00:03 - debug:   watching 'quickref/'
2019-10-04 15:00:03 - debug:   watching 'quickref/images/'
2019-10-04 15:00:03 - debug:   watching 'vendor/'
2019-10-04 15:00:03 - debug:   watching 'vendor/Skeleton-2.0.4/'
2019-10-04 15:00:03 - debug:   watching 'vendor/Skeleton-2.0.4/css/'
2019-10-04 15:00:03 - debug:   watching 'vendor/Skeleton-2.0.4/images/'
2019-10-04 15:00:03 - debug:   watching 'vendor/foundation6-essential/'
2019-10-04 15:00:03 - debug:   watching 'vendor/foundation6-essential/css/'
2019-10-04 15:00:03 - debug:   watching 'vendor/foundation6-essential/img/'
2019-10-04 15:00:03 - debug:   watching 'vendor/foundation6-essential/js/'
2019-10-04 15:00:03 - debug:   watching 'vendor/foundation6-essential/js/vendor/'
2019-10-04 15:00:03 - debug: Change !a.html

2019-10-04 15:00:03 - info:  notify: a.html (0 client) 
2019-10-04 15:00:04 - debug: on connection
2019-10-04 15:00:04 - info:  ::ffff:127.0.0.1 - new connection to websocket server
2019-10-04 15:00:04 - debug: on message: {"command":"hello","protocols":["http://livereload.com/protocols/official-6","http://livereload.com/protocols/official-7"],"ver":"2.0.8","snipver":"2"}
2019-10-04 15:00:04 - debug: on connection
2019-10-04 15:00:04 - info:  ::ffff:127.0.0.1 - new connection to websocket server
2019-10-04 15:00:04 - debug: on message: {"command":"info","plugins":{"less":{"disable":false,"version":"1.0"}},"url":"http://localhost:8100/a.html"}
2019-10-04 15:00:04 - debug: on message: {"command":"hello","protocols":["http://livereload.com/protocols/official-6","http://livereload.com/protocols/official-7"],"ver":"2.0.8","snipver":"2"}
2019-10-04 15:00:04 - debug: on connection
2019-10-04 15:00:04 - info:  ::ffff:127.0.0.1 - new connection to websocket server
2019-10-04 15:00:04 - debug: on message: {"command":"info","plugins":{"less":{"disable":false,"version":"1.0"}},"url":"http://localhost:8100/"}
2019-10-04 15:00:04 - debug: on message: {"command":"hello","protocols":["http://livereload.com/protocols/official-6","http://livereload.com/protocols/official-7"],"ver":"2.0.8","snipver":"2"}
2019-10-04 15:00:04 - debug: on connection
2019-10-04 15:00:04 - info:  ::ffff:127.0.0.1 - new connection to websocket server
2019-10-04 15:00:04 - debug: on message: {"command":"info","plugins":{"less":{"disable":false,"version":"1.0"}},"url":"http://localhost:8100/index.html"}
2019-10-04 15:00:04 - debug: on message: {"command":"hello","protocols":["http://livereload.com/protocols/official-6","http://livereload.com/protocols/official-7"],"ver":"2.0.8","snipver":"2"}
2019-10-04 15:00:04 - debug: on connection
2019-10-04 15:00:04 - info:  ::ffff:127.0.0.1 - new connection to websocket server
2019-10-04 15:00:04 - debug: on message: {"command":"info","plugins":{"less":{"disable":false,"version":"1.0"}},"url":"http://localhost:8100/index.html"}
2019-10-04 15:00:04 - debug: on message: {"command":"hello","protocols":["http://livereload.com/protocols/official-6","http://livereload.com/protocols/official-7"],"ver":"2.0.8","snipver":"2"}
2019-10-04 15:00:04 - debug: on message: {"command":"info","plugins":{"less":{"disable":false,"version":"1.0"}},"url":"http://localhost:8100/#software"}

## (browser still showing 2.. manually reload)

2019-10-04 15:00:17 - debug: on close
2019-10-04 15:00:17 - info:  ::ffff:127.0.0.1 - websocket connection closed
2019-10-04 15:00:17 - debug: path: /a.html
2019-10-04 15:00:17 - debug: append snippet
2019-10-04 15:00:17 - info:  ::ffff:127.0.0.1 - "GET /a.html HTTP/1.1" 200 164
2019-10-04 15:00:17 - info:  ::ffff:127.0.0.1 - "GET /livereload.js?snipver=2&port=8100 HTTP/1.1" 304 -

## (browser shows 4)
  C-c C-c

Here are just the notify messages from another test, with 10 file updates, only one of which triggered a reload:

2019-10-04 15:02:54 - info:  notify: a.html (3 client) s
2019-10-04 15:03:07 - info:  notify: a.html (5 client) s
2019-10-04 15:03:13 - info:  notify: a.html (0 client) 
2019-10-04 15:03:18 - info:  notify: a.html (0 client) 
2019-10-04 15:03:22 - info:  notify: a.html (0 client) 
2019-10-04 15:03:24 - info:  notify: a.html (0 client) 
2019-10-04 15:03:26 - info:  notify: a.html (0 client) 
2019-10-04 15:03:29 - info:  notify: a.html (0 client) 
2019-10-04 15:03:31 - info:  notify: a.html (0 client) 

I think the "(0 client)" message corresponds with no reload.

Why would it be doing that ?

@simonmichael simonmichael changed the title sometimes not reloading ("(0 client)") sometimes not reloading ("0 client") Oct 5, 2019
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

1 participant