When BrowserSync is running, the console is just constantly spammed with the following every few milliseconds:
engine.io-client:socket socket receive: type "pong", data "undefined" +1ms
engine.io-client:socket writing ping packet - expecting pong within 60000ms +6ms
This makes standard debugging with console.log() impossible, and floods out any other logging. Is there an option or something I can do to disable this message?
I can't reproduce that.
OSX Yosemite
Chrome & Firefox (screenshots below)
0.12.0
2.2.1
API
Here's some screenshots of the console logging:


API
Could you show us the script?
Sure:
gulp.task('sync', ['serve'], function(cb) {
browserSync.init({
files: ['build/**/*.*'],
ui: { port: 9090 },
proxy: 'localhost:9000',
port: 9001,
notify: false,
https: false
}, cb);
});
I still cannot reproduce the logs like that...
How do you host the localhost:9000 site? Other program?
Express server, instantiated through Nodemon. It's an isomorphic React app. I use Express for the server, React + Fluxible for the app, Webpack to bundle js, and Gulp to manage all other assets.
I got the same issue on Chrome 40.0.2214.115 (OSX 10.10.1, node v0.10.33) .
Chrome Canary 43.0.2316.0, Safari 8.0.2, and Firefox 36.0 didn't reproduce.
minimum code is:
'use strict';
var browserSync = require('browser-sync');
browserSync({
server: 'public',
files: 'public/index.html'
});
browser-sync version is 2.2.1.
HTML
<!doctype html>
<html class="no-js" lang="">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title></title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="apple-touch-icon" href="apple-touch-icon.png">
<!-- Place favicon.ico in the root directory -->
</head>
<body>
<!--[if lt IE 8]>
<p class="browserupgrade">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.</p>
<![endif]-->
<!-- Add your site or application content here -->
<p>Hello world! This is HTML5 Boilerplate.</p>
<!-- Google Analytics: change UA-XXXXX-X to be your site's ID. -->
<script>
(function(b,o,i,l,e,r){b.GoogleAnalyticsObject=l;b[l]||(b[l]=
function(){(b[l].q=b[l].q||[]).push(arguments)});b[l].l=+new Date;
e=o.createElement(i);r=o.getElementsByTagName(i)[0];
e.src='//www.google-analytics.com/analytics.js';
r.parentNode.insertBefore(e,r)}(window,document,'script','ga'));
ga('create','UA-XXXXX-X','auto');ga('send','pageview');
</script>
</body>
</html>
Server
'use strict';
var browserSync = require('browser-sync');
browserSync({
server: 'public',
files: 'public/index.html'
});

:(
I'll try it again with different Node versions...
@koba04 Does your Chrome produce exactly the same logs as @benoneal's?
Ah, OK. I found a temporary solution.
localStorage.debug = '' and :leftwards_arrow_with_hook: Maybe this will do the trick.
@shinnn
Yes, logs are same as @benoneal's.
I tried the way that you taught me, it occurs no longer!
Thank you!
@shinnn: Thanks for looking into this for us. Is a more permanent fix in the works? We're using this across a team of 30 developers and would rather not have to require them all to re-assign their browser's localStorage.debug.
@benoneal Yes, I want to fix this problem fundamentally, too.
@shakyShane We should exclude debug module from the client-side script anyway.
In case it helps, that localStorage.debug = '' trick didn't work at all for me in Chrome. Didn't try any other browsers though.
There's nothing in the BrowserSync source code would cause this logging, so I think it's a fair decision to close this. That being said, I'd be happy to work on a solution should a sample project be provided that can reproduce the problem.
but @shakyShane
this line says that is browser-sync code line
browser-sync-client.2.5.1.js:2 engine.io-client:socket writing ping packet - expecting pong within 60000ms +5s
and its shows that call is being made from: browser-sync-client.2.5.1.js
from the function:
function log(){return"object"==typeof console&&"function"==typeof console.log&&Function.prototype.apply.call(console.log,console,arguments)}
Having the same issue here on OS X 10.11
having the same issue here on Win 7 - mozila firefox 45. it is really annoying
Having the same issue on
Sierra OSX 10.12
Node 6
Logs appear on all browsers.
Most helpful comment
Ah, OK. I found a temporary solution.
localStorage.debug = ''and :leftwards_arrow_with_hook:Maybe this will do the trick.