hiddentao / gulp-server-livereload

Gulp plugin to run a local webserver with livereload enabled via socket.io. Also comes with standalone command-line interface.
MIT License
93 stars 28 forks source link

extra=capture-console Argument for livereload.js lead to browser tab hanging. #34

Closed VanDalkvist closed 8 years ago

VanDalkvist commented 8 years ago

I tried to add

s.setAttribute('src', lrHost + '/livereload.js?extra=capture-console');

to the script that includes lovereload script to html page. And this lead to browser tab hanging. It is normally works with

s.setAttribute('src', lrHost + '/livereload.js');

Browser is Chrome 49.0.2623.112 m

hiddentao commented 8 years ago

What happens if you enable it through the config options.. still hangs? In the network tab can you see if it actually loading the console capture script? Also, does this happen on more than one browser?

VanDalkvist commented 8 years ago

In case I have no clientConsole attribute in config it hangs - in Chrome and Firefox. In this case I have next config:

{
        "livereload": true,
        "directoryListing": false,
        "open": false,
        "host": "127.0.0.1",
        "port": 3111
    };

In case I have clientConsole argument It does not hangs but here is an error in the browser:

2016-04-21 21:08:36.248 (index):73 GET http://localhost:35729/livereload.js?extra=capture-console net::ERR_CONNECTION_REFUSED(anonymous function) @ (index):73(anonymous function) @ (index):74

And livereload doesn't work because file is not loaded. Config for the scenario is:

{
        "livereload": {
            "clientConsole": true
        },
        "directoryListing": false,
        "open": false,
        "host": "127.0.0.1",
        "port": 3111
    }
hiddentao commented 8 years ago

Thanks, will look into this. I don't use client console capture regularly myself so a bug may been introduced at some point.

hiddentao commented 8 years ago

Fixed in 1.8.0. This was due to a bug in the console capture script code.