System.Collections.Generic.KeyNotFoundException: The given key
2024-05-09 14:43:18|ArchiSteamFarm-23364|INFO|ASF|CollectGames() [FreeGames] found potentially 22 free games on reddit 2024-05-09 14:43:18|ArchiSteamFarm-23364|FATAL|ASF|OnUnhandledException() System.Collections.Generic.KeyNotFoundException: The given key 'Terreus' was not present in the dictionary. at System.Collections.Generic.Dictionary2.get_Item(TKey)
at ASFFreeGames.Commands.FreeGamesCommand.<>c__DisplayClass14_0.<HandleInternalCollectCommand>b__2(String botName)
at System.Linq.Enumerable.SelectListPartitionIterator2.MoveNext() at ASFFreeGames.Commands.FreeGamesCommand.CollectGames(IEnumerable1 bots, ECollectGameRequestSource requestSource, CancellationToken cancellationToken)
at ASFFreeGames.Commands.FreeGamesCommand.HandleInternalCollectCommand(Bot bot, String[] args, CancellationToken cancellationToken)
at ASFFreeGames.Commands.FreeGamesCommand.Execute(Bot bot, String message, String[] args, UInt64 steamID, CancellationToken cancellationToken)
at ASFFreeGames.Commands.CommandDispatcher.Execute(Bot bot, String message, String[] args, UInt64 steamID, CancellationToken cancellationToken)
at Maxisoft.ASF.ASFFreeGamesPlugin.OnBotCommand(Bot bot, EAccess access, String message, String[] args, UInt64 steamID)
at Maxisoft.ASF.ASFFreeGamesPlugin.CollectGamesOnClock(Object source)
at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__128_1(Object state)
at System.Threading.QueueUserWorkItemCallback.<>c.<.cctor>b__6_0(QueueUserWorkItemCallback quwi)
at System.Threading.ExecutionContext.RunForThreadPoolUnsafe[TState](ExecutionContext, Action1, TState& ) at System.Threading.QueueUserWorkItemCallback.Execute() at System.Threading.ThreadPoolWorkQueue.Dispatch() at System.Threading.PortableThreadPool.WorkerThread.WorkerThreadStart() at System.Threading.Thread.StartCallback() 2024-05-09 14:43:18|ArchiSteamFarm-23364|ERROR|ASF|Exit() Exiting with 1 error code! 2024-05-09 14:43:18|ArchiSteamFarm-23364|INFO|Microsoft.Hosting.Lifetime|Application is shutting down... Unhandled exception. System.Collections.Generic.KeyNotFoundException: The given key 'Terreus' was not present in the dictionary. at System.Collections.Generic.Dictionary2.get_Item(TKey)
at ASFFreeGames.Commands.FreeGamesCommand.<>c__DisplayClass14_0.<HandleInternalCollectCommand>b__2(String botName)
at System.Linq.Enumerable.SelectListPartitionIterator2.MoveNext() at ASFFreeGames.Commands.FreeGamesCommand.CollectGames(IEnumerable1 bots, ECollectGameRequestSource requestSource, CancellationToken cancellationToken)
at ASFFreeGames.Commands.FreeGamesCommand.HandleInternalCollectCommand(Bot bot, String[] args, CancellationToken cancellationToken)
at ASFFreeGames.Commands.FreeGamesCommand.Execute(Bot bot, String message, String[] args, UInt64 steamID, CancellationToken cancellationToken)
at ASFFreeGames.Commands.CommandDispatcher.Execute(Bot bot, String message, String[] args, UInt64 steamID, CancellationToken cancellationToken)
at Maxisoft.ASF.ASFFreeGamesPlugin.OnBotCommand(Bot bot, EAccess access, String message, String[] args, UInt64 steamID)
at Maxisoft.ASF.ASFFreeGamesPlugin.CollectGamesOnClock(Object source)
at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__128_1(Object state)
at System.Threading.QueueUserWorkItemCallback.<>c.<.cctor>b__6_0(QueueUserWorkItemCallback quwi)
at System.Threading.ExecutionContext.RunForThreadPoolUnsafe[TState](ExecutionContext, Action1, TState& ) at System.Threading.QueueUserWorkItemCallback.Execute() at System.Threading.ThreadPoolWorkQueue.Dispatch() at System.Threading.PortableThreadPool.WorkerThread.WorkerThreadStart() at System.Threading.Thread.StartCallback() zsh: abort /Users/********/*******/ASF-osx-x64/ArchiSteamFarm
Desktop:
- OS: mcOS Sonoma
Hi @enutn,
The upcoming release will include a fix for the KeyNotFoundException you've encountered. This fix will prevent ASF from crashing under similar circumstances, but it's important to note that the ASFFreeGames plugin might still not claim the games for the specific account that triggered the issue.
To help us pinpoint the root cause, could you provide more information? For example:
- Did you add, edit, or remove a bot while the plugin was running? If so, restarting the app might resolve the issue.
- Does your bot name contain any special or unusual characters that might not be handled correctly?
Any additional details you can provide would be greatly appreciated to ensure a comprehensive solution.
Thanks for your understanding and cooperation.
Best, Maxisoft