You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Crash on node.js 4.0 / socket.io 1.3.6 (unexpected disconnect?) #2236
Today I got socket.io going great for a simple chat setup. However, if I refresh the screen rapidly, it crashes my node instance. Here is the error:
assert.js:89
throw new assert.AssertionError({
^
AssertionError: false == true
at ServerResponse.resOnFinish (_http_server.js:473:7)
at emitNone (events.js:67:13)
at ServerResponse.emit (events.js:166:7)
at finish (_http_outgoing.js:526:10)
at doNTCallback0 (node.js:407:9)
at process._tickDomainCallback (node.js:377:13)
Google has been unhelpful. I'm hoping someone else solved this.
Unfortunately, I also upgraded to node 4.0 today because I am a huge fan of => functions.
It could be related to that, although it only happens when I have the socket.io code loaded. The code I'm using is very simple:
var server = http.createServer(app);
var io = require('socket.io')(server);
io.on('connection', function (socket) {
socket.emit('juxtami.com', { hello: 'world' });
};
server.listen(8888);
I'm using express.js 4.13 and followed the information from the website.
I want to stress that it works fine unless I force disconnects by refreshing the client page (causing the JS to disconnect abruptly, I'm guessing.)
I found several comments about similar issues in earlier versions of node. It seems there was a bug fix that kept disconnects from throwing an error, but maybe there was reversion? Or maybe it is just similar?
@chisleu, did you rebuild all dependencies (including socket.io) after an Node.js upgrade? Native addons compiled for 0.12 won't work with 4.0.0 until you rebuild them.
Atm, when you will try to build socket.io with Node.js 4.0.0, you will experience this bug: #2228.
Same for me. 0.12 was fine, just after upgrade to node 4 I started to see these errors.
On a separate box I did fresh install of node and all depending modules - same thing.
AssertionError: false == true
at ServerResponse.resOnFinish (_http_server.js:473:7)
at emitNone (events.js:67:13)
at ServerResponse.emit (events.js:166:7)
at finish (_http_outgoing.js:526:10)
at doNTCallback0 (node.js:407:9)
at process._tickDomainCallback (node.js:377:13)
I can confirm this with node 4.0 and socket.io 1.3.6 on Linux. I also did a clean install of the node modules (deleted node_modules and did a npm install).
I also got the same stacktrace:
assert.js:89
throw new assert.AssertionError({
^
AssertionError: false == true
at ServerResponse.resOnFinish (_http_server.js:473:7)
at emitNone (events.js:67:13)
at ServerResponse.emit (events.js:166:7)
at finish (_http_outgoing.js:526:10)
at doNTCallback0 (node.js:407:9)
at process._tickCallback (node.js:336:13)
@chisleu why dont you use the --harmony flag in node 0.12 to use your arrow functions?
I've got the same error on node 4.1, after removing and reinstalling with npm install the issue still exists but happens later. At first I only needed 2 refreshes of the page, now it takes me about 20 refreshes.
@vandernorth The scope in 0.12's arrow functions isn't lexical. That is the only reason I'm using them. They can keep my prototype function code more simple, if I don't have to set the class' this to something else.
I've upgraded to 1.3.7 with node 4.1 but after refreshing 4 pages at the same time I still seem to get this error. I'm testing on windows this time, not sure if that makes any difference. I did not see any error in the build/install process.
assert.js:89
throw new assert.AssertionError({
^
AssertionError: false == true
at ServerResponse.resOnFinish (_http_server.js:473:7)
at emitNone (events.js:67:13)
at ServerResponse.emit (events.js:166:7)
at finish (_http_outgoing.js:526:10)
at doNTCallback0 (node.js:407:9)
at process._tickCallback (node.js:336:13)
@laggingreflex Yes I did, but I can no longer trace my current issue back to socket.io.
What I'm experiencing now looks more like nodejs/node#2639
Ill start searching from there, thanks anyway!
Closing as it no longer appears linked to just socket.io
assert.js:89
throw new assert.AssertionError({
^
AssertionError: false == true
at ServerResponse.resOnFinish (_http_server.js:473:7)
at emitNone (events.js:67:13)
at ServerResponse.emit (events.js:166:7)
at finish (_http_outgoing.js:526:10)
at doNTCallback0 (node.js:407:9)
at process._tickDomainCallback (node.js:377:13)
Activity
chisleu commentedon Sep 10, 2015
Update: doesn't seem to break on 0.12.7 so I guess I'll revert. It's a shame because I wrote a good bit of code with arrow functions.
lepture commentedon Sep 12, 2015
socket.io, please don't pin your dependencies. Use
^,~etc.ChALkeR commentedon Sep 12, 2015
@chisleu, did you rebuild all dependencies (including socket.io) after an Node.js upgrade? Native addons compiled for 0.12 won't work with 4.0.0 until you rebuild them.
Atm, when you will try to build socket.io with Node.js 4.0.0, you will experience this bug: #2228.
chisleu commentedon Sep 12, 2015
I deleted node_modules and did
npm install.I didn't notice that output. I did find that it worked until I refreshed the browser over and over.
kesgri commentedon Sep 16, 2015
Same for me. 0.12 was fine, just after upgrade to node 4 I started to see these errors.
On a separate box I did fresh install of node and all depending modules - same thing.
AssertionError: false == true
at ServerResponse.resOnFinish (_http_server.js:473:7)
at emitNone (events.js:67:13)
at ServerResponse.emit (events.js:166:7)
at finish (_http_outgoing.js:526:10)
at doNTCallback0 (node.js:407:9)
at process._tickDomainCallback (node.js:377:13)
kleinph commentedon Sep 16, 2015
I can confirm this with node 4.0 and socket.io 1.3.6 on Linux. I also did a clean install of the node modules (deleted node_modules and did a
npm install).I also got the same stacktrace:
vandernorth commentedon Sep 17, 2015
@chisleu why dont you use the --harmony flag in node 0.12 to use your arrow functions?
I've got the same error on node 4.1, after removing and reinstalling with npm install the issue still exists but happens later. At first I only needed 2 refreshes of the page, now it takes me about 20 refreshes.
chisleu commentedon Sep 17, 2015
@vandernorth The scope in 0.12's arrow functions isn't lexical. That is the only reason I'm using them. They can keep my prototype function code more simple, if I don't have to set the class' this to something else.
ivaylopivanov commentedon Sep 19, 2015
Segmentation fault (core dumped),
ubuntu 14.04,
node 4.0.0,
socket.io 1.3.5
laggingreflex commentedon Sep 21, 2015
1.3.7 is out. I think it solves this?
youth7 commentedon Sep 22, 2015
same to me , but it happen more frequently while the client is IOS. it rarely happen on Android
chisleu commentedon Sep 22, 2015
I upgraded to socket.io 1.3.7 and node 4.1.
It now builds without errors and doesn't seem to crash like it did before!!
👍
ivaylopivanov commentedon Sep 22, 2015
Yep, 1.3.7 is okay
vandernorth commentedon Sep 22, 2015
I've upgraded to 1.3.7 with node 4.1 but after refreshing 4 pages at the same time I still seem to get this error. I'm testing on windows this time, not sure if that makes any difference. I did not see any error in the build/install process.
assert.js:89
throw new assert.AssertionError({
^
AssertionError: false == true
at ServerResponse.resOnFinish (_http_server.js:473:7)
at emitNone (events.js:67:13)
at ServerResponse.emit (events.js:166:7)
at finish (_http_outgoing.js:526:10)
at doNTCallback0 (node.js:407:9)
at process._tickCallback (node.js:336:13)
laggingreflex commentedon Sep 22, 2015
Have you tried deleting all node_modules and doing a fresh install?
vandernorth commentedon Sep 23, 2015
@laggingreflex Yes I did, but I can no longer trace my current issue back to socket.io.
What I'm experiencing now looks more like nodejs/node#2639
Ill start searching from there, thanks anyway!
chisleu commentedon Sep 23, 2015
Closing as it no longer appears linked to just socket.io