Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OnUnobservedTaskException() System.ArgumentException: Requested value 'media' was not found. #18

Closed
Citrinate opened this issue Dec 5, 2023 · 10 comments

Comments

@Citrinate
Copy link
Owner

Citrinate commented Dec 5, 2023

Reposting this issue from @shinji257

Not sure what triggers this. It looks like it is trying to check filtering but I have nothing custom defined in the bot. I'm not even sure where the media keyword is used.

EDIT: Actually it looks like it is happening when it detects a PICS change. I just added the default set of filters to the config to see if it fixes it... Will advise later and close if it does.

2023-12-05 14:31:53|ArchiSteamFarm-52604|FATAL|ASF|OnUnobservedTaskException() System.ArgumentException: Requested value 'media' was not found.
   at System.Enum.TryParseByName(RuntimeType enumType, ReadOnlySpan`1 value, Boolean ignoreCase, Boolean throwOnFailure, UInt64& result)
   at System.Enum.TryParseInt32Enum(RuntimeType enumType, ReadOnlySpan`1 value, Int32 minInclusive, Int32 maxInclusive,Boolean ignoreCase, Boolean throwOnFailure, TypeCode type, Int32& result)
   at System.Enum.TryParse[TEnum](ReadOnlySpan`1 value, Boolean ignoreCase, Boolean throwOnFailure, TEnum& result)
   at FreePackages.FilterableApp..ctor(UInt32 id, KeyValue kv)
   at FreePackages.FilterablePackage.<>c.<AddPackageContents>b__22_0(ValueTuple`2 packageContent)
   at System.Linq.Utilities.<>c__DisplayClass2_0`3.<CombineSelectors>b__0(TSource)
   at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.ToList()
   at FreePackages.FilterablePackage.AddPackageContents(IEnumerable`1 packageContents)
   at System.Collections.Generic.List`1.ForEach(Action`1)
   at FreePackages.PackageHandler.HandleProductInfo(List`1 productInfo)
   at FreePackages.PackageHandler.GetProductInfo(HashSet`1 appIDs, HashSet`1 packageIDs, Func`2 onFetchProductInfoCallback)
   at FreePackages.PackageHandler.HandleChanges()
   at FreePackages.PackageHandler.<>c.<<OnPICSChanges>b__19_3>d.MoveNext()
@Citrinate
Copy link
Owner Author

I think I see what's causing this. This doesn't look like a config issue. It looks like there's a certain game which has a property value that the plugin isn't expecting to see.

If it doesn't go away on it's own, maybe you can temporarily fix this by going to your ArchiSteamFarm config folder, and edit the FreePackages.cache file in a text editor. Change it to something like: {"LastChangeNumber":21412195}

I'm currently running the plugin, but I didn't get this error, and I don't understand why I wouldn't. Have you been using the plugin for long or have you just started using it? What version of ArchiSteamFarm are you using? Also are you using an OS specific version of ArchiSteamFarm or the generic version?

@shinji257
Copy link

shinji257 commented Dec 5, 2023

New user and adding the default filters to the bot config changed nothing (sorta expected). I did add a bunch of license requests to the queue via the user script.

ASF 5.4.13.4 - win-x64 - c582499

I'll try switching to the asf-generic version to see if that changes anything for us.

@shinji257
Copy link

I noticed and I was trying to be diligent about that. I'll change it sometime. Luckily I do unique passwords now so only Steam would be impacted.

Anyways I migrated to ASF 5.4.13.4 - generic - c582499 and will monitor to see if it still does it.

@shinji257
Copy link

shinji257 commented Dec 5, 2023

Just got it on generic. Wish there was a way to know what game it is trying to process that triggers the message. Lemme try clearing the list and let it sit a while.

Update: Still does it once the list is cleared.

Citrinate added a commit that referenced this issue Dec 5, 2023
@Citrinate
Copy link
Owner Author

Citrinate commented Dec 5, 2023

This version should fix the issue: FreePackages V1.3.1.zip

However, this new version requires at least ArchiSteamFarm V5.5.0.5. I could offer a fix for the current stable version of ArchiSteamFarm, though that will take me more time.

@shinji257
Copy link

That's not an issue for me to update. I bumped to the latest pre-release of 5.5.0.8 and will monitor to see if I get a recurrence but I'm confident you took care of it. I'll leave it up to you if you want to fix it on the stable build.

@shinji257
Copy link

Nevermind. Issue persists...

Currently on 5.5.0.8 / 1.3.0.0

2023-12-05 17:13:53|dotnet-24724|FATAL|ASF|OnUnobservedTaskException() System.ArgumentException: Requested value 'media' was not found.
   at System.Enum.TryParseByName[TStorage](RuntimeType enumType, ReadOnlySpan`1 value, Boolean ignoreCase, Boolean throwOnFailure, TStorage& result)
   at FreePackages.FilterableApp..ctor(UInt32 id, KeyValue kv)
   at FreePackages.FilterablePackage.<>c.<AddPackageContents>b__22_0(ValueTuple`2 packageContent)
   at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.ToList()
   at FreePackages.FilterablePackage.AddPackageContents(IEnumerable`1 packageContents)
   at System.Collections.Generic.List`1.ForEach(Action`1 action)
   at FreePackages.PackageHandler.HandleProductInfo(List`1 productInfo)
   at FreePackages.PackageHandler.GetProductInfo(HashSet`1 appIDs, HashSet`1 packageIDs, Func`2 onFetchProductInfoCallback)
   at FreePackages.PackageHandler.HandleChanges()
   at FreePackages.PackageHandler.<>c.<<OnPICSChanges>b__19_3>d.MoveNext()

I think this is the same as mentioned earlier.

@Citrinate
Copy link
Owner Author

The version I posted here should be 1.3.1. Can you verify that when ASF is starting up you see the line:

InitPlugins() Loading FreePackages V1.3.1.0...

@shinji257
Copy link

My bad. For some reason I thought you linked to the releases and didn't actually click on that. Now I have 1.3.1.0. I'll let you know if the issue shows up again.

@shinji257
Copy link

Been an hour and so far no message. Looks like we got it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants