Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Client close self with "BadProtocolVersion"

Discussion in 'NetCode for ECS' started by moooooooi, Dec 3, 2021.

  1. moooooooi

    moooooooi

    Joined:
    Feb 26, 2020
    Posts:
    2
    Version:
    - Entities: 0.17.0 - 0.6.0-preview.7
    - NetCode: 0.6.0 - preview.7

    I follow the "NetCube" in DOTSSample. The client-only stanelone got this error Error:
    Code (CSharp):
    1. Received a ghost from the server(17953310611343951986) which has a different hash on the client(14335956167680876332)
    2. UnityEngine.DebugLogHandler:Internal_Log(LogType, LogOption, String, Object)
    3. UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
    4. UnityEngine.Logger:Log(LogType, Object)
    5. UnityEngine.Debug:LogError(Object)
    6. Unity.NetCode.GhostCollectionSystem:OnUpdate() (at F:\higo-proj\Project Q\Packages\com.unity.netcode\Runtime\Snapshot\GhostCollectionSystem.cs:336)
    7. Unity.Entities.SystemBase:Update()
    8. Unity.Entities.ComponentSystemGroup:UpdateAllSystems()
    9. Unity.Entities.ComponentSystemGroup:OnUpdate()
    10. Unity.Entities.ComponentSystem:Update()
    11. Unity.Entities.ComponentSystemGroup:UpdateAllSystems()
    12. Unity.Entities.ComponentSystemGroup:OnUpdate()
    13. Unity.NetCode.ClientSimulationSystemGroup:OnUpdate() (at F:\higo-proj\Project Q\Packages\com.unity.netcode\Runtime\ClientServerWorld\ClientSimulationSystemGroup.cs:90)
    14. Unity.Entities.ComponentSystem:Update()
    15. Unity.Entities.ComponentSystemGroup:UpdateAllSystems()
    16. Unity.Entities.ComponentSystemGroup:OnUpdate()
    17. Unity.Entities.ComponentSystem:Update()
    18. Unity.Entities.ComponentSystemGroup:UpdateAllSystems()
    19. Unity.Entities.ComponentSystemGroup:OnUpdate()
    20. Unity.Entities.ComponentSystem:Update()
    21. Unity.Entities.DummyDelegateWrapper:TriggerUpdate()
     
    Last edited: Dec 3, 2021
  2. CMarastoni

    CMarastoni

    Unity Technologies

    Joined:
    Mar 18, 2020
    Posts:
    882
    Hi mooooi,
    the 0.6-preview.7 had some issues (all fixed but not available to the public yet) with client build. In the forum we already answered similar problem like yours. They are usually due to a bug in the GhostCollectionSystem and GhostConversionSystem that aren't sorting the components the same way in the build and the Editor.

    I posted a fix about that here:
    https://forum.unity.com/threads/cas...awn-ghost-and-client-dc.1103191/#post-7167394
     
  3. moooooooi

    moooooooi

    Joined:
    Feb 26, 2020
    Posts:
    2
    Thanks, I had solved the problem.