Implementing socket.io with Node Cluster - error ERR_INTERNAL_ASSERTION when connected from Client #4713
Replies: 0 comments 12 replies
-
Referred implementation here https://socket.io/docs/v4/cluster-adapter/ |
Beta Was this translation helpful? Give feedback.
-
Can you post a minimal test case using only built-in modules? I.e., not express, socket.io, etc. |
Beta Was this translation helpful? Give feedback.
-
@chandregowda This scipt included in the zip is not self-contained, could you please upload the
I tried, this work fine in latest node |
Beta Was this translation helpful? Give feedback.
-
I was using canvas from nodejs and got the "ERR_INTERNAL_ASSERATION" |
Beta Was this translation helpful? Give feedback.
-
package.json content
|
Beta Was this translation helpful? Give feedback.
-
My requirement is to use socket.io with cluster, and express is used only for routes and static folder handling |
Beta Was this translation helpful? Give feedback.
-
Then I'll go ahead and convert this to a discussion. So far there's no reason to believe it's a node bug vs. simply holding it wrong. |
Beta Was this translation helpful? Give feedback.
-
I also got this issue. In my case the problem was caused by the fact that I created socket.io connection with server already used by Express.js. Solution was to create a new http server for socket.io only. i.e.
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Version
v16.17.0
Platform
Microsoft Windows NT 10.0.22000.0 x64
Subsystem
No response
What steps will reproduce the bug?
Node server.js - Once it sends the requested data to the connected socket (from client side) and exit with the Exception 'ERR_INTERNAL_ASSERTION'
server.zip
How often does it reproduce? Is there a required condition?
Every time I connect or reconnect to the Node server with socket from the Client, it is exiting with this error
What is the expected behavior?
Socket connection should be established when running node server with cluster mode
What do you see instead?
Additional information
Without Cluster implementation - it is working fine
Beta Was this translation helpful? Give feedback.
All reactions