MultiplayerSynchronizer refusing to sync; "Node not found" on valid path

Godot Version

4.2

Question

I’ve been trying to solve this problem for a few days and I’m about at my wit’s end.

I am working on a multiplayer game where almost every node in the scene is spawned in dynamically when the server starts. When the client joins, RPC calls work and the world data is successfully replicated on the client, but the MultiplayerSynchronizers responsible for syncing position and rotation are not working. After some testing with the synchronized and delta_synchronized signals, it seems like they’re not even attempting to sync. There are a lot of errors generated on the client when they join which look like this:

E 0:00:08:0130   get_node: Node not found: "world_loader/test_world/rotate_tool/Y_plus_1/set_rotate_axis/set_rotate_axis_syncer" (relative to "/root").
<C++ Error>    Method/function failed. Returning: nullptr
<C++ Source>   scene/main/node.cpp:1651 @ get_node()
E 0:00:08:0130   process_simplify_path: Parameter "node" is null.
<C++ Source>   modules/multiplayer/scene_cache_interface.cpp:110 @ process_simplify_path()

This is confusing because a MultiplayerSynchronizer definitely exists on that path, and has server authority.

I found an old thread suggesting to toggle the public_visibility property, and when I did that, the errors were delayed until public_visibility was turned on, but it didn’t resolve the issue.

On another thread I saw someone saying that if a MultiplayerSynchronizer is not able to immediately find its pair, it will break and not try to synchronize anymore. This is a problem for me because I have to send the world data dynamically after the client joins, so there is always a brief delay between the client connecting and the syncers being ready.

The solution which seems to have worked for other people is to use a MultiplayerSpawner, but I don’t think that’s an option in my case. I need to spawn complex objects made of many tiny sub-scenes by assembling them and then adding them to the main scene, and to my understanding MultiplayerSpawner will only allow me to assemble the objects piecemeal in the main scene. You can think of it like assembling a car engine and then turning it on, versus trying to assemble a car engine while constantly trying to run it at the same time. I don’t think this really resolves the issue in any case; I don’t know any reason for two MultiplayerSynchronizers on the same valid path to not connect, MultiplayerSpawner or not.

Any help or advice is appreciated. I am at my wit’s end with this. Let me know if I can provide any further helpful information or format my question better.

1 Like

I’ve now updated my Godot build to 4.3-stable and I’m getting the same error. The error traces are pointing to different lines, so I’ll post an example of the current errors here:

get_node: Node not found: "world_loader/test_world/rotate_tool/Y_plus_1/set_rotate_axis/set_rotate_axis_syncer" (relative to "/root").
<C++ Error>    Method/function failed. Returning: nullptr
<C++ Source>   scene/main/node.cpp:1792 @ get_node()
process_simplify_path: Parameter "node" is null.
<C++ Source>   modules/multiplayer/scene_cache_interface.cpp:118 @ process_simplify_path()

I will continue trying to solve this on my own, but any input would be appreciated.

1 Like

did you ever find a solution to this? I am getting the Same Issue in my game

it only happens sometimes but when it does this is the series of steps

  1. Player 1 Hosts Lobby
  2. Player 2 Joins
  3. Player 3 Joins
  4. All Players Can See Other Players Moving
  5. Player 1 Starts Game
  6. Player 3 Sees Player 2 Floating and Gets Error
    • Node::get_node: Node not found: "Main/Players/Character2/MultiplayerSynchronizer" (relative to "/root")

I check the Remote Scene on the client the error is thrown in and the synchronizer is for sure there so idk whats going on either.

Not exactly. I asked around on a different forum (don’t remember where now) and ended up at the conclusion that MultiplayerSynchronizer was not right for my needs and/or might be broken. I ended up ditching it in favor of synchronizing everything via RPC functions, which work much more consistently.

Are you using absolute paths in your replication config?

And, looking at the remote tree of the client does the base path

world_loader/test_world/rotate_tool/Y_plus_1/set_rotate_axis/set_rotate_axis_syncer exist?

This is not true, you just need a cascade of spawners with every part that can be unique.

Example: I have a player and it holds a weapon.

There is a player spawner in my world scene, and a weapon spawner in my player scene. I can then just build my player, like normal, and it’s load out on the server and add it as a child. The spawners will then take the responsibility to add them correctly to the clients. This also allows for networked weapon switching at no extra cost.

Also custom spawn functions are an option too if you don’t want to have spawners every where.

If you are defining custom RPC functionality for replication you may want to look into replacing the SceneMultiplayer multiplayer API as it is built to work with the spawner syncer nodes, and spawners and syncers work in tandem and should be used together.

Are you using absolute paths in your replication config?

Don’t remember at this point, fairly certain I was though because I remember having to re-set them whenever a node would get reparented.

And, looking at the remote tree of the client does the base path […] exist?

Yes, I triple-checked that the paths existed while trying to figure this out.

While this is a good example of how to use cascading MultiplayerSpawners, I don’t think it works in my particular use case. There are two problems for my game:

  1. There are going to be hundreds, if not thousands, of nodes that all need to have the ability to spawn child nodes like this. If each one of them has to have a MultiplayerSpawner, it will start to impact performance, which is something I’m already worried about. I am not familiar with custom spawn functions, so maybe that would solve it, but either way this is the context I am working in.
  2. Some of these nodes may need to immediately trigger a script on a child which they would be adding via MultiplayerSpawner. If I don’t pre-assemble this structure of nodes, the triggering node will be added to the scene tree, try and fail to trigger a child which hasn’t spawned yet, and only then spawn that child.

Ultimately though the new RPC system I’m using works without issue so I’m in no hurry to go back to MultiplayerSpawners and MultiplayerSynchronizers.

1 Like

I see a lot of misunderstanding of the multiplayer nodes in the forums, and the videos on them aren’t great either.

And to me, they would not take up much computation as they extend only from the Node class and don’t have any transform hiarachy to update, or internal processing. They are very simple mechanism that watch changing scenes via node added/removed signals from the watched node. The SceneMultiplayer API caches all the replication state and parses RPCs for special commands.

I would bet even syncers are more efficient then an callable.rpc() call.

If you aren’t using the multiplayer nodes, and depending on your RPC bandwidth, you could probably shave some cycles by making a barebone multiplayer API.

Anyway I’m not here to convince you to use them, You already have a solution