Failure to get covers from Steam #336

Open
opened 2025-02-02 20:46:17 +01:00 by michaelneverwins · 11 comments
michaelneverwins commented 2025-02-02 20:46:17 +01:00 (Migrated from github.com)

Describe the bug
I've noticed recently that Cartridges is not importing covers for Steam games. This was working at some point, because I have a lot of Steam games imported into Cartridges and I know I did not set covers manually for all of them, nor did I supply a SteamGridDB API key. However, the past few times I've installed a new Steam game and imported into Cartridges, the cover has been blank.

To Reproduce
Steps to reproduce the behavior:

  1. Enable Steam imports. (Prior to testing for the screenshot below, I disabled imports from all other sources, but I saw the same behavior with other sources enabled.)
  2. Disable "Use SteamGridDB" and related options.
  3. Install a new Steam game.
  4. Import games into Cartridges.

Expected behavior
Official cover art from Steam should be used.

Screenshots
This screenshot was taken after installing Pumpkin Jack (app ID 1186640), launching Cartridges, and using the Import function.
Image

Logs
Logging from the first mention of app ID 1186640 until import is done, with some "Duplicate store game ..." logging abbreviated:

08:06 - DEBUG: New store game Pumpkin Jack (steam_1186640)
08:06 - INFO: Imported Pumpkin Jack (steam_1186640)
08:06 - DEBUG: Duplicate store game ... [x4]
08:06 - DEBUG: Starting new HTTPS connection (1): store.steampowered.com:443
08:06 - DEBUG: Duplicate store game ... [x3]
08:06 - DEBUG: Import done for source steam
08:07 - DEBUG: https://store.steampowered.com:443 "GET /api/appdetails?appids=1186640 HTTP/11" 200 4543
08:07 - DEBUG: SteamAPIManager done for steam_1186640
08:07 - DEBUG: CoverManager done for steam_1186640
08:07 - DEBUG: FileManager done for steam_1186640
08:07 - DEBUG: SgdbManager done for steam_1186640
08:07 - DEBUG: DisplayManager done for steam_1186640
08:07 - INFO: Import done

The whole log would be quite long, because I have a lot of games installed. However, the log appears to contain no errors or warnings at all.

System (please complete the following information):

  • OS: Linux Mint 22.1
  • Installation method: Flatpak user install
  • Cartridges version: 2.10.1

Additional context
I generally have the "High Quality Images" option enabled, but this doesn't seem to have anything to do with it. I tried removing a game, disabling that option, restarting Cartridges, and importing again; the result was the same.

Note that the game used for above testing does have a suitable cover image, linked from the "Assets" section here:
https://steamdb.info/app/1186640/info/

This is how I've retrieved cover art manually for the last few Steam games that I imported.

**Describe the bug** I've noticed recently that Cartridges is not importing covers for Steam games. This was working at some point, because I have a _lot_ of Steam games imported into Cartridges and I know I did not set covers manually for all of them, nor did I supply a SteamGridDB API key. However, the past few times I've installed a new Steam game and imported into Cartridges, the cover has been blank. **To Reproduce** Steps to reproduce the behavior: 1. Enable Steam imports. (Prior to testing for the screenshot below, I disabled imports from all other sources, but I saw the same behavior with other sources enabled.) 2. Disable "Use SteamGridDB" and related options. 4. Install a new Steam game. 5. Import games into Cartridges. **Expected behavior** Official cover art from Steam should be used. **Screenshots** This screenshot was taken after installing _Pumpkin Jack_ (app ID 1186640), launching Cartridges, and using the Import function. ![Image](https://github.com/user-attachments/assets/e14e1412-7cef-4566-bebe-d3ad210c3f09) **Logs** Logging from the first mention of app ID 1186640 until import is done, with some "Duplicate store game ..." logging abbreviated: ``` 08:06 - DEBUG: New store game Pumpkin Jack (steam_1186640) 08:06 - INFO: Imported Pumpkin Jack (steam_1186640) 08:06 - DEBUG: Duplicate store game ... [x4] 08:06 - DEBUG: Starting new HTTPS connection (1): store.steampowered.com:443 08:06 - DEBUG: Duplicate store game ... [x3] 08:06 - DEBUG: Import done for source steam 08:07 - DEBUG: https://store.steampowered.com:443 "GET /api/appdetails?appids=1186640 HTTP/11" 200 4543 08:07 - DEBUG: SteamAPIManager done for steam_1186640 08:07 - DEBUG: CoverManager done for steam_1186640 08:07 - DEBUG: FileManager done for steam_1186640 08:07 - DEBUG: SgdbManager done for steam_1186640 08:07 - DEBUG: DisplayManager done for steam_1186640 08:07 - INFO: Import done ``` The whole log would be quite long, because I have a lot of games installed. However, the log appears to contain no errors or warnings at all. **System (please complete the following information):** - OS: Linux Mint 22.1 - Installation method: Flatpak user install - Cartridges version: 2.10.1 **Additional context** I generally have the "High Quality Images" option enabled, but this doesn't seem to have anything to do with it. I tried removing a game, disabling that option, restarting Cartridges, and importing again; the result was the same. Note that the game used for above testing does have a suitable cover image, linked from the "Assets" section here: https://steamdb.info/app/1186640/info/ This is how I've retrieved cover art manually for the last few Steam games that I imported.
kra-mo commented 2025-02-03 11:44:14 +01:00 (Migrated from github.com)

Just to confirm, you're not the person who reported this on Discord, correct?

Steam didn't change the way they store covers, confirmed by that person too so I'm really not sure what's going on here.

Just to confirm, you're not the person who reported this on Discord, correct? Steam didn't change the way they store covers, confirmed by that person too so I'm really not sure what's going on here.
michaelneverwins commented 2025-02-03 13:37:49 +01:00 (Migrated from github.com)

I didn't report this on Discord, so it must have happened to someone else too. Good to know it's not just me...

Based on the debug logging, it looks like Cartridges should fetch Steam covers over HTTPS using the Steam API (rather than finding them on disk at ~/.steam/root/appcache/librarycache or whatever the path is). Is that correct? Before seeing the logs, I was wondering if I'd somehow messed up the Flatpak filesystem permissions or something.

I didn't report this on Discord, so it must have happened to someone else too. Good to know it's not just me... Based on the debug logging, it looks like Cartridges should fetch Steam covers over HTTPS using the Steam API (rather than finding them on disk at `~/.steam/root/appcache/librarycache` or whatever the path is). Is that correct? Before seeing the logs, I was wondering if I'd somehow messed up the Flatpak filesystem permissions or something.
kra-mo commented 2025-02-03 17:46:09 +01:00 (Migrated from github.com)

Cartridges gets covers locally. It only fetches other metadata not available locally using the network, but not covers.

Cartridges gets covers locally. It only fetches other metadata not available locally using the network, but not covers.
michaelneverwins commented 2025-02-06 04:34:30 +01:00 (Migrated from github.com)

Ah, I see. Well, the game used for testing in the original post does have a cover image at ~/.steam/root/appcache/librarycache/1186640/library_600x900.jpg (which is 300x450 despite the filename), and running

flatpak run --command=file page.kramo.Cartridges ~/.steam/root/appcache/librarycache/1186640/library_600x900.jpg

seems to confirm that the image is visible to the Cartridges Flatpak. So for what it's worth, I don't think filesystem access is the problem.

Ah, I see. Well, the game used for testing in the original post does have a cover image at `~/.steam/root/appcache/librarycache/1186640/library_600x900.jpg` (which is 300x450 despite the filename), and running ```bash flatpak run --command=file page.kramo.Cartridges ~/.steam/root/appcache/librarycache/1186640/library_600x900.jpg ``` seems to confirm that the image is visible to the Cartridges Flatpak. So for what it's worth, I don't think filesystem access is the problem.
Arnvidr commented 2025-02-09 13:38:23 +01:00 (Migrated from github.com)

Seeing the same behaviour on a non-flatpak install (distro gentoo).

Seeing the same behaviour on a non-flatpak install (distro gentoo).
michaelneverwins commented 2025-02-18 00:13:53 +01:00 (Migrated from github.com)

✔ I updated Cartridges to 2.11.1, and it was able to get cover art for all the Steam games I installed since my last import.

Thanks @kra-mo!

✔ I updated Cartridges to 2.11.1, and it was able to get cover art for all the Steam games I installed since my last import. Thanks @kra-mo!
forest-hermit commented 2025-05-20 17:49:01 +02:00 (Migrated from github.com)

Since the update originally intended to solve this bug (I wasn't affected) I miss some of the covers of some steam games like Eve Online, Helldivers .... All my Steam games are installed in the same place. Please reopen the issue. Please find attached a screenshot.

Image

Since the update originally intended to solve this bug (I wasn't affected) I miss some of the covers of some steam games like Eve Online, Helldivers .... All my Steam games are installed in the same place. Please reopen the issue. Please find attached a screenshot. ![Image](https://github.com/user-attachments/assets/94758262-eb27-4b24-b08e-5f21f21417e2)

Have also been dealing with this issue for a while (few months). It seems to only affect newer games though at least anecdotally for me?

Have also been dealing with this issue for a while (few months). It seems to only affect newer games though at least anecdotally for me?

In case of Helldivers I was able to fix this for me with removing the tm (™) from the game name manually in Cartridges, I expect this to be an encoding issue where it cant find a match.

In case of Helldivers I was able to fix this for me with removing the `tm` (™) from the game name manually in Cartridges, I expect this to be an encoding issue where it cant find a match.

I can confirm that there is still a problem (or, rather, a new problem) with getting covers from Steam. However, it affects only certain games. I think I might be seeing the same thing that @Shrub saw (although I didn't personally have any issues a month ago). Basically, I think the problem is simply that Steam is inconsistent about where covers are stored.

I recently installed a few games including DOOM + DOOM II (app ID 2280), Heretic + Hexen (app ID 3286930), and FALLSTRUKTUR (app ID 3674270). When I did a Cartridges import today, it found the cover for DOOM + DOOM II but not for Heretic + Hexen nor for FALLSTRUKTUR. It's likely that Steam's image cache structure changed recently, considering both of the affected games are recent releases, but it doesn't seem to be applied retroactively to older games.

I checked ~/.steam/steam/appcache/librarycache/, and found the DOOM + DOOM II cover at 2280/library_600x900.jpg which is where Cartridges looks for it as of commit 597c668d69 which fixed the original issue. However, the cover for FALLSTRUKTUR is at 3674270/dbb4e53d0b7bafbdcb0d8c68bdbc800946c6cdf2/library_600x900.jpg, and the cover for Heretic + Hexen is at 3286930/dbdad6a66e6a076d138b9ce8bd81dbdf159bccb2/library_capsule.jpg. So not only are these images found one level deeper in folders with random hexadecimal junk names, but the filenames are also inconsistent.

Note that FALLSTRUKTUR happens to be free, which makes the current issue easy to reproduce. However, you can also see the file paths (relative to ~/.steam/steam/appcache/librarycache/<appid>/) in the "metadata" tab of each game's SteamDB page:

(Scroll down to the "Assets" section on each page. Specifically, see the library_capsule filenames in the library_assets_full row of the table in that section.)

Considering these inconsistencies, namely that we cannot even rely on the filename library_600x900.jpg anymore, I think the search for Steam covers might need to be implemented as a recursive search under a given librarycache/<appid>/ for any 300x450 or 600x900 images (unless @kramo wants to bet on the filename always being either library_600x900.jpg or library_capsule.jpg... which, actually, is probably worth a try, and I would seriously hope it's good enough, considering that checking dimensions of a bunch of images is probably way more work than Cartridges should be doing for the cover import).

I can confirm that there is still a problem (or, rather, a new problem) with getting covers from Steam. However, it affects only certain games. I think I might be seeing the same thing that @Shrub saw (although I didn't personally have any issues a month ago). Basically, I think the problem is simply that Steam is inconsistent about where covers are stored. I recently installed a few games including _DOOM + DOOM II_ (app ID 2280), _Heretic + Hexen_ (app ID 3286930), and _FALLSTRUKTUR_ (app ID 3674270). When I did a Cartridges import today, it found the cover for _DOOM + DOOM II_ but not for _Heretic + Hexen_ nor for _FALLSTRUKTUR_. It's likely that Steam's image cache structure changed recently, considering both of the affected games are recent releases, but it doesn't seem to be applied retroactively to older games. I checked `~/.steam/steam/appcache/librarycache/`, and found the _DOOM + DOOM II_ cover at `2280/library_600x900.jpg` which is where Cartridges looks for it as of commit 597c668d69bd40a83dfe57fb549393c01eba3791 which fixed the original issue. However, the cover for _FALLSTRUKTUR_ is at `3674270/dbb4e53d0b7bafbdcb0d8c68bdbc800946c6cdf2/library_600x900.jpg`, and the cover for _Heretic + Hexen_ is at `3286930/dbdad6a66e6a076d138b9ce8bd81dbdf159bccb2/library_capsule.jpg`. So not only are these images found one level deeper in folders with random hexadecimal junk names, but the filenames are also inconsistent. Note that _FALLSTRUKTUR_ happens to be free, which makes the current issue easy to reproduce. However, you can also see the file paths (relative to `~/.steam/steam/appcache/librarycache/<appid>/`) in the "metadata" tab of each game's SteamDB page: * https://steamdb.info/app/2280/info/ * https://steamdb.info/app/3286930/info/ * https://steamdb.info/app/3674270/info/ (Scroll down to the "Assets" section on each page. Specifically, see the `library_capsule` filenames in the `library_assets_full` row of the table in that section.) Considering these inconsistencies, namely that we cannot even rely on the filename `library_600x900.jpg` anymore, I think the search for Steam covers might need to be implemented as a recursive search under a given `librarycache/<appid>/` for any 300x450 or 600x900 images (unless @kramo wants to bet on the filename always being either `library_600x900.jpg` or `library_capsule.jpg`... which, actually, is probably worth a try, and I would seriously hope it's good enough, considering that checking dimensions of a bunch of images is probably way more work than Cartridges should be doing for the cover import).

I just ran the following in my own ~/.steam/steam/appcache/librarycache/ directory:

for f in $(find . -type f -name *.jpg); do file $f | grep -q 300x450 && echo $f; done

Based on the output, I can confirm that all of my own cached 300x450 game covers have one of the following types of paths:

  • <appid>/library_600x900.jpg
  • <appid>/*/library_600x900.jpg
  • <appid>/*/library_capsule.jpg

Note that the * above is the unpredictable hexadecimal junk, so I assume Cartridges would at least have to do some kind of glob here. Incidentally, Heretic + Hexen is the only game I found with a library_capsule.jpg, but of course this is just from my own library. In fact, it's only what Steam has cached for my own library. I don't think the library cache necessarily contains all of the images for every game.

I just ran the following in my own `~/.steam/steam/appcache/librarycache/` directory: ```bash for f in $(find . -type f -name *.jpg); do file $f | grep -q 300x450 && echo $f; done ``` Based on the output, I can confirm that all of my own cached 300x450 game covers have one of the following types of paths: * `<appid>/library_600x900.jpg` * `<appid>/*/library_600x900.jpg` * `<appid>/*/library_capsule.jpg` Note that the `*` above is the unpredictable hexadecimal junk, so I assume Cartridges would at least have to do some kind of glob here. Incidentally, _Heretic + Hexen_ is the only game I found with a `library_capsule.jpg`, but of course this is just from my own library. In fact, it's only what Steam has cached for my own library. I don't think the library cache necessarily contains all of the images for every game.
Sign in to join this conversation.
No milestone
No project
No assignees
4 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
kramo/cartridges#336
No description provided.