HLAPI CRC channel count error local: 4 remote: 6

I have this error when trying to connect to a build made with the same project (local client works). Any ideas what it could be?

HLAPI CRC channel count error local: 4 remote: 6

Full Log

HLAPI CRC channel count error local: 4 remote: 6
UnityEngine.Debug:Internal_Log(Int32, String, Object)
UnityEngine.Debug:LogError(Object)
UnityEngine.Networking.NetworkCRC:Validate(CRCMessageEntry[ ], Int32) (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkCRC.cs:50)
UnityEngine.Networking.NetworkClient:OnCRC(NetworkMessage) (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkClient.cs:626)
UnityEngine.Networking.NetworkConnection:HandleMessage(Dictionary`2, NetworkReader, Int32, Int32) (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkConnection.cs:301)
UnityEngine.Networking.NetworkClient:Update() (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkClient.cs:472)
UnityEngine.Networking.NetworkClient:UpdateClients() (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkClient.cs:686)
UnityEngine.Networking.NetworkIdentity:UNetStaticUpdate() (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkIdentity.cs:707)

(Filename: /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkCRC.cs Line: 50)

CRC Local Dump CharacterTalkManager : 0
UnityEngine.Debug:Internal_Log(Int32, String, Object)
UnityEngine.Debug:Log(Object)
UnityEngine.Networking.NetworkCRC:smile:ump(CRCMessageEntry[ ]) (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkCRC.cs:84)
UnityEngine.Networking.NetworkCRC:Validate(CRCMessageEntry[ ], Int32) (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkCRC.cs:51)
UnityEngine.Networking.NetworkClient:OnCRC(NetworkMessage) (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkClient.cs:626)
UnityEngine.Networking.NetworkConnection:HandleMessage(Dictionary`2, NetworkReader, Int32, Int32) (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkConnection.cs:301)
UnityEngine.Networking.NetworkClient:Update() (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkClient.cs:472)
UnityEngine.Networking.NetworkClient:UpdateClients() (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkClient.cs:686)
UnityEngine.Networking.NetworkIdentity:UNetStaticUpdate() (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkIdentity.cs:707)

(Filename: /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkCRC.cs Line: 84)

CRC Local Dump Player : 0
UnityEngine.Debug:Internal_Log(Int32, String, Object)
UnityEngine.Debug:Log(Object)
UnityEngine.Networking.NetworkCRC:smile:ump(CRCMessageEntry[ ]) (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkCRC.cs:84)
UnityEngine.Networking.NetworkCRC:Validate(CRCMessageEntry[ ], Int32) (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkCRC.cs:51)
UnityEngine.Networking.NetworkClient:OnCRC(NetworkMessage) (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkClient.cs:626)
UnityEngine.Networking.NetworkConnection:HandleMessage(Dictionary`2, NetworkReader, Int32, Int32) (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkConnection.cs:301)
UnityEngine.Networking.NetworkClient:Update() (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkClient.cs:472)
UnityEngine.Networking.NetworkClient:UpdateClients() (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkClient.cs:686)
UnityEngine.Networking.NetworkIdentity:UNetStaticUpdate() (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkIdentity.cs:707)

(Filename: /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkCRC.cs Line: 84)

CRC Local Dump Character : 0
UnityEngine.Debug:Internal_Log(Int32, String, Object)
UnityEngine.Debug:Log(Object)
UnityEngine.Networking.NetworkCRC:smile:ump(CRCMessageEntry[ ]) (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkCRC.cs:84)
UnityEngine.Networking.NetworkCRC:Validate(CRCMessageEntry[ ], Int32) (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkCRC.cs:51)
UnityEngine.Networking.NetworkClient:OnCRC(NetworkMessage) (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkClient.cs:626)
UnityEngine.Networking.NetworkConnection:HandleMessage(Dictionary`2, NetworkReader, Int32, Int32) (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkConnection.cs:301)
UnityEngine.Networking.NetworkClient:Update() (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkClient.cs:472)
UnityEngine.Networking.NetworkClient:UpdateClients() (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkClient.cs:686)
UnityEngine.Networking.NetworkIdentity:UNetStaticUpdate() (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkIdentity.cs:707)

(Filename: /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkCRC.cs Line: 84)

CRC Local Dump CharacterRopeManager : 0
UnityEngine.Debug:Internal_Log(Int32, String, Object)
UnityEngine.Debug:Log(Object)
UnityEngine.Networking.NetworkCRC:smile:ump(CRCMessageEntry[ ]) (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkCRC.cs:84)
UnityEngine.Networking.NetworkCRC:Validate(CRCMessageEntry[ ], Int32) (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkCRC.cs:51)
UnityEngine.Networking.NetworkClient:OnCRC(NetworkMessage) (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkClient.cs:626)
UnityEngine.Networking.NetworkConnection:HandleMessage(Dictionary`2, NetworkReader, Int32, Int32) (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkConnection.cs:301)
UnityEngine.Networking.NetworkClient:Update() (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkClient.cs:472)
UnityEngine.Networking.NetworkClient:UpdateClients() (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkClient.cs:686)
UnityEngine.Networking.NetworkIdentity:UNetStaticUpdate() (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkIdentity.cs:707)

(Filename: /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkCRC.cs Line: 84)

CRC Remote Dump Player : 0
UnityEngine.Debug:Internal_Log(Int32, String, Object)
UnityEngine.Debug:Log(Object)
UnityEngine.Networking.NetworkCRC:smile:ump(CRCMessageEntry[ ]) (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkCRC.cs:89)
UnityEngine.Networking.NetworkCRC:Validate(CRCMessageEntry[ ], Int32) (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkCRC.cs:51)
UnityEngine.Networking.NetworkClient:OnCRC(NetworkMessage) (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkClient.cs:626)
UnityEngine.Networking.NetworkConnection:HandleMessage(Dictionary`2, NetworkReader, Int32, Int32) (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkConnection.cs:301)
UnityEngine.Networking.NetworkClient:Update() (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkClient.cs:472)
UnityEngine.Networking.NetworkClient:UpdateClients() (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkClient.cs:686)
UnityEngine.Networking.NetworkIdentity:UNetStaticUpdate() (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkIdentity.cs:707)

(Filename: /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkCRC.cs Line: 89)

CRC Remote Dump Character : 0
UnityEngine.Debug:Internal_Log(Int32, String, Object)
UnityEngine.Debug:Log(Object)
UnityEngine.Networking.NetworkCRC:smile:ump(CRCMessageEntry[ ]) (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkCRC.cs:89)
UnityEngine.Networking.NetworkCRC:Validate(CRCMessageEntry[ ], Int32) (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkCRC.cs:51)
UnityEngine.Networking.NetworkClient:OnCRC(NetworkMessage) (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkClient.cs:626)
UnityEngine.Networking.NetworkConnection:HandleMessage(Dictionary`2, NetworkReader, Int32, Int32) (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkConnection.cs:301)
UnityEngine.Networking.NetworkClient:Update() (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkClient.cs:472)
UnityEngine.Networking.NetworkClient:UpdateClients() (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkClient.cs:686)
UnityEngine.Networking.NetworkIdentity:UNetStaticUpdate() (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkIdentity.cs:707)

(Filename: /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkCRC.cs Line: 89)

CRC Remote Dump CharacterTalkManager : 0
UnityEngine.Debug:Internal_Log(Int32, String, Object)
UnityEngine.Debug:Log(Object)
UnityEngine.Networking.NetworkCRC:smile:ump(CRCMessageEntry[ ]) (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkCRC.cs:89)
UnityEngine.Networking.NetworkCRC:Validate(CRCMessageEntry[ ], Int32) (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkCRC.cs:51)
UnityEngine.Networking.NetworkClient:OnCRC(NetworkMessage) (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkClient.cs:626)
UnityEngine.Networking.NetworkConnection:HandleMessage(Dictionary`2, NetworkReader, Int32, Int32) (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkConnection.cs:301)
UnityEngine.Networking.NetworkClient:Update() (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkClient.cs:472)
UnityEngine.Networking.NetworkClient:UpdateClients() (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkClient.cs:686)
UnityEngine.Networking.NetworkIdentity:UNetStaticUpdate() (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkIdentity.cs:707)

(Filename: /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkCRC.cs Line: 89)

CRC Remote Dump CharacterRopeManager : 0
UnityEngine.Debug:Internal_Log(Int32, String, Object)
UnityEngine.Debug:Log(Object)
UnityEngine.Networking.NetworkCRC:smile:ump(CRCMessageEntry[ ]) (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkCRC.cs:89)
UnityEngine.Networking.NetworkCRC:Validate(CRCMessageEntry[ ], Int32) (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkCRC.cs:51)
UnityEngine.Networking.NetworkClient:OnCRC(NetworkMessage) (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkClient.cs:626)
UnityEngine.Networking.NetworkConnection:HandleMessage(Dictionary`2, NetworkReader, Int32, Int32) (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkConnection.cs:301)
UnityEngine.Networking.NetworkClient:Update() (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkClient.cs:472)
UnityEngine.Networking.NetworkClient:UpdateClients() (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkClient.cs:686)
UnityEngine.Networking.NetworkIdentity:UNetStaticUpdate() (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkIdentity.cs:707)

(Filename: /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkCRC.cs Line: 89)

CRC Remote Dump GoalManager : 0
UnityEngine.Debug:Internal_Log(Int32, String, Object)
UnityEngine.Debug:Log(Object)
UnityEngine.Networking.NetworkCRC:smile:ump(CRCMessageEntry[ ]) (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkCRC.cs:89)
UnityEngine.Networking.NetworkCRC:Validate(CRCMessageEntry[ ], Int32) (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkCRC.cs:51)
UnityEngine.Networking.NetworkClient:OnCRC(NetworkMessage) (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkClient.cs:626)
UnityEngine.Networking.NetworkConnection:HandleMessage(Dictionary`2, NetworkReader, Int32, Int32) (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkConnection.cs:301)
UnityEngine.Networking.NetworkClient:Update() (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkClient.cs:472)
UnityEngine.Networking.NetworkClient:UpdateClients() (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkClient.cs:686)
UnityEngine.Networking.NetworkIdentity:UNetStaticUpdate() (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkIdentity.cs:707)

(Filename: /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkCRC.cs Line: 89)

CRC Remote Dump ServerStateManager : 0
UnityEngine.Debug:Internal_Log(Int32, String, Object)
UnityEngine.Debug:Log(Object)
UnityEngine.Networking.NetworkCRC:smile:ump(CRCMessageEntry[ ]) (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkCRC.cs:89)
UnityEngine.Networking.NetworkCRC:Validate(CRCMessageEntry[ ], Int32) (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkCRC.cs:51)
UnityEngine.Networking.NetworkClient:OnCRC(NetworkMessage) (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkClient.cs:626)
UnityEngine.Networking.NetworkConnection:HandleMessage(Dictionary`2, NetworkReader, Int32, Int32) (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkConnection.cs:301)
UnityEngine.Networking.NetworkClient:Update() (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkClient.cs:472)
UnityEngine.Networking.NetworkClient:UpdateClients() (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkClient.cs:686)
UnityEngine.Networking.NetworkIdentity:UNetStaticUpdate() (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkIdentity.cs:707)

(Filename: /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkCRC.cs Line: 89)

That means that the server has 6 NetworkBehaviour scripts and the client only has 4 NetworkBehaviour scripts. This is warning that the client and server dont match…

scripts in the scene or in the project? it’s the build i made from the project (no changes), it should be the same.

I just checked, it also happens when I try to connect two (same) builds. It’s always 4 local and 6 remote, independent of which one is the server.

I’m getting this too, anyone got a hint as to why this might be? Could it be because I’m getting failed spawn attempts? Possibly to do with runtime registering prefabs?

Still getting this with 5.1.1f1. “HLAPI CRC channel count error local: 25 remote: 23”
I thought this was going to become a warning, because of all the false positives? I tried a couple times to do tweaks to prevent it, but it feels like playing whack-a-mole at this point.

I also have this issue but it isn’t crashing so has anyone a good way to find the incosistancy?

I had created a NetworkBehaviour script to manage Players in the game. It had a bunch of (isServer) checks which were fine, but when I added a @Command CmdFunction to the script my game started flagging that error (4 remote:3). I only found that out after selectively removing everything from the script. I tried everything to remedy the error but interestingly the problem went away after inadvertently re-loading the editor.

This means that something I had done had in fact fixed the error but something was not correctly updating in the editor between builds, so beware of that.

I will mention that the only things active in my script, when it started working, were as follows :

    @Command
    function CmdAddMyself()
    {
    }

    @Client
    function AddMe()
    {
        CmdAddMyself();
    }

From which the only conclusion I can come to is that if you use the @Command ([Command]) attribute, you require a @Client ([Client]) method to access that Call-To-Server.

FYI using [ClientCallback] instead of [Client] resolved the warning issues for me.

I had tried that in the places of the script I’d used [Client] but that seemed to make no difference in my particular case.

I have this problem as well. Here are the 2 errors I am getting on the Client (not the Host).

HLAPI CRC channel count error local: 5 remote: 9
UnityEngine.Networking.NetworkIdentity:UNetStaticUpdate()

CRC Local Dump ActionBarController : 0
UnityEngine.Networking.NetworkIdentity:UNetStaticUpdate()

I am adding NetworkBehavior components at runtime during Awake() both on the Server and Client. I believe this is causing the channel count mismatch errors. However, even with the errors everything seems to be working fine (ClientRPC’s and SyncVars are working).

Is anybody else adding NetworkBehavior components during runtime Awake()? Is adding a NetworkBehavior component supported? Or do the NeworkBehavior components need to be part of the prefab? If so this creates problems for me…

I think it ‘should’ be part of the prefab, in certain cases like when a NetworkBehavior is responsible for input ( we’ll call NetworkedInputBehavior), have it attached but disabled by default,.

Then have a separate network behavior ( we’ll call NetworkSetup) which is enabled and has a reference to the NetworkedInputBehavior. When NetworkSetup::OnStartLocalPlayer is called have that method enable NetworkedInputBehavior

1 Like

I had the same error, and it seems that it was produced by a Game Object that had a NetworkIdentity and was created within the scene, and not instanciated by code after player connects… that worked for me

1 Like

Thanks for the responses. Can you help me understand your workflow Omar? What order do you connect/instantiate/add scripts?

Here is my order
Host creates game
Client connects to game
Host instantiates prefab
Host prefab script calls Awake() which adds a bunch of NetworkBehavior scripts
Host prefab is spawned (It’s actually the player prefab, so I’m using NetworkServer.AddPlayerForConnection not NetworkServer.Spawn)
Client prefab script calls Awake() which adds a bunch of NetworkBehavior scripts (the same scripts that were added to the prefab on Host are added on the client)

In the end I gave up on using AddComponent(NetworkBehavior) and just added the scripts to the prefab and instead use GetComponent during initialization.

This error appeared when i was testing a bonus pick-up system for my game, so i had the prefabs of the bonuses in the scene and not created in game play. I had to make a bonus manager to first spawn this bonuses when the layer connects, and get the sync variables (like if the bonus is alive or has been picked already, or the resurrection cooldown, etc).
Maybe your problem is that you are using Awake() function, wich is called locally and has nothing to be with network syncs, so there are some frames where your variables in Awake() init are only on the client and were not informed to the server, you have to use another kind of initialization like
MarxentAnthony said (OnStartLocalPlayer, etc)…
All the prefabs have their scripts, and none is added to the game object during gameplay. And if i have to do so, it has to be by telling the server to do it, not locally.

My workflow:
Client connects to game (which it can also be the host).
Player prefab is spawned
The BonusManager spawns the bonuses from the registrered prefabs and
syncs the variables.

Hope it helps c:

Oh I see. So instead of AddComponent(NetworkBehavior script) you are spawning prefabs that already contain NetworkBehavior scripts and attaching them to your GameObject?

Yes, i am spawning prefabs with their respectives components, but im not attaching NetworkBehaviour scripts, they already have them in the prefab which is registered in the NetworkManager spawnable prefabs, so when i call NetworkServer.Spawn() im sure that all those spawned GOs have the same componnents.

1 Like

I feel like this message may sometimes be wrong ( maybe due to a bug ) ?

I never got this message before until I added a prefab with a network behaviour and network identity on it into the scene.
Nothing too crazy or advanced.
And ever since then I get this message, so my guess is it may be related to how the clients create the scene, perhaps the networked object doesn’t get created, or doesn’t have the network behaviours added to it until after the error message is displayed.

*edit
I think what I said above may be true.
This is straight from the documentation:

So these network objects are disabled when the scene loads.
I bet thats where the discrepancy comes from.
So I don’t think its due to any issue in the project or anything we did wrong, Its just that the error message is probably innacurate.

1 Like

The Network Manager likes to work in prefabs.

Looking through the APIs it seems there is a Client method for registering dynamically constructed objects.

http://docs.unity3d.com/ScriptReference/Networking.ClientScene.RegisterSpawnHandler.html

1 Like

Oh thanks. I will try that.