GitHub Documentation Patreon donate button

colyseus.js: server error: no available handler for client



  • I am getting the following error in my NodeJS Program:
    colyseus.js: server error: no available handler for "1mnyb2mkjtz2mv9y"

    However, I do have handlers attached to the clients. Below is my server-side code:

    user.on("connected", attachHandler);

    // Attach a handler to the room
    function attachHandler(clientID) {
    console.log("attaching handler to " + clientID);
    gameServer.register(clientID, require('./rooms/mazebattles'));
    }

    And below is my client-side code where the user connects to the room:

    room = client.join(roomID, {create: true}); // Create a new room, and have that client join the room
    socket.emit("connected", socket.id);


  • administrator

    Colyseus is not supposed to be used along with socket.io. Why would you need socket.io AND colyseus?


 

GitHub Documentation Patreon donate button

© 2019 Endel Dreyer