Search Issue Tracker
Fixed in 5.4.0
Votes
11
Found in
5.1.1p1
Issue ID
708502
Regression
No
[MatchMaker] Can't re-join a match after leaving
How to reproduce:
1. Open attached project
2. Open scene Scenes/Main.unity
3. Play the scene
4. Enable Match Maker
5. Create Internet Match
6. Stop match
7. Enable Match Maker again
8. Join the same lobby that was created in step 5
- Note the error: ArgumentException: An element with the same key already exists in the dictionary.
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Crash on ScriptableRenderLoopDraw when rendering a specific VFX in Play Mode
- The script is not renamed in the Project window when renaming and a compilation Error is present
- Average FPS in Play Mode degradation on a newly created BiRP project when it's upgraded from 2020.3.48f1 to a newer Editor version
- DecoratorDrawer indentation is incorrect when it is called with EditorGUI
- "Unable to get the list of approved APIs." is thrown when testing the App Packages with Windows App Certification Kit
Somaweb
Jun 14, 2016 07:33
why is this marked as fixed?
jinnindo
Mar 18, 2016 20:32
Still a serious problem in 5.3.3f1
Is that right; this won't be fixed till 5.4?
Chris_Entropy
Oct 29, 2015 17:47
Ok, it did NOT fix the problem for me. If I join a lobby of a NetworkLobbyManager, then disconnect from the lobby and try to reconnect to the lobby, the same error occurs again.
FractalButterfly
Oct 29, 2015 17:35
Unity 5.2.2f1 fixed the problem for me.
setapp
Oct 27, 2015 13:05
5.2.2p1 still nothing. When will it be fixed?
nomenonX
Oct 22, 2015 11:43
5.2.2! Future release is 5.3 or what?
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)
sixolar
Oct 22, 2015 00:28
Still having this issue on 5.2.1 !
nomenonX
Oct 01, 2015 12:02
In Unity 5.2.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/List.cs:101)
UnityEngine.Networking.Utility.SetAccessTokenForNetwork (NetworkID netId, UnityEngine.Networking.Types.NetworkAccessToken accessToken) (at C:/buildslave/unity/build/Runtime/Networking/Managed/UNETTypes.cs:119)
UnityEngine.Networking.NetworkManager.OnMatchJoined (UnityEngine.Networking.Match.JoinMatchResponse matchInfo) (at C:/buildslave/unity/build/Extensions/Networking/Runtime/NetworkManager.cs:1022)
UnityEngine.Networking.Match.NetworkMatch+<ProcessMatchResponse>c__Iterator0`1[UnityEngine.Networking.Match.JoinMatchResponse].MoveNext () (at C:/buildslave/unity/build/Runtime/Networking/Managed/MatchMakingClient.cs:302)
Sycoforge
Sep 18, 2015 09:56
Until this bughas been officially resolved. Hook your own callback to the JoinMatch method.
this.manager.matchMaker.JoinMatch(networkID, string.Empty, new NetworkMatch.ResponseDelegate<JoinMatchResponse>(OnMatchJoined));
public virtual void MatchJoined(JoinMatchResponse matchInfo)
{
if (LogFilter.logDebug)
{
Debug.Log("NetworkManager OnMatchJoined ");
}
if (matchInfo.success)
{
try
{
Utility.SetAccessTokenForNetwork(matchInfo.networkId, new NetworkAccessToken(matchInfo.accessTokenString));
}
catch(Exception ex)
{
if (LogFilter.logError)
{
Debug.LogError(ex);
}
}
this.StartClient(new MatchInfo(matchInfo));
}
else if (LogFilter.logError)
{
Debug.LogError(string.Concat("Join Failed:", matchInfo));
}
}
This solved the problem for us.
Magnet_man16
Sep 12, 2015 13:06
I have the same Issue. Unity this is a must fix issue. I cant develop my game any further without it fixed.
To recreate download and run the NetworkStarter demo from below:
http://forum.unity3d.com/threads/unet-sample-projects.331978/
"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)
UnityEngine.Networking.NetworkManager.OnMatchJoined (UnityEngine.Networking.Match.JoinMatchResponse matchInfo) (at C:/buildslave/unity/build/Extensions/Networking/Runtime/NetworkManager.cs:1010)
UnityEngine.Networking.Match.NetworkMatch+<ProcessMatchResponse>c__Iterator0`1[UnityEngine.Networking.Match.JoinMatchResponse].MoveNext () (at C:/buildslave/unity/build/Runtime/Networking/Managed/MatchMakingClient.cs:302)"