Network Config Mismatch error (while config is the same)

Hello,

For those of you who are experiencing the “Network Config Mismatch” problem when the config seems to be identical on the client and server, I found a small bug in the NetworkManager inspector that causes this.

Disabling the “Enable Scene Management” checkbox also disables “Use Prefab Sync”, and automatically checks that box.

When debugging the source code to see where the mismatch problem was coming from , I discovered that the network config is not updated accordingly.

If the box was unchecked before disabling scene management, the parameter will remain “False” in the network config, thus leading to a potential Mismatch if the box is checked on the server.

You should therefore remember to always check this box before disabling scene management.

Hope it helps
Cheers

4 Likes

Ok, thanks

Thank you, fixed my issue as well.

Thanks

Hello,
It looks like the issue was first seen few years ago. We did experience a similar issue today with Unity Gaming Services.
Everything works fine on local but once uploaded on GSH we get a “Network Config Mismatch error”.

It seems like unchecking “Force Same Prefabs” makes the test pass, even though the list of prefabs never updates on runtime or between builds.
Does anyone knows why GSH uses a different NetworkId on prefabs than a local dedicated Server?

Thanks

3 Likes

Its 2023 and I’m still seeing this very grabe issue! Where is the parch for this???

I was having this issue, I added a NetworkVariabke to a NetworkObject and suddenly i was getting this error. Git reverted to stable, restarted, tried building multiple times, nothing works. A workaround to this bug is to uncheck the Force Same Predab option on network management, then it will work, although this may cause other issues if your game has a lot of assets created on the fly. For me it’s not the case so it’s fine. In any case, this bug needs to be solved, and automated tests done so this doesn’t happen again! This has been showing up since 2018 guys!

2 Likes

yep Ive just hit this wall and im tired and fed up of fighting things like this

1 Like

It seems that in MPP mode, yopu have to deactivate and re-activate the virtual players, then they will actualize their data.
Just “Build and Run” does not do the trick, it just creates an executable. The MPP virtual players seem to have their data elsewhere.

1 Like

Nope, i didnt have any of that stuff installed in fact i had removed it a few days ago after the on run it would ask me to link my UGS, when they already were…

In my case i think issue was with mismatch of meta files or something. I had deleted a script from the file explorer instead of in unity and i think my new script was broken. I deleted all my scripts, created new ones, and pasted the code back in. Also removed each script from all components first so it didnt say missing. restarted the editor, then added back all scripts to components. Also closed/restarted MPP virtual players. Fixed.

where the fuck do i do this??

Had this issue, it turned out to be a corruption of the project, I did a reimport all, and the problem was gone.

5 Likes

That resolved it for me too. Seems like this issue is still appearing.

1 Like

If anyone is coming back to this in 2024 or later (I am on Unity 6), I was getting this error but for different reason:
[Netcode] NetworkConfig mismatch. The configuration between the server and client does not match

I started getting this error in the editor after reverting to a previous checkin and some files had moved location i.e. unity’s .meta files got out of sync.

  1. Find the prefabs in your NetworkManager > Network Prefabs Lists

  2. Delete those prefabs from scenes where they are placed in-scene, and re-add them (try doing 1 at a time if it’s easier.)
    In my case it was prefab XYZ even though as far as I can tell, I hadn’t moved its C# file or .meta file.

  3. Not sure if it was necessary but I then deleted & readded XYZ to that Network Prefabs List

3 Likes

This worked! Thank you!

1 Like

I fixed it after I unchecked and then checked the Force Same Prefabs option in NetworkManager.

2 Likes

I restarted unity,and this probrem automatically fixed

I will take a look into this issue with Force Same Prefab (you should be able to update that without scene management being enabled)

As a side note, for the time being you can access and modify all NetworkConfig properties at runtime via NetworkManager.NetworkConfig.

I am not able to replicate this issue using the most recent versions of Netcode for GameObjects:

I would suggest upgrading to either v1.13.0 (if you are bound to the v1.x version) or to v2.4.2.