Socket io Websocket Disabled Node js

I actually ran into a problem. I have a login page. From there, I go to another page. From there I will disconnect my socket.

What I am trying to do is

On my server side app.js

app.post('/login', urlencodedParser, function(req, res) {
req.session.username = req.body.usr;
req.session.password = req.body.pass; 
req.session.password = 380; 
authenticatAPI.logIn(req, res);
});

      

From here to authenticate js (server side)

getUserName = req.body.usr;
getPassword = req.body.pass;
req.session.username = getUserName;
req.session.password = getPassword;
res.send({url:"screen1.html",id:100,usr:getUserName});

      

From here to the client side

var socket = io.connect('http://localhost:8080');

      

When I get here again it goes for app.js and enters the io.on ("connection") function, here I get an error when I debug using node.

"Remote debugging stopped. Websocket closed, reconnect new target." What am I supposed to do here ...?

+3


source to share


1 answer


I bet you have a node check the set to break on caught exceptions. Try unchecking the Pause Thrown Exceptions check box next to the right side of the debugger.

enter image description here



Otherwise, you are probably using a third party library that uses socket.io which is throwing this error.

+2


source







All Articles