KeyNotFoundException: The given key 'Unity.Netcode.ConnectionRequestMessage' was not present in the dictionary

Hi
i was following simple tutorial on YOUTUBE_TUTORIAL and I was getting weird error. Tried on my second machine with same error. Tested on 2 unity versions: 2022.3.33f1 and 2022.3.44f1, NGO version is 1.10.0

In short, when try to connect to server with client, i get this error:
KeyNotFoundException: The given key 'Unity.Netcode.ConnectionRequestMessage' was not present in the dictionary.

I pushed git repo with my code, so its easier to test and help me, if you are interested. LINK_TO_GITHUB_REPO

Appretiate all help.

That’s a super old version! Upgrade to at least NGO 1.9.

how is 1.10.0 older than 1.9. ? also i just upgraded to 1.11.0 and error remain

I took a look at your code and the video and I’m struggling to see how he got his code working.

I wouldn’t recommend deriving a new class from NetworkManager and creating its own Awake call, as far as I understand the base method won’t be called. You might be able to get away with it for Awake but he’s using OnEnable which I wouldn’t expect to work.

In your case the error is due to calling StartServer in Awake which is too early, you can get away with it in Start but I’d recommend keeping NetworkManager and your own Init class separate.

I’d also recommend using ParrelSync for client/server testing as it’s more convenient than having to create builds.

damn, you are right, i moved it from Awake to Start and it does work… should have known better, but thank you for help

also thx for tip for using ParrelSync