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
BadNamespaceError / is not a connected namespace #1113
Comments
The emit that fails is being issued after the server disconnected you. You are reporting the bug as being that, but in reality you need to find out why is the server disconnecting after a while. Your client code could also be more robust and detect the disconnection to prevent issuing emits while disconnected. |
My server code is const fs = require('fs');
const { createServer } = require("https");
const { Server } = require("socket.io");
const httpServer = createServer({
key: fs.readFileSync("/priv.key"),
cert: fs.readFileSync("/cert.crt")
});
const options = {
cors: {
origin: "*"
},always_connect:true
};
const io = new Server(httpServer, options);
io.on("connection", function (socket) {
socket.on("debug", function (data) {
console.log("RECEIVE: "+data.msg);
});
});
httpServer.listen(3001, function () {
console.log("StARTED ");
}); It's just that, I wouldn't see why it disconnects me |
other times response is: Log:
|
I really cannot tell you why, but as you can see in your own logs, the server is responding with a 400 error. Why is your Node server doing this? |
Describe the bug
Sometimes it comes back to me
To Reproduce
I've been trying various ways
First attempt:
Second attempt:
Expected behavior
Send message at the end of a long task
Logs
The text was updated successfully, but these errors were encountered: