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
state is undefined #4
Comments
But Chrome tells me a different trace:
Weird |
Using latest websocket-stream package, where Duplexify.Writable.write() is triggered |
Debugged more in Chrome. Problem is that part of code. Writable.prototype.write = function (chunk, encoding, cb) {
var state = this._writableState;
var ret = false;
if (typeof encoding === 'function') {
cb = encoding;
encoding = null;
}
if (Buffer.isBuffer(chunk)) encoding = 'buffer';else if (!encoding) encoding = state.defaultEncoding;
if (typeof cb !== 'function') cb = nop;
if (state.ended) writeAfterEnd(this, cb);else if (validChunk(this, state, chunk, cb)) {
state.pendingcb++;
ret = writeOrBuffer(this, state, chunk, encoding, cb);
}
return ret;
}; |
Socket is not destroyed, not ended yet. Using node v6.20 here. |
There is another weird thing: if I run my code locally, this does not happen. Only on my remote server upon deployment. Maybe a firewall issue? |
any advice?? would be good because it's breaking my site. thanks |
Can you reproduce it? You can try with wireshark to get a capture of the latest packet sent that triggers it. |
honestly, i have no idea how to reproduce - only happens on my remote server, not on my local server. and what exactly should i capture on wireshark? you can see it yourself, it's the site www.videomail.io - just hit on the record button and then that error happens every time :( any quick advice would be very much appreciated - thanks |
@mcollina I found out, that this only happens when code is minified. Does not happen when not minified. I am minifying the client side code with gulp uglify like this .pipe(plugins.if(settings.server.minify.js, plugins.uglify({
mangle: false, // because of angularjs :(
// keep line breaks for easier locating of weird errors (temporary)
output: {
"beautify": true, // Add new lines
"indent_level": 0, // Don't add indentation
"indent_start": 0
}
}))) |
@mcollina to reproduce I guess you try to uglify some code that uses Duplexify and then see how it goes |
I'm having the same issue when I use |
I see this error. Here the trace from minified code but hope it gives you some clues what the problem is:
Taken from latest Firefox
The text was updated successfully, but these errors were encountered: