#Unknown Message ID on Linux Server Build (Works Fine in Editor)

4 messages · Page 1 of 1 (latest)

fathom pivot
#

Hi all,

I'm running into a confusing issue with my Mirror-based multiplayer game.

Client: Windows 10 (both Editor and Build tested)

Server: Linux Dedicated Build (built via Unity as headless server)

When a client connects to the server, the server logs this error:

**Unknown message id: 54101 for connection: connection(7). This can happen if no handler was registered for this message.
Mirror.NetworkServer:UnpackAndInvoke(NetworkConnectionToClient, NetworkReader, Int32)
Mirror.NetworkServer:OnTransportData(Int32, ArraySegment1, Int32) Telepathy.Server:Tick(Int32, Func1)
Mirror.NetworkServer:NetworkEarlyUpdate()

NetworkServer: failed to unpack and invoke message. Disconnecting 7.
Telepathy.Server:Disconnect(Int32)**

This only happens in built versions — everything works perfectly in the Editor when I run the server there.

Any Idea why this suddenly happen? Thanks in advance 🙏

paper quest
# fathom pivot Hi all, I'm running into a confusing issue with my Mirror-based multiplayer gam...

Mirror/Tools/Extensions.cs - Replace the GetStableHashCode method with this and see logs on client for what that message is

public static int GetStableHashCode(this string text)
{
    unchecked
    {
        uint hash = 0x811c9dc5;
        uint prime = 0x1000193;

        for (int i = 0; i < text.Length; ++i)
        {
            byte value = (byte)text[i];
            hash = hash ^ value;
            hash *= prime;
        }

        // Uncomment this code to log message hashes and methods for debugging.
        // There will be one log message per message hash without flooding duplicates.
        // User should look in the log of the SENDING side for the offending hash.
        // try-catch to avoid nonsense weaver errors at design time.
        try
        {
            // cast the hash to ushort to match what user sees in unknown message id warnings
            Debug.LogFormat(LogType.Log, LogOption.NoStacktrace, null, "Created stable hash {0} for {1}", (ushort)hash, text);
        }
        catch { }

        return (int)hash;
    }
}
safe valley
fathom pivot