Unknown message ID 39

i use matchmaker relay service. i connect and create a room and start host on the first device. i connect,get room list and join the room. after i get on connected callback i get following error and my network manager does not open online scene on the client device. what is message #39?

Unknown message ID 39 connId:1
UnityEngine.Networking.NetworkIdentity:UNetStaticUpdate()

on client;

NetworkClient myClient = new NetworkClient();
myClient.RegisterHandler(MsgType.Connect, OnConnected);
myClient.Connect(new MatchInfo(matchJoin));

See:

https://bitbucket.org/Unity-Technologies/networking/src/86f8357e1288b3a1173a9df2bc242a89b0b53074/Runtime/UNetwork.cs?at=5.2&fileviewer=file-view-default

“public const short Scene = 39;”

Your client instance doesnt know about the messageIds that the NetworkManager uses. There is NetworkManager.StartClient() for this.

Thanks Seanr,

i use this sample code; http://docs.unity3d.com/Manual/UNetMatchMaker.html

i think i should use it like

Utility.SetAccessTokenForNetwork(matchJoin.networkId, new NetworkAccessToken(matchJoin.accessTokenString));
//NetworkClient myClient = new NetworkClient();
//myClient.RegisterHandler(MsgType.Connect, OnConnected);
//myClient.Connect(new MatchInfo(matchJoin));
var matchInfo2 = new MatchInfo(matchJoin);
StartClient(matchInfo2);

it works like that but this time i have another problem when i stop and start client again. as i googled it it is a bug since 5.1

ArgumentException: An element with the same key already exists in the dictionary.
System.Collections.Generic.Dictionary`2[UnityEngine.Networking.Types.NetworkID,UnityEngine.Networking.Types.NetworkAccessToken].Add (NetworkID key, UnityEngine.Networking.Types.NetworkAccessToken value) (at /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System.Collections.Generic/Dictionary.cs:404)
UnityEngine.Networking.Utility.SetAccessTokenForNetwork (NetworkID netId, UnityEngine.Networking.Types.NetworkAccessToken accessToken) (at C:/buildslave/unity/build/Runtime/Networking/Managed/UNETTypes.cs:119)
TopsNetworkManager.OnMatchJoined (UnityEngine.Networking.Match.JoinMatchResponse matchJoin)