Camille icon indicating copy to clipboard operation
Camille copied to clipboard

GameMode `PRACTICETOOL` Enum issue

Open lorenblue opened this issue 4 years ago • 3 comments

Hey there! I am very much a noob with all of this, but this does seem very similar to an issue that is currently open with Camille right now. It only happens when trying to retrieve match data from a certain match ID (match IDs in question all belong to same summoner), but I am not able to distinguish what exactly is different about this particular match. Thanks so much!

Unhandled exception. System.AggregateException: One or more errors occurred. (The JSON value could not be converted to Camille.Enums.GameMode. Path: $.info.gameMode | LineNumber: 0 | BytePositionInLine: 291.) ---> System.Text.Json.JsonException: The JSON value could not be converted to Camille.Enums.GameMode. Path: $.info.gameMode | LineNumber: 0 | BytePositionInLine: 291. at System.Text.Json.ThrowHelper.ThrowJsonException(String message) at System.Text.Json.Serialization.Converters.EnumConverter1.ReadAsPropertyNameCore(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options) at System.Text.Json.Serialization.Converters.EnumConverter1.Read(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options) at System.Text.Json.Serialization.Metadata.JsonPropertyInfo1.ReadJsonAndSetMember(Object obj, ReadStack& state, Utf8JsonReader& reader) at System.Text.Json.Serialization.Converters.ObjectDefaultConverter1.OnTryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value) at System.Text.Json.Serialization.JsonConverter1.TryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value) at System.Text.Json.Serialization.Metadata.JsonPropertyInfo1.ReadJsonAndSetMember(Object obj, ReadStack& state, Utf8JsonReader& reader) at System.Text.Json.Serialization.Converters.ObjectDefaultConverter1.OnTryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value) at System.Text.Json.Serialization.JsonConverter1.TryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value) at System.Text.Json.Serialization.JsonConverter1.ReadCore(Utf8JsonReader& reader, JsonSerializerOptions options, ReadStack& state) at System.Text.Json.JsonSerializer.ReadFromSpan[TValue](ReadOnlySpan1 utf8Json, JsonTypeInfo jsonTypeInfo, Nullable1 actualByteCount) at System.Text.Json.JsonSerializer.ReadFromSpan[TValue](ReadOnlySpan1 json, JsonTypeInfo jsonTypeInfo) at System.Text.Json.JsonSerializer.Deserialize[TValue](String json, JsonSerializerOptions options) at Camille.Core.JsonHandler.Deserialize[T](String content) at Camille.RiotGames.RiotGamesApi.Send[T](String route, String methodId, HttpRequestMessage request, Nullable1 token, Boolean ignoreAppRateLimits) --- End of inner exception stack trace --- at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions) at System.Threading.Tasks.Task1.GetResultCore(Boolean waitCompletionNotification) at System.Threading.Tasks.Task1.get_Result() at Program.<>c.<UpdateMatchDatabase>b__3_0(String id) in C:\Users\Lorenzo\Documents\RiotAPI\RiotAPINew\Program.cs:line 34 at System.Linq.Enumerable.SelectArrayIterator2.GetCount(Boolean onlyIfCheap) at System.Linq.Enumerable.Count[TSource](IEnumerable`1 source) at Program.UpdateMatchDatabase(String summonerName) in C:\Users\Lorenzo\Documents\RiotAPI\RiotAPINew\Program.cs:line 37 at Program.Main() in C:\Users\Lorenzo\Documents\RiotAPI\RiotAPINew\Program.cs:line 15

lorenblue avatar Apr 11 '22 01:04 lorenblue

The match in question:

Match ID: "NA1_4252152378" Summoner Name: "XtremeDawg"

lorenblue avatar Apr 11 '22 01:04 lorenblue

Ah, looks like the gamemmode is PRACTICETOOL which is missing from the enum. Didn't realize practice tool games could be public

MingweiSamuel avatar Apr 11 '22 16:04 MingweiSamuel

Should be fixed in 3.0.0-nightly-2022-04-12-9fe967ddf9

MingweiSamuel avatar Apr 12 '22 22:04 MingweiSamuel