Search Unity

  1. Unity 2019.2 is now released.
    Dismiss Notice

UNET: CRCMismatch debugging

Discussion in 'Connected Games' started by Flarup, Aug 12, 2019 at 3:30 PM.

  1. Flarup

    Flarup

    Joined:
    Jan 7, 2010
    Posts:
    80
    We're currently using UNET for our mobile multiplayer game, and while we actively are looking for a replacement, we need to keep our UNET game alive for a little longer. Unfortunately we have a random bug, that some times happens when a client tries to connect to a host. It doesn't happen every time, and typically the hosting player simply need to host a new game in order to get it working. However, we would of course love that clients can connect EVERY time. The error we get in the log of the client that tries to connect is the following:

    ClientDisconnected due to error: CRCMismatch

    We have even disabled CRC checks in our NetworkManager, but that doesn't fix the problem. Also, if it happens the first time a client tries to connect, then it happens for all other clients as well that tries to connect. And trying to connect again doesn't help.

    Is there a way find out WHAT is causing the CRCMismatch? Currently we get no further information.

    Thank you very much in advance for all help.


    Kind regards,
    Uffe Flarup
     
  2. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    5,954
  3. Flarup

    Flarup

    Joined:
    Jan 7, 2010
    Posts:
    80
    Thanks a lot for the suggestions @Joe-Censored. Have tried those already though.

    Any ideas for how to get Unity to display WHICH network manager settings are causing the CRCMismatch? I get the error randomly, and I'm out of ideas about why it belives there's a mismatch.
     
  4. aabramychev_

    aabramychev_

    Joined:
    May 10, 2019
    Posts:
    4
    Looks like you did upgrade of your game and added channel to configuration (or changed one of the timeout) in this case connection with old clients will cause crc mismatch. crc check is check during connection, so if you have very bad network conditions so connection message will corrupted you should have not more than one mismatch to 30,000 connection requests, if you have more than this digit most possible there was upgrade with configuration changes and not "old" client was updated... Check this
     
  5. Flarup

    Flarup

    Joined:
    Jan 7, 2010
    Posts:
    80
    Thank you very much for the suggestion. But it's not related to old clients either. All my clients and hosts are the exact same version, all running on Android. And typically I can make it work by simply stopping the game on the host device (by exiting to our main menu ingame), start a new multiplayer game, and then the clients typically can connect.

    We would of course love the clients to be able to connect the FIRST time the game was started. But so far I've been unable to debug what's causing the CRC Mismatch error we randomly get.