You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While attempting to add a password system to my game using the auth API provided by SceneMultiplayer I encountered an issue in which if a client leaves after calling an RPC and reconnects the server will use their previous id in complete_auth(id) despite being given their new id. This happens when calling it directly and using call_deferred(). I've made sure id is not declared anywhere outside the functions and logging suggests that it should be receiving the new id.
(Blue numbers are what I assume the order of execution to roughly be.)
(Note that the logging message and the complete_auth() have the same id variable, suggesting the second connection should have used 2049066911 not the old id 1865169831.)
Steps to reproduce
-Create a simple multiplayer game.
-Use auth tools provided by SceneMultiplayer.
-Have a client connect.
-Have client call RPC.
-Have client disconnect.
-Have client attempt reconnect.
Minimal reproduction project (MRP)
-Open project.
-Start 2 instances.
-Select "Host" on one instance to make it the server.
-Select "Join" on the other instance to make it a client, the client will automatically call an RPC.
-Select "Leave" on the client.
-Select "Join" on the client again to see the bug.
Commenting out the RPC call makes the bug go away. Commenting out the auth bindings in _ready() also makes the bug go away. The issue arises when both are done. If host is restarted the client can connect again, but still only once.
Tested versions
System information
Godot v4.2.1.stable - Windows 10.0.19045 - Vulkan (Mobile) - dedicated NVIDIA GeForce RTX 3060 (NVIDIA; 31.0.15.3742) - AMD Ryzen 9 5900X 12-Core Processor (24 Threads)
Issue description
While attempting to add a password system to my game using the auth API provided by SceneMultiplayer I encountered an issue in which if a client leaves after calling an RPC and reconnects the server will use their previous id in complete_auth(id) despite being given their new id. This happens when calling it directly and using call_deferred(). I've made sure id is not declared anywhere outside the functions and logging suggests that it should be receiving the new id.
(Blue numbers are what I assume the order of execution to roughly be.)
(Note that the logging message and the complete_auth() have the same id variable, suggesting the second connection should have used 2049066911 not the old id 1865169831.)
Steps to reproduce
-Create a simple multiplayer game.
-Use auth tools provided by SceneMultiplayer.
-Have a client connect.
-Have client call RPC.
-Have client disconnect.
-Have client attempt reconnect.
Minimal reproduction project (MRP)
-Open project.
-Start 2 instances.
-Select "Host" on one instance to make it the server.
-Select "Join" on the other instance to make it a client, the client will automatically call an RPC.
-Select "Leave" on the client.
-Select "Join" on the client again to see the bug.
Commenting out the RPC call makes the bug go away. Commenting out the auth bindings in _ready() also makes the bug go away. The issue arises when both are done. If host is restarted the client can connect again, but still only once.
Auth_Error.zip
The text was updated successfully, but these errors were encountered: