I'am using gulp for run browser-sync.
var gulp = require('gulp'),
browserSync = require("browser-sync");
gulp.task('default', ['browser-sync']);
gulp.task('browser-sync', function() {
browserSync({
server: {
baseDir: "./",
directory: true
}
});
});
but google-chrome push in console
GET https://localhost:3000/browser-sync/socket.io/?EIO=3&transport=polling&t=1426265203441-31 net::ERR_CONNECTION_CLOSED
ver. browser-sync -> 2.2.3
but Firefox working
if add https param then google chrome working
gulp.task('browser-sync', function() {
browserSync({
server: {
baseDir: "./",
directory: true,
https: true
},
});
});
You were likely trying to access the url in the first example via https when you had not enabled it.
Happy to re-open this if you can provide a reduced test-case example project that highlights this problem :)
To me, with either https false or undefined, browsersync js tries to connect to https version of the polling url while the page is opened in http
Any update on this issue? I'm facing the same problem. No matter what I try the pooling url is requested under https and it breaks almost every time.
Is there a way to force the livereload to use http instead of https?
Thanks
+1. Switch to https caused many problems in my dev environment. Anyway to use http in Chrome?
Thanks.
Changed socket config, and now works
socket: {
domain: 'http://localhost:3000'
}
Most helpful comment
Changed socket config, and now works