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

When import beatmaps downloaded from osu! website, the game marked the beatmap is not ranked, but beatmap downloaded from osu!direct is ranked #31496

Open
NammIsADev opened this issue Jan 13, 2025 · 15 comments
Labels
area:import dealing with importing of data from stable or file formats priority:1 Very important. Feels bad without fix. Affects the majority of users. type:online

Comments

@NammIsADev
Copy link

Type

Game behaviour

Bug description

When I open osu!lazer on my Debian 12 and try to import a beatmap from the osu! website I downloaded, the beatmap is marked as not ranked. However, when I download the SAME beatmap from osu!direct, it is marked as ranked.

Screenshots or videos

osu_2025-01-13_17-57-17
osu_2025-01-13_17-57-34

Version

2025.101.0

Logs

logs.tar.gz

@NammIsADev NammIsADev changed the title Beatmaps downloaded from osu! website has not ranked, but downloaded from osu!direct is ranked When import beatmaps downloaded from osu! website has not ranked, but downloaded from osu!direct is ranked Jan 13, 2025
@NammIsADev NammIsADev changed the title When import beatmaps downloaded from osu! website has not ranked, but downloaded from osu!direct is ranked When import beatmaps downloaded from osu! website, the game marked the beatmap is not ranked, but beatmap downloaded from osu!direct is ranked Jan 13, 2025
@bdach
Copy link
Collaborator

bdach commented Jan 13, 2025

As far as I can see, you tried to import these maps either from stable or in a large batch:

2025-01-07 06:38:58 [verbose]: 📺 ScreenStack#378(depth:4) loading ScreenImportFromStable#318
2025-01-07 06:38:58 [verbose]: 📺 ScreenStack#378(depth:4) entered ScreenImportFromStable#318

Additionally, your local online metadata cache is corrupted:

2025-01-07 06:39:07 [verbose]: [1580c] [LocalCachedBeatmapMetadataSource] Cached local retrieval for Kuba Oms - My Love (W h i t e) [Hard] failed with Microsoft.Data.Sqlite.SqliteException (0x80004005): SQLite Error 11: 'database disk image is malformed'.
2025-01-07 06:39:07 [verbose]: at Microsoft.Data.Sqlite.SqliteException.ThrowExceptionForRC(Int32 rc, sqlite3 db)
2025-01-07 06:39:07 [verbose]: at Microsoft.Data.Sqlite.SqliteCommand.PrepareAndEnumerateStatements()+MoveNext()
2025-01-07 06:39:07 [verbose]: at Microsoft.Data.Sqlite.SqliteCommand.GetStatements()+MoveNext()
2025-01-07 06:39:07 [verbose]: at Microsoft.Data.Sqlite.SqliteDataReader.NextResult()
2025-01-07 06:39:07 [verbose]: at Microsoft.Data.Sqlite.SqliteCommand.ExecuteReader(CommandBehavior behavior)
2025-01-07 06:39:07 [verbose]: at Microsoft.Data.Sqlite.SqliteCommand.ExecuteReader()
2025-01-07 06:39:07 [verbose]: at osu.Game.Beatmaps.LocalCachedBeatmapMetadataSource.getCacheVersion(SqliteConnection connection)

Normally this would lead to falling back to an API request, but it looks like you were also not logged in at the time:

2025-01-07 06:40:17 [verbose]: Request to https://osu.ppy.sh/api/v2/users/helinatri/?key=username failed with System.Net.WebException: Unauthorized.
2025-01-07 06:40:17 [verbose]: Response was: {"authentication":"basic"}

so the online fallback could not be used and ultimately the status of the beatmap could not be determined.

As a short term fix please delete online.db from your game files and try again.

On our side there are probably two things that can be done:

  • sqlite corruptions should probably lead to the offline metadata cache getting purged
  • metadata lookup API requests should maybe be opened to anonymous users

@peppy opinions?

@bdach bdach added type:online area:import dealing with importing of data from stable or file formats labels Jan 13, 2025
@NammIsADev
Copy link
Author

NammIsADev commented Jan 13, 2025

As far as I can see, you tried to import these maps either from stable or in a large batch:

2025-01-07 06:38:58 [verbose]: 📺 ScreenStack#378(depth:4) loading ScreenImportFromStable#318
2025-01-07 06:38:58 [verbose]: 📺 ScreenStack#378(depth:4) entered ScreenImportFromStable#318

Additionally, your local online metadata cache is corrupted:

2025-01-07 06:39:07 [verbose]: [1580c] [LocalCachedBeatmapMetadataSource] Cached local retrieval for Kuba Oms - My Love (W h i t e) [Hard] failed with Microsoft.Data.Sqlite.SqliteException (0x80004005): SQLite Error 11: 'database disk image is malformed'.
2025-01-07 06:39:07 [verbose]: at Microsoft.Data.Sqlite.SqliteException.ThrowExceptionForRC(Int32 rc, sqlite3 db)
2025-01-07 06:39:07 [verbose]: at Microsoft.Data.Sqlite.SqliteCommand.PrepareAndEnumerateStatements()+MoveNext()
2025-01-07 06:39:07 [verbose]: at Microsoft.Data.Sqlite.SqliteCommand.GetStatements()+MoveNext()
2025-01-07 06:39:07 [verbose]: at Microsoft.Data.Sqlite.SqliteDataReader.NextResult()
2025-01-07 06:39:07 [verbose]: at Microsoft.Data.Sqlite.SqliteCommand.ExecuteReader(CommandBehavior behavior)
2025-01-07 06:39:07 [verbose]: at Microsoft.Data.Sqlite.SqliteCommand.ExecuteReader()
2025-01-07 06:39:07 [verbose]: at osu.Game.Beatmaps.LocalCachedBeatmapMetadataSource.getCacheVersion(SqliteConnection connection)

Normally this would lead to falling back to an API request, but it looks like you were also not logged in at the time:

2025-01-07 06:40:17 [verbose]: Request to https://osu.ppy.sh/api/v2/users/helinatri/?key=username failed with System.Net.WebException: Unauthorized.
2025-01-07 06:40:17 [verbose]: Response was: {"authentication":"basic"}

so the online fallback could not be used and ultimately the status of the beatmap could not be determined.

As a short term fix please delete online.db from your game files and try again.

On our side there are probably two things that can be done:

  • sqlite corruptions should probably lead to the offline metadata cache getting purged
  • metadata lookup API requests should maybe be opened to anonymous users

@peppy opinions?

I'm not at home at the moment, when I get home, I'll try to delete online.db on the Stable and Lazer side, I'll also try to delete all beatmaps + user data on the Lazer side. After clean all the data in Lazer (Debian), I will start the setup wirazd to import map from Stable again.

@bdach
Copy link
Collaborator

bdach commented Jan 13, 2025

I'll try to delete online.db on the stabilization and lazer side

There is no need to touch stable. Please do not.

@NammIsADev
Copy link
Author

I'll try to delete online.db on the stabilization and lazer side

There is no need to touch stable. Please do not.

Okay okay.

@NammIsADev
Copy link
Author

NammIsADev commented Jan 14, 2025

Normally this would lead to falling back to an API request, but it looks like you were also not logged in at the time:

2025-01-07 06:40:17 [verbose]: Request to https://osu.ppy.sh/api/v2/users/helinatri/?key=username failed with System.Net.WebException: Unauthorized.
2025-01-07 06:40:17 [verbose]: Response was: {"authentication":"basic"}

so the online fallback could not be used and ultimately the status of the beatmap could not be determined.

I understand your point. Normally, the API will continue sending data to update the beatmap status even if the user is not logged in, and the status would be shown as ranked. However, in this case, it appears that the API request failed due to an authorization error, as indicated by the "Unauthorized" response.

After deleting the online.db, I attempted to log in again, which initiated the star ratings calculation process. However, I noticed that not all beatmaps have been set to ranked status. Specifically, some beatmaps older than 2012 remain unranked.

osu_2025-01-13_18-06-30

For example, "Baby Crushing Love" (mapped by peppy) is still unranked, even though the osu! website indicates it as ranked. This issue seems to affect multiple older beatmaps. (older than 2010)

ảnh

Additionally, I encountered a new error: beatmaps downloaded from the setup wirazd are still set to unranked status.

Even reimporting from Stable did not resolve this issue.

I'm unsure what might be causing these weird issues?

Edit: here logs for debugging
compressed-logs.zip

@peppy
Copy link
Member

peppy commented Jan 14, 2025

sqlite corruptions should probably lead to the offline metadata cache getting purged
metadata lookup API requests should maybe be opened to anonymous users

both of these sound fair, yeah.

@peppy peppy added the priority:1 Very important. Feels bad without fix. Affects the majority of users. label Jan 14, 2025
@bdach
Copy link
Collaborator

bdach commented Jan 14, 2025

For example, "Baby Crushing Love" (mapped by peppy) is still unranked, even though the osu! website indicates it as ranked. This issue seems to affect multiple older beatmaps. (older than 2010)

Additionally, I encountered a new error: beatmaps downloaded from the setup wirazd are still set to unranked status.

Even reimporting from Stable did not resolve this issue.

Please remove the beatmaps, restart the game, and only then try to reimport the beatmaps in question again. It's not working for you because beatmaps are not actually deleted from the hard drive until you restart, and for optimisation purposes reimporting undeletes beatmaps if it can.

bdach added a commit to bdach/osu that referenced this issue Jan 14, 2025
Addresses one of the points in ppy#31496.

Not going to lie, this is mostly best-effort stuff (while the refetch is
happening, metadata lookups using the local source *will* fail), but I
see this as a marginal scenario anyways.
@bdach
Copy link
Collaborator

bdach commented Jan 14, 2025

@ppy/team-web how feasible would it be to make the GET /beatmaps/lookup endpoint accessible anonymously / without authentication? I can probably try doing it if you think it's possible, but I figure I'd ask for your opinions before I faceplant into it...

@nanaya
Copy link

nanaya commented Jan 14, 2025

it's just adding it to the token requirement exception list in RequireScopes middleware

alternatively the client can request client credential token and do away with all the exception altogether (the oauth client will need adjustment for this)

@NammIsADev
Copy link
Author

For example, "Baby Crushing Love" (mapped by peppy) is still unranked, even though the osu! website indicates it as ranked. This issue seems to affect multiple older beatmaps. (older than 2010)
Additionally, I encountered a new error: beatmaps downloaded from the setup wirazd are still set to unranked status.
Even reimporting from Stable did not resolve this issue.

Please remove the beatmaps, restart the game, and only then try to reimport the beatmaps in question again. It's not working for you because beatmaps are not actually deleted from the hard drive until you restart, and for optimisation purposes reimporting undeletes beatmaps if it can.

Fixed. But beatmaps downloaded from setup wirazd still marked as not ranked.

@bdach
Copy link
Collaborator

bdach commented Jan 14, 2025

But beatmaps downloaded from setup wirazd still marked as not ranked.

Did you delete those, close the game, and reimport again? If yes attach logs again please.

@NammIsADev
Copy link
Author

But beatmaps downloaded from setup wirazd still marked as not ranked.

Did you delete those, close the game, and reimport again? If yes attach logs again please.

Yes, even I run the setup wirazd to download beatmaps (testing). Now, I'm not home so... no logs! (sorry)

@NammIsADev
Copy link
Author

NammIsADev commented Jan 14, 2025

@bdach

compressed-logs.zip

Grab logs remotely by using VNC + FTP

@bdach
Copy link
Collaborator

bdach commented Jan 14, 2025

The latest logs show rather clearly that the beatmaps were not deleted from the game...

2025-01-14 11:56:14 [verbose]: [?????] Beginning import from tmpqnxIAP.osz...
2025-01-14 11:56:15 [verbose]: [1580c] Found existing beatmap for Kuba Oms - My Love (W h i t e) (ID de15a1c5-a2cf-4c8e-b152-316b6fb06415) – skipping import.
2025-01-14 11:56:15 [verbose]: [?????] Beginning import from tmpQgsuMx.osz...
2025-01-14 11:56:16 [verbose]: [672a6] Found existing beatmap for Soleily - Renatus (Deif) (ID 9ef4ddff-35fb-426c-bec7-ea3e37b0c842) – skipping import.
2025-01-14 11:56:17 [verbose]: [?????] Beginning import from tmp3UnY2F.osz...
2025-01-14 11:56:18 [verbose]: [31322] Found existing beatmap for LukHash - WHEN AN ANGEL DIES (Nelly) (ID 8538e8d2-d2d4-4c79-a67e-7629d00d6c79) – skipping import.
2025-01-14 11:56:18 [verbose]: [?????] Beginning import from tmpDV4sjt.osz...
2025-01-14 11:56:18 [verbose]: [c74a3] Found existing beatmap for Toni Leys - Dragon Valley (Toni Leys Remix feat. Esteban Bellucci) (LordRaika) (ID 91834c32-9aef-47f3-8153-1e45e74bf7ee) – skipping import.
2025-01-14 11:56:19 [verbose]: [?????] Beginning import from tmpoZfNDA.osz...
2025-01-14 11:56:20 [verbose]: [d2674] Found existing beatmap for cYsmix - triangles (yf_bmp) (ID c8932fde-6359-4c48-ae29-03d6e2997d90) – skipping import.
2025-01-14 11:56:20 [verbose]: [?????] Beginning import from tmp97cZsQ.osz...

These are the ones that don't have ranked status set, correct?

@NammIsADev
Copy link
Author

NammIsADev commented Jan 14, 2025

The latest logs show rather clearly that the beatmaps were not deleted from the game...

2025-01-14 11:56:14 [verbose]: [?????] Beginning import from tmpqnxIAP.osz...
2025-01-14 11:56:15 [verbose]: [1580c] Found existing beatmap for Kuba Oms - My Love (W h i t e) (ID de15a1c5-a2cf-4c8e-b152-316b6fb06415) – skipping import.
2025-01-14 11:56:15 [verbose]: [?????] Beginning import from tmpQgsuMx.osz...
2025-01-14 11:56:16 [verbose]: [672a6] Found existing beatmap for Soleily - Renatus (Deif) (ID 9ef4ddff-35fb-426c-bec7-ea3e37b0c842) – skipping import.
2025-01-14 11:56:17 [verbose]: [?????] Beginning import from tmp3UnY2F.osz...
2025-01-14 11:56:18 [verbose]: [31322] Found existing beatmap for LukHash - WHEN AN ANGEL DIES (Nelly) (ID 8538e8d2-d2d4-4c79-a67e-7629d00d6c79) – skipping import.
2025-01-14 11:56:18 [verbose]: [?????] Beginning import from tmpDV4sjt.osz...
2025-01-14 11:56:18 [verbose]: [c74a3] Found existing beatmap for Toni Leys - Dragon Valley (Toni Leys Remix feat. Esteban Bellucci) (LordRaika) (ID 91834c32-9aef-47f3-8153-1e45e74bf7ee) – skipping import.
2025-01-14 11:56:19 [verbose]: [?????] Beginning import from tmpoZfNDA.osz...
2025-01-14 11:56:20 [verbose]: [d2674] Found existing beatmap for cYsmix - triangles (yf_bmp) (ID c8932fde-6359-4c48-ae29-03d6e2997d90) – skipping import.
2025-01-14 11:56:20 [verbose]: [?????] Beginning import from tmp97cZsQ.osz...

These are the ones that don't have ranked status set, correct?

Yes. But more than this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:import dealing with importing of data from stable or file formats priority:1 Very important. Feels bad without fix. Affects the majority of users. type:online
Projects
None yet
Development

No branches or pull requests

4 participants