Search Unity

Resolved Network Config Mismatch error (while config is the same)

Discussion in 'Netcode for GameObjects' started by Altalus06, Jun 4, 2021.

  1. Altalus06

    Altalus06

    Joined:
    Sep 3, 2017
    Posts:
    12
    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
     
  2. M1ngXU

    M1ngXU

    Joined:
    Jun 14, 2019
    Posts:
    2
    Ok, thanks
     
  3. Deleted User

    Deleted User

    Guest

    Thank you, fixed my issue as well.
     
  4. rangesstudio

    rangesstudio

    Joined:
    Nov 23, 2021
    Posts:
    6
  5. admin_unity326

    admin_unity326

    Joined:
    Oct 29, 2021
    Posts:
    2
    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
     
    Lujainne and blazingPotato like this.
  6. ANLevant

    ANLevant

    Joined:
    Jun 10, 2014
    Posts:
    28
    Its 2023 and I'm still seeing this very grabe issue! Where is the parch for this????
     
  7. ANLevant

    ANLevant

    Joined:
    Jun 10, 2014
    Posts:
    28
    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!
     
    Pandazole likes this.
  8. bugfinders

    bugfinders

    Joined:
    Jul 5, 2018
    Posts:
    1,720
    yep Ive just hit this wall and im tired and fed up of fighting things like this
     
    ANLevant likes this.
  9. Buchi0

    Buchi0

    Joined:
    Nov 2, 2018
    Posts:
    4
    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.
     
  10. bugfinders

    bugfinders

    Joined:
    Jul 5, 2018
    Posts:
    1,720
    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..
     
  11. BLANKSLATE0

    BLANKSLATE0

    Joined:
    Aug 22, 2020
    Posts:
    7
    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.
     
  12. GalaxzBread

    GalaxzBread

    Joined:
    Jan 13, 2024
    Posts:
    1
    where the F*** do i do this??
     
  13. mikawendt

    mikawendt

    Joined:
    Sep 5, 2019
    Posts:
    14
    Had this issue, it turned out to be a corruption of the project, I did a reimport all, and the problem was gone.
     
    ANLevant likes this.