DennisvHest / MapMaven

Map Maven is an application for managing Beat Saber playlists, discovering new maps to play and to improve your Beat Saber skills.
GNU General Public License v3.0
10 stars 0 forks source link

Unwanted new ranked maps are downloaded after fetching scores/player profile fails #137

Open DennisvHest opened 7 months ago

DennisvHest commented 7 months ago

These maps were downloaded, but do not appear in any dynamic playlist: image

Looking in the logs, it seems to happen the first time dynamic playlists are generated after getting scores/player profile fails:

2024-02-10 15:26:57.380 +01:00 [ERR] Error raised. Message: Failed to load player profile from BeatLeader.
HTTP Response: 

error code: 1016

MapMaven.Core.ApiClients.BeatLeader.ApiException: The HTTP status code of the response was not expected (530).

Status: 530
Response: 
error code: 1016
   at MapMaven.Core.ApiClients.BeatLeader.BeatLeaderApiClient.PlayerAsync(String id, Nullable`1 stats, Nullable`1 keepOriginalId, Nullable`1 leaderboardContext, CancellationToken cancellationToken) in C:\dev\MapMaven\MapMaven.Core\obj\beatleader-apiClient.cs:line 7401
   at MapMaven.Core.Services.Leaderboards.BeatLeaderService.<>c__DisplayClass30_1.<<-ctor>b__7>d.MoveNext() in C:\dev\MapMaven\MapMaven.Core\Services\Leaderboards\BeatLeaderService.cs:line 134
2024-02-10 15:26:57.503 +01:00 [ERR] Error raised. Message: Failed to load player profile from BeatLeader.
HTTP Response: 

error code: 1016

MapMaven.Core.ApiClients.BeatLeader.ApiException: The HTTP status code of the response was not expected (530).

Status: 530
Response: 
error code: 1016
   at MapMaven.Core.ApiClients.BeatLeader.BeatLeaderApiClient.PlayerAsync(String id, Nullable`1 stats, Nullable`1 keepOriginalId, Nullable`1 leaderboardContext, CancellationToken cancellationToken) in C:\dev\MapMaven\MapMaven.Core\obj\beatleader-apiClient.cs:line 7401
   at MapMaven.Core.Services.Leaderboards.BeatLeaderService.<>c__DisplayClass30_1.<<-ctor>b__7>d.MoveNext() in C:\dev\MapMaven\MapMaven.Core\Services\Leaderboards\BeatLeaderService.cs:line 134
2024-02-10 15:26:58.015 +01:00 [INF] Executed DbCommand (0ms) [Parameters=[], CommandType='"Text"', CommandTimeout='30']
SELECT "m"."Id", "m"."AddedDateTime", "m"."CoverImageFilename", "m"."DirectoryPath", "m"."Hash", "m"."LevelAuthorName", "m"."PreviewDurationInSeconds", "m"."PreviewStartTimeInSeconds", "m"."SongAuthorName", "m"."SongDuration", "m"."SongFileName", "m"."SongName"
FROM "MapInfos" AS "m"
2024-02-10 15:26:58.069 +01:00 [INF] Executed DbCommand (0ms) [Parameters=[], CommandType='"Text"', CommandTimeout='30']
SELECT "m"."Id", "m"."AddedDateTime", "m"."CoverImageFilename", "m"."DirectoryPath", "m"."Hash", "m"."LevelAuthorName", "m"."PreviewDurationInSeconds", "m"."PreviewStartTimeInSeconds", "m"."SongAuthorName", "m"."SongDuration", "m"."SongFileName", "m"."SongName"
FROM "MapInfos" AS "m"
2024-02-10 15:26:58.509 +01:00 [INF] Done arranging dynamic playlists!
2024-02-10 15:27:57.483 +01:00 [ERR] Error raised. Message: Failed to load player scores from BeatLeader.
HTTP Response: 

error code: 502

MapMaven.Core.ApiClients.BeatLeader.ApiException: The HTTP status code of the response was not expected (502).

Status: 502
Response: 
error code: 502
   at MapMaven.Core.ApiClients.BeatLeader.BeatLeaderApiClient.ScoresAsync(String id, String sortBy, Nullable`1 order, Nullable`1 page, Nullable`1 count, String search, String diff, String mode, Nullable`1 requirements, Nullable`1 scoreStatus, Nullable`1 leaderboardContext, String type, String modifiers, Nullable`1 stars_from, Nullable`1 stars_to, Nullable`1 time_from, Nullable`1 time_to, Nullable`1 eventId, CancellationToken cancellationToken) in C:\dev\MapMaven\MapMaven.Core\obj\beatleader-apiClient.cs:line 9789
   at MapMaven.Core.Services.Leaderboards.BeatLeaderService.<>c__DisplayClass30_0.<<-ctor>b__4>d.MoveNext() in C:\dev\MapMaven\MapMaven.Core\Services\Leaderboards\BeatLeaderService.cs:line 78
2024-02-10 15:31:56.196 +01:00 [INF] Arranging dynamic playlists...
2024-02-10 15:31:56.197 +01:00 [INF] Executed DbCommand (0ms) [Parameters=[], CommandType='"Text"', CommandTimeout='30']
SELECT "a"."Id", "a"."Key", "a"."StringValue"
FROM "ApplicationSettings" AS "a"
2024-02-10 15:31:57.195 +01:00 [INF] Executed DbCommand (0ms) [Parameters=[], CommandType='"Text"', CommandTimeout='30']
SELECT "h"."Id", "h"."Difficulty", "h"."Hash", "h"."PlayerId"
FROM "HiddenMaps" AS "h"
2024-02-10 15:31:57.218 +01:00 [INF] Executed DbCommand (0ms) [Parameters=[], CommandType='"Text"', CommandTimeout='30']
SELECT "m"."Id", "m"."AddedDateTime", "m"."CoverImageFilename", "m"."DirectoryPath", "m"."Hash", "m"."LevelAuthorName", "m"."PreviewDurationInSeconds", "m"."PreviewStartTimeInSeconds", "m"."SongAuthorName", "m"."SongDuration", "m"."SongFileName", "m"."SongName"
FROM "MapInfos" AS "m"
2024-02-10 15:31:57.256 +01:00 [INF] Executed DbCommand (0ms) [Parameters=[], CommandType='"Text"', CommandTimeout='30']
SELECT "m"."Id", "m"."AddedDateTime", "m"."CoverImageFilename", "m"."DirectoryPath", "m"."Hash", "m"."LevelAuthorName", "m"."PreviewDurationInSeconds", "m"."PreviewStartTimeInSeconds", "m"."SongAuthorName", "m"."SongDuration", "m"."SongFileName", "m"."SongName"
FROM "MapInfos" AS "m"
2024-02-10 15:32:02.875 +01:00 [INF] Executed DbCommand (0ms) [Parameters=[], CommandType='"Text"', CommandTimeout='30']
SELECT "m"."Id", "m"."AddedDateTime", "m"."CoverImageFilename", "m"."DirectoryPath", "m"."Hash", "m"."LevelAuthorName", "m"."PreviewDurationInSeconds", "m"."PreviewStartTimeInSeconds", "m"."SongAuthorName", "m"."SongDuration", "m"."SongFileName", "m"."SongName"
FROM "MapInfos" AS "m"
2024-02-10 15:32:03.338 +01:00 [INF] Executed DbCommand (0ms) [Parameters=[], CommandType='"Text"', CommandTimeout='30']
SELECT "m"."Id", "m"."AddedDateTime", "m"."CoverImageFilename", "m"."DirectoryPath", "m"."Hash", "m"."LevelAuthorName", "m"."PreviewDurationInSeconds", "m"."PreviewStartTimeInSeconds", "m"."SongAuthorName", "m"."SongDuration", "m"."SongFileName", "m"."SongName"
FROM "MapInfos" AS "m"
2024-02-10 15:32:03.434 +01:00 [INF] Executed DbCommand (1ms) [Parameters=[@p0='?' (Size = 5), @p1='?' (DbType = DateTime), @p2='?' (Size = 9), @p3='?' (Size = 115), @p4='?' (Size = 40), @p5='?' (Size = 7), @p6='?' (DbType = Single), @p7='?' (DbType = Single), @p8='?' (Size = 12), @p9='?' (DbType = Time), @p10='?' (Size = 8), @p11='?' (Size = 11)], CommandType='"Text"', CommandTimeout='30']
INSERT INTO "MapInfos" ("Id", "AddedDateTime", "CoverImageFilename", "DirectoryPath", "Hash", "LevelAuthorName", "PreviewDurationInSeconds", "PreviewStartTimeInSeconds", "SongAuthorName", "SongDuration", "SongFileName", "SongName")
VALUES (@p0, @p1, @p2, @p3, @p4, @p5, @p6, @p7, @p8, @p9, @p10, @p11);
2024-02-10 15:32:03.435 +01:00 [INF] Executed DbCommand (0ms) [Parameters=[@p0='?' (Size = 5), @p1='?' (DbType = DateTime), @p2='?' (Size = 12), @p3='?' (Size = 120), @p4='?' (Size = 40), @p5='?' (Size = 15), @p6='?' (DbType = Single), @p7='?' (DbType = Single), @p8='?' (Size = 6), @p9='?' (DbType = Time), @p10='?' (Size = 35), @p11='?' (Size = 8)], CommandType='"Text"', CommandTimeout='30']
INSERT INTO "MapInfos" ("Id", "AddedDateTime", "CoverImageFilename", "DirectoryPath", "Hash", "LevelAuthorName", "PreviewDurationInSeconds", "PreviewStartTimeInSeconds", "SongAuthorName", "SongDuration", "SongFileName", "SongName")
VALUES (@p0, @p1, @p2, @p3, @p4, @p5, @p6, @p7, @p8, @p9, @p10, @p11);
2024-02-10 15:32:03.435 +01:00 [INF] Executed DbCommand (0ms) [Parameters=[@p0='?' (Size = 5), @p1='?' (DbType = DateTime), @p2='?' (Size = 9), @p3='?' (Size = 135), @p4='?' (Size = 40), @p5='?' (Size = 32), @p6='?' (DbType = Single), @p7='?' (DbType = Single), @p8='?' (Size = 12), @p9='?' (DbType = Time), @p10='?' (Size = 8), @p11='?' (Size = 6)], CommandType='"Text"', CommandTimeout='30']
INSERT INTO "MapInfos" ("Id", "AddedDateTime", "CoverImageFilename", "DirectoryPath", "Hash", "LevelAuthorName", "PreviewDurationInSeconds", "PreviewStartTimeInSeconds", "SongAuthorName", "SongDuration", "SongFileName", "SongName")
VALUES (@p0, @p1, @p2, @p3, @p4, @p5, @p6, @p7, @p8, @p9, @p10, @p11);
2024-02-10 15:32:03.435 +01:00 [INF] Executed DbCommand (0ms) [Parameters=[@p0='?' (Size = 5), @p1='?' (DbType = DateTime), @p2='?' (Size = 9), @p3='?' (Size = 112), @p4='?' (Size = 40), @p5='?' (Size = 8), @p6='?' (DbType = Single), @p7='?' (DbType = Single), @p8='?' (Size = 6), @p9='?' (DbType = Time), @p10='?' (Size = 8), @p11='?' (Size = 7)], CommandType='"Text"', CommandTimeout='30']
INSERT INTO "MapInfos" ("Id", "AddedDateTime", "CoverImageFilename", "DirectoryPath", "Hash", "LevelAuthorName", "PreviewDurationInSeconds", "PreviewStartTimeInSeconds", "SongAuthorName", "SongDuration", "SongFileName", "SongName")
VALUES (@p0, @p1, @p2, @p3, @p4, @p5, @p6, @p7, @p8, @p9, @p10, @p11);
2024-02-10 15:32:03.435 +01:00 [INF] Executed DbCommand (0ms) [Parameters=[@p0='?' (Size = 5), @p1='?' (DbType = DateTime), @p2='?' (Size = 9), @p3='?' (Size = 113), @p4='?' (Size = 40), @p5='?' (Size = 7), @p6='?' (DbType = Single), @p7='?' (DbType = Single), @p8='?' (Size = 8), @p9='?' (DbType = Time), @p10='?' (Size = 13), @p11='?' (Size = 9)], CommandType='"Text"', CommandTimeout='30']
INSERT INTO "MapInfos" ("Id", "AddedDateTime", "CoverImageFilename", "DirectoryPath", "Hash", "LevelAuthorName", "PreviewDurationInSeconds", "PreviewStartTimeInSeconds", "SongAuthorName", "SongDuration", "SongFileName", "SongName")
VALUES (@p0, @p1, @p2, @p3, @p4, @p5, @p6, @p7, @p8, @p9, @p10, @p11);
2024-02-10 15:32:03.435 +01:00 [INF] Executed DbCommand (0ms) [Parameters=[@p0='?' (Size = 5), @p1='?' (DbType = DateTime), @p2='?' (Size = 9), @p3='?' (Size = 123), @p4='?' (Size = 40), @p5='?' (Size = 11), @p6='?' (DbType = Single), @p7='?' (DbType = Single), @p8='?' (Size = 8), @p9='?' (DbType = Time), @p10='?' (Size = 9), @p11='?' (Size = 15)], CommandType='"Text"', CommandTimeout='30']
INSERT INTO "MapInfos" ("Id", "AddedDateTime", "CoverImageFilename", "DirectoryPath", "Hash", "LevelAuthorName", "PreviewDurationInSeconds", "PreviewStartTimeInSeconds", "SongAuthorName", "SongDuration", "SongFileName", "SongName")
VALUES (@p0, @p1, @p2, @p3, @p4, @p5, @p6, @p7, @p8, @p9, @p10, @p11);
2024-02-10 15:32:03.450 +01:00 [INF] Done arranging dynamic playlists!
DennisvHest commented 7 months ago

Could not reproduce it by throwing an exception on BeatLeader requests and triggering dynamic playlist generation.