Rudokhvist/BoosterCreator

Please check that v.2.0.0.0 works correctly for you with ASF v.6

Closed this issue · 3 comments

          Please check that v.2.0.0.0 works correctly for you with ASF v.6

Originally posted by @Rudokhvist in #23 (comment)

It initializes and loads, but throws this on the attempt to make the first booster:

2024-03-11 16:28:34|dotnet-10591|FATAL|ASF|OnUnhandledException() System.Text.Json.JsonException: The JSON value could not be converted to System.UInt32. Path: $[0].price | LineNumber: 0 | BytePositionInLine: 59.
 ---> System.InvalidOperationException: Cannot get the value of a token type 'String' as a number.                         at System.Text.Json.ThrowHelper.ThrowInvalidOperationException_ExpectedNumber(JsonTokenType tokenType)
   at System.Text.Json.Utf8JsonReader.TryGetUInt32(UInt32& value)                                                          at System.Text.Json.Utf8JsonReader.GetUInt32()                                                                          at System.Text.Json.Serialization.Metadata.JsonPropertyInfo`1.ReadJsonAndSetMember(Object obj, ReadStack& state, Utf8JsonReader& reader)
   at System.Text.Json.Serialization.Converters.ObjectDefaultConverter`1.OnTryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value)
   at System.Text.Json.Serialization.JsonConverter`1.TryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value, Boolean& isPopulatedValue)
   at System.Text.Json.Serialization.JsonCollectionConverter`2.OnTryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, TCollection& value)
   at System.Text.Json.Serialization.JsonConverter`1.TryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value, Boolean& isPopulatedValue)
   at System.Text.Json.Serialization.JsonConverter`1.ReadCore(Utf8JsonReader& reader, JsonSerializerOptions options, ReadStack& state)
   --- End of inner exception stack trace ---
   at System.Text.Json.ThrowHelper.ReThrowWithPath(ReadStack& state, Utf8JsonReader& reader, Exception ex)                 at System.Text.Json.Serialization.JsonConverter`1.ReadCore(Utf8JsonReader& reader, JsonSerializerOptions options, ReadStack& state)
   at System.Text.Json.JsonSerializer.ReadFromSpan[TValue](ReadOnlySpan`1 utf8Json, JsonTypeInfo`1 jsonTypeInfo, Nullable`1 actualByteCount)
   at System.Text.Json.JsonSerializer.ReadFromSpan[TValue](ReadOnlySpan`1 json, JsonTypeInfo`1 jsonTypeInfo)
   at ArchiSteamFarm.Helpers.Json.JsonUtilities.ToJsonObject[T](String json)
   at BoosterCreator.BoosterHandler.CreateBooster(Bot bot, ConcurrentDictionary`2 gameIDs)
   at BoosterCreator.BoosterHandler.AutoBooster()                                                                        
   at BoosterCreator.BoosterHandler.<.ctor>b__6_0(Object e)
   at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__128_1(Object state)
   at System.Threading.ThreadPoolWorkQueue.Dispatch()
   at System.Threading.PortableThreadPool.WorkerThread.WorkerThreadStart()
2024-03-11 16:28:34|dotnet-10591|ERROR|ASF|Exit() Exiting with 1 error code!

Perhaps other JSON related issues as mentioned here in the Changelog: https://github.com/JustArchiNET/ArchiSteamFarm/releases/tag/6.0.0.3

Thank you for feedback, really appreciate it. Please check if v.2.0.0.1 fixes outstanding issues

Got 2.0.0.1 loaded and running. So far, so good. Made it through the first pass of my GamesToBooster array with no apparent problems. Thanks for the quick response.