maxisoft / ASFFreeGames

Collect free steam games while asf is running
GNU Affero General Public License v3.0
121 stars 2 forks source link

System.Collections.Generic.KeyNotFoundException: The given key #70

Open enutn opened 1 month ago

enutn commented 1 month ago

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.<>cDisplayClass14_0.b2(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.b128_1(Object state) at System.Threading.QueueUserWorkItemCallback.<>c.<.cctor>b6_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.<>cDisplayClass14_0.b2(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.b128_1(Object state) at System.Threading.QueueUserWorkItemCallback.<>c.<.cctor>b6_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:

maxisoft commented 1 month ago

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:

Any additional details you can provide would be greatly appreciated to ensure a comprehensive solution.

Thanks for your understanding and cooperation.

Best, Maxisoft