GitHub | Documentation | Discord (chat) | Become a Patron

"Argument exception: An element with the same key already exist in the dictionary" at line 214 in Client.cs



  • Hello at the moment I have a problem with Colyseus "Argument exception: An element with the same key already exist in the dictionary" at line 214 in Client.cs , the logs show that I left a room properly but apparently this.rooms of client.cs did not delete the key in the dictionary.
    (It happens when I want to change rooms, I leave the room in progress then I join a new room, moreover the error does not trigger often and is rather random)

    0_1546857482833_fb627d24-10f5-4028-a87d-db892b7dabc2-image.png
    Thanks for help


  • administrator

    Pull-requests are welcome for this!



  • I do not have a solution strictly speaking to counter the problem in a "clean" way, only a way to circumvent the problem by adding a condition that would remove an element of the dictionary if it already exists