question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

v0.14 : KeyNotFoundException: The given key was not present in the dictionary.

See original GitHub issue

I receive a key not found at https://github.com/colyseus/colyseus-unity3d/blob/master/Assets/Plugins/Colyseus/Serializer/Schema/ReferenceTracker.cs#L51

KeyNotFoundException: The given key was not present in the dictionary.
System.Collections.Generic.Dictionary`2[TKey,TValue].get_Item (TKey key) (at <9577ac7a62ef43179789031239ba8798>:0)
Colyseus.Schema.ReferenceTracker.Remove (System.Int32 refId) (at Assets/Plugins/Colyseus/Serializer/Schema/ReferenceTracker.cs:51)

Fields generated by the last version of c# generator (original version)

Version : colyseus server : 0.14.4 colyseus unity : 0.14.2 schema : 1.0.6

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:21 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
soile1991commented, Jan 5, 2021

Hey, @endel I made a fork from colyseus-unity3d and implemented the behavior to trigger the bug.

it’s a card game you start with 52 cards and every time you click to play the cards button it plays 1 to 3 cards randomly if you hit it many times (e.g. once per second) it will trigger the bug before the remaining cards hit zero.

Repo: forked repo (card game)

Thanks!

1reaction
mitchLucidcommented, May 14, 2021

Thank you, @Unelith this is helpful info!

Read more comments on GitHub >

github_iconTop Results From Across the Web

The given key was not present in the dictionary. Which key?
This exception is thrown when you try to index to something that isn't there, for example: Dictionary<String, String> test = new ...
Read more >
C# KeyNotFoundException: Key Not Present in Dictionary
In a C# program, a KeyNotFoundException was thrown. This is likely caused by a lookup done on a key (one that is not...
Read more >
Solved: The given key was not present in the dictionary
Solved: Hello, I am having a refresh problem and I need help, Currently, I am using Power BI Desktop (January 2021), after applying...
Read more >
The given Key was not present in the dictionary
Describes an issue that occurs when you run the Group Policy Modeling Wizard against a new Group Policy setting.
Read more >
[Solved] The given key was not present in the dictionary
Solution 1​​ Hi, Actually this exception occur when you are accessing Dictionary for Incorrect value. Here i have created one code snippet for ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found