I’m getting a bunch of errors like this after I installed the multiplayer services package when I try to play my game.
[Netcode] Sending ClientRpc to non-observer! TargetClientIds contains clientId 1 that is not an observer!
It happens frequently after the client dies and respawns, but the weird part is that the game seems to work perfectly fine with the errors. I can’t find anything about it online. Anyone know what’s causing this and how I can fix it?
Hi @Ed-Gilmour ,
Which Netcode for Gameobjects version are you currently using ? Which network topology (client-server, distributed authority) ?
This error might be related to this issue, fixed in Netcode for Gameobjects 1.12.0 and 2.0.0.
Could you try to update to NGO version 2.1.1 and see if it resolves the issue ?
I was using 2.0.0 so I updated to 2.1.1 but I’m still getting the same issue. I’m also using client-server topology.
I was wrong that it doesn’t affect the game, I realized this happens when the host defeats a client and while they’re respawning the host’s player doesn’t update on the client. The host’s Network Object GetObservers just returns the host until the player spawns back in, for some reason it just stops being observed by the client.
Hi,
Would you be able to provide us with a replication project so we can get a deeper understanding on what the issue is ?
Alternatively you can submit a bug directly from the editor, including your project and posting the ticket number you receive by email so we can prioritize it.
Thanks for the response, how would you like me to provide you with a replication project?
Hi Ed,
I don’t think you will need a replication project.
Could you replace your com.unity.netcode.gameobjects manifest entry with this:
"com.unity.netcode.gameobjects": "https://github.com/Unity-Technologies/com.unity.netcode.gameobjects.git?path=com.unity.netcode.gameobjects#fix/player-removed-from-ovservers-when-player-ojbect-despawns",
Let me know if that branch resolves your issue?
PR-3110 will be merged sometime tomorrow and should be in the next update.
I just tried it but I’m still getting the same errors, the client is still being removed from the observers.
And all you are doing is despawning a player while the player’s client stays connected?
Yes, that’s right.
Hi Ed,
Well…I am having a hard time replicating the issue on this side, but I pushed another update to the same branch as I saw some possible areas that may be the cause.
Could you set your manifest entry to this again:
“com.unity.netcode.gameobjects”: “com.unity.netcode.gameobjects/com.unity.netcode.gameobjects at develop · Unity-Technologies/com.unity.netcode.gameobjects · GitHub”,
Then delete your packages-lock.json file (to make sure you get the most recent push), and see if you still get those error messages?
If you do, then I will need to definitely take a look at your project in order to figure out what sequence of events is causing the issue. First, give that branch another shot and let’s see if the updates I did resolve your issue.
IT WORKED!! Thanks so much for the help and going in and fixing it! ![]()
Yay!
That is good to hear! Thank you for your patience and for helping me verify the fix.
It will be in the next NGO v2 update. ![]()