SakuraIsayeki / WOWS-Karma

Persistent and Comprehensive Karma system for World of Warships
https://wows-karma.com
GNU General Public License v3.0
20 stars 2 forks source link

API returns errors while fetching specific Player profiles #82

Closed StealthPigeon closed 2 years ago

StealthPigeon commented 2 years ago

https://wows-karma.com/player/550230795,gagapotapac/

19/03 17:26

System.Net.Http.HttpRequestException: Response status code does not indicate success: 500 (Internal Server Error).
   at System.Net.Http.HttpResponseMessage.EnsureSuccessStatusCode()
   at WowsKarma.Web.Services.PlayerService.FetchPlayerProfileAsync(UInt32 id) in D:\Code\Source\WoWS-Karma\WowsKarma.Web\Services\PlayerService.cs:line 48
   at WowsKarma.Web.Pages.Players.Profile.OnParametersSetAsync() in D:\Code\Source\WoWS-Karma\WowsKarma.Web\Pages\Players\Profile.razor:line 182
   at Microsoft.AspNetCore.Components.ComponentBase.CallStateHasChangedOnAsyncCompletion(Task task)
   at Microsoft.AspNetCore.Components.ComponentBase.RunInitAndSetParametersAsync()
   at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task taskToHandle, ComponentState owningComponentState)

Also,

https://wows-karma.com/player/555106330,WalaMiStopy/

19/03 17:27

System.Net.Http.HttpRequestException: Response status code does not indicate success: 500 (Internal Server Error).
   at System.Net.Http.HttpResponseMessage.EnsureSuccessStatusCode()
   at WowsKarma.Web.Services.PlayerService.FetchPlayerProfileAsync(UInt32 id) in D:\Code\Source\WoWS-Karma\WowsKarma.Web\Services\PlayerService.cs:line 48
   at WowsKarma.Web.Pages.Players.Profile.OnParametersSetAsync() in D:\Code\Source\WoWS-Karma\WowsKarma.Web\Pages\Players\Profile.razor:line 182
   at Microsoft.AspNetCore.Components.ComponentBase.CallStateHasChangedOnAsyncCompletion(Task task)
   at Microsoft.AspNetCore.Components.ComponentBase.RunInitAndSetParametersAsync()
   at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task taskToHandle, ComponentState owningComponentState)
SakuraIsayeki commented 2 years ago

Acknowledged issue.

API Stacktrace for context:

[15:26:37 ERR] HTTP/1.1 GET /api/player/550230795?includeClanInfo=true by Darkeid, responded 500 in 199.43 ms
System.Text.Json.JsonException: The JSON value could not be converted to System.UInt32. Path: $.clanview.wows_ladder.ratings[0].id | LineNumber: 0 | BytePositionInLine: 722.
 ---> System.InvalidOperationException: Cannot get the value of a token type 'Null' as a number.
   at System.Text.Json.Utf8JsonReader.TryGetUInt32(UInt32& value)
   at System.Text.Json.Utf8JsonReader.GetUInt32()
   at System.Text.Json.Serialization.JsonConverter`1.TryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value)
   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)
   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)
   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)
   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)
   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)
   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.ReadCore[TValue](JsonReaderState&] readerState, Boolean isFinalBlock, ReadOnlySpan`1 buffer, JsonSerializerOptions options, ReadStack& state, JsonConverter converterBase)
   at System.Text.Json.JsonSerializer.ContinueDeserialize[TValue](ReadBufferState&] bufferState, JsonReaderState& jsonReaderState, ReadStack& readStack, JsonConverter converter, JsonSerializerOptions options)
   at System.Text.Json.JsonSerializer.ReadAllAsync[TValue](Stream] utf8Json, JsonTypeInfo jsonTypeInfo, CancellationToken cancellationToken)
   at System.Net.Http.Json.HttpContentJsonExtensions.ReadFromJsonAsyncCore[T](HttpContent] content, Encoding sourceEncoding, JsonSerializerOptions options, CancellationToken cancellationToken)
   at Nodsoft.Wargaming.Api.Client.Clients.Wows.WowsClansApiClient.FetchClanViewAsync(UInt32 clanId, CancellationToken ct)
   at WowsKarma.Api.Services.ClanService.UpdateClanInfoAsync(ApiDbContext context, UInt32 clanId, Clan clan, CancellationToken ct) in D:\Code\Source\WoWS-Karma\WowsKarma.Api\Services\ClanService.cs:line 84
   at WowsKarma.Api.Services.PlayerService.UpdatePlayerClanStatusAsync(Player player, CancellationToken ct) in D:\Code\Source\WoWS-Karma\WowsKarma.Api\Services\PlayerService.cs:line 174
   at WowsKarma.Api.Services.PlayerService.GetPlayerAsync(UInt32 accountId, Boolean includeRelated, Boolean includeClanInfo, CancellationToken ct) in D:\Code\Source\WoWS-Karma\WowsKarma.Api\Services\PlayerService.cs:line 96
   at WowsKarma.Api.Controllers.PlayerController.GetAccount(UInt32 id, Boolean includeClanInfo) in D:\Code\Source\WoWS-Karma\WowsKarma.Api\Controllers\PlayerController.cs:line 59
   at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.TaskOfIActionResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeActionMethodAsync>g__Logged|12_1(ControllerActionInvoker invoker)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeNextActionFilterAsync>g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeInnerFilterAsync>g__Awaited|13_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeFilterPipelineAsync>g__Awaited|20_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Logged|17_1(ResourceInvoker invoker)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Logged|17_1(ResourceInvoker invoker)
   at Microsoft.AspNetCore.Routing.EndpointMiddleware.<Invoke>g__AwaitRequestTask|6_0(Endpoint endpoint, Task requestTask, ILogger logger)
   at WowsKarma.Api.Middlewares.RequestLoggingMiddleware.Invoke(HttpContext context) in D:\Code\Source\WoWS-Karma\WowsKarma.Api\Middlewares\RequestLoggingMiddleware.cs:line 49
StealthPigeon commented 2 years ago

https://api.wows-karma.com:80/api/player/571960316 https://wows-karma.com/player/571960316,EvoX_404/

25/03 17:05

API Request: https://api.wows-karma.com:80/api/player/571960316

WowsKarma.Web.Infrastructure.Exceptions.ApiErrorResponseException: System.Text.Json.JsonException: The JSON value could not be converted to System.UInt32. Path: $.clanview.wows_ladder.ratings[0].id | LineNumber: 0 | BytePositionInLine: 2252.
   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.ReadCore[TValue](JsonReaderState& readerState, Boolean isFinalBlock, ReadOnlySpan`1 buffer, JsonSerializerOptions options, ReadStack& state, JsonConverter converterBase)
   at System.Text.Json.JsonSerializer.ContinueDeserialize[TValue](ReadBufferState& bufferState, JsonReaderState& jsonReaderState, ReadStack& readStack, JsonConverter converter, JsonSerializerOptions options)
   at System.Text.Json.JsonSerializer.ReadAllAsync[TValue](Stream utf8Json, JsonTypeInfo jsonTypeInfo, CancellationToken cancellationToken)
   at System.Net.Http.Json.HttpContentJsonExtensions.ReadFromJsonAsyncCore[T](HttpContent content, Encoding sourceEncoding, JsonSerializerOptions options, CancellationToken cancellationToken)
   at Nodsoft.Wargaming.Api.Client.Clients.Wows.WowsClansApiClient.FetchClanViewAsync(UInt32 clanId, CancellationToken ct)
   at WowsKarma.Api.Services.ClanService.UpdateClanInfoAsync(ApiDbContext context, UInt32 clanId, Clan clan, CancellationToken ct) in D:\Code\Source\WoWS-Karma\WowsKarma.Api\Services\ClanService.cs:line 84
   at WowsKarma.Api.Services.PlayerService.UpdatePlayerClanStatusAsync(Player player, CancellationToken ct) in D:\Code\Source\WoWS-Karma\WowsKarma.Api\Services\PlayerService.cs:line 174
   at WowsKarma.Api.Services.PlayerService.GetPlayerAsync(UInt32 accountId, Boolean includeRelated, Boolean includeClanInfo, CancellationToken ct) in D:\Code\Source\WoWS-Karma\WowsKarma.Api\Services\PlayerService.cs:line 96
   at WowsKarma.Api.Controllers.PlayerController.GetAccount(UInt32 id, Boolean includeClanInfo) in D:\Code\Source\WoWS-Karma\WowsKarma.Api\Controllers\PlayerController.cs:line 59
   at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.TaskOfIActionResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeActionMethodAsync>g__Logged|12_1(ControllerActionInvoker invoker)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeNextActionFilterAsync>g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeInnerFilterAsync>g__Awaited|13_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeFilterPipelineAsync>g__Awaited|20_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Logged|17_1(ResourceInvoker invoker)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Logged|17_1(ResourceInvoker invoker)
   at Microsoft.AspNetCore.Routing.EndpointMiddleware.<Invoke>g__AwaitRequestTask|6_0(Endpoint endpoint, Task requestTask, ILogger logger)
   at WowsKarma.Api.Middlewares.RequestLoggingMiddleware.Invoke(HttpContext context) in D:\Code\Source\WoWS-Karma\WowsKarma.Api\Middlewares\RequestLoggingMiddleware.cs:line 49
   at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware.<Invoke>g__Awaited|6_0(ExceptionHandlerMiddleware middleware, HttpContext context, Task task)
StealthPigeon commented 2 years ago

https://api.wows-karma.com:80/api/player/562270399

26/03 11:58

API Request: https://api.wows-karma.com:80/api/player/562270399

WowsKarma.Web.Infrastructure.Exceptions.ApiErrorResponseException: System.Text.Json.JsonException: The JSON value could not be converted to System.Int64. Path: $.clanview.wows_ladder.members_count | LineNumber: 0 | BytePositionInLine: 2135.
   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.ReadCore[TValue](JsonReaderState& readerState, Boolean isFinalBlock, ReadOnlySpan`1 buffer, JsonSerializerOptions options, ReadStack& state, JsonConverter converterBase)
   at System.Text.Json.JsonSerializer.ContinueDeserialize[TValue](ReadBufferState& bufferState, JsonReaderState& jsonReaderState, ReadStack& readStack, JsonConverter converter, JsonSerializerOptions options)
   at System.Text.Json.JsonSerializer.ReadAllAsync[TValue](Stream utf8Json, JsonTypeInfo jsonTypeInfo, CancellationToken cancellationToken)
   at System.Net.Http.Json.HttpContentJsonExtensions.ReadFromJsonAsyncCore[T](HttpContent content, Encoding sourceEncoding, JsonSerializerOptions options, CancellationToken cancellationToken)
   at Nodsoft.Wargaming.Api.Client.Clients.Wows.WowsClansApiClient.FetchClanViewAsync(UInt32 clanId, CancellationToken ct)
   at WowsKarma.Api.Services.ClanService.UpdateClanInfoAsync(ApiDbContext context, UInt32 clanId, Clan clan, CancellationToken ct) in D:\Code\Source\WoWS-Karma\WowsKarma.Api\Services\ClanService.cs:line 84
   at WowsKarma.Api.Services.PlayerService.UpdatePlayerClanStatusAsync(Player player, CancellationToken ct) in D:\Code\Source\WoWS-Karma\WowsKarma.Api\Services\PlayerService.cs:line 174
   at WowsKarma.Api.Services.PlayerService.GetPlayerAsync(UInt32 accountId, Boolean includeRelated, Boolean includeClanInfo, CancellationToken ct) in D:\Code\Source\WoWS-Karma\WowsKarma.Api\Services\PlayerService.cs:line 96
   at WowsKarma.Api.Controllers.PlayerController.GetAccount(UInt32 id, Boolean includeClanInfo) in D:\Code\Source\WoWS-Karma\WowsKarma.Api\Controllers\PlayerController.cs:line 59
   at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.TaskOfIActionResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeActionMethodAsync>g__Logged|12_1(ControllerActionInvoker invoker)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeNextActionFilterAsync>g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeInnerFilterAsync>g__Awaited|13_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeFilterPipelineAsync>g__Awaited|20_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Logged|17_1(ResourceInvoker invoker)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Logged|17_1(ResourceInvoker invoker)
   at Microsoft.AspNetCore.Routing.EndpointMiddleware.<Invoke>g__AwaitRequestTask|6_0(Endpoint endpoint, Task requestTask, ILogger logger)
   at WowsKarma.Api.Middlewares.RequestLoggingMiddleware.Invoke(HttpContext context) in D:\Code\Source\WoWS-Karma\WowsKarma.Api\Middlewares\RequestLoggingMiddleware.cs:line 49
   at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware.<Invoke>g__Awaited|6_0(ExceptionHandlerMiddleware middleware, HttpContext context, Task task)