[C#] MultiplayerSynchronizer "Node Not Found" only on Server (Manual Spawn)

Godot Version

4.6

Question

Hi everyone,

I am developing a co-op game using Godot 4.6. I am using a custom manual Spawning system (RPC + Instantiate) managed by a GameManager, without using the MultiplayerSpawner node for now.

I am facing a systematic Race Condition, but it ONLY affects the Server’s (Host) character.

The Scenario:

  1. Server (Host) is in-game with their character spawned.

  2. Client A joins.

    • They immediately get a “Node Not Found” error regarding the Server’s MultiplayerSynchronizer.

    • Result: The Server’s character remains frozen/invisible on Client A.

  3. Client B joins.

    • They also get the “Node Not Found” error for the Server’s character.

    • HOWEVER, they get NO error regarding Client A’s character (who is also already spawned and moving). Client A syncs perfectly fine on Client B.

The Exact Error: get_node: Node not found: "root/Main/PlayersContainer/1/MultiplayerSynchronizer" (This error always appears for ID 1, never for other Clients’ IDs).

The Workaround: I discovered that if I disable PublicVisibility (or the Synchronizer) by default on the Player scene:

  1. The Client joins (no error).

  2. I manually enable PublicVisibility on the Server’s character (via the Inspector or deferred code) AFTER the client has finished loading.

  3. Synchronization starts and everything works.

The Mystery: I do NOT need to do this workaround for Clients. Their characters sync perfectly with each other without disabling visibility beforehand. It seems that only the Server’s character, which sends its data directly without relay, arrives “too early” at the clients, before the Spawn RPC has created the node. The relay delay for other clients seems to be enough to prevent this race condition.

My Question: Without using MultiplayerSpawner (which I find tricky to configure via C# code for specific needs), how can I cleanly handle this timing? Is it normal for the Server to send sync packets to a Peer that hasn’t confirmed being “Ready” or having spawned the scene yet?

Thanks in advance for your help!

(PS: I used an AI to translate this message into English as my level isn’t great. Thank you for your understanding!)

Problem solved! I’m posting the solution here in case anyone else runs into this.

By default, it broadcasts to everyone (ID 0), so you have to filter the audience using SetVisibilityFor().

However, I noticed that a client can still broadcast to everyone if they have authority over their character, even if the character synchronizer is set to false on the server side.

So, from a security standpoint, it’s not great

2 Likes