TanninOne / keypirinha-allmygames

Adds games from various game stores to the keypirinha catalog (currently: Steam, Epic, Windows Store, GOG, Origin, Uplay)
MIT License
12 stars 2 forks source link

Invalid Magic Number #16

Open zaksquatch opened 2 months ago

zaksquatch commented 2 months ago

Hello,

I had run into an issue where AMG would refuse to not only update the Steam library, but launch games from Steam altogether. I tried doing a complete uninstall/reinstall, but still no luck.

However, I found out what the issue was with some digging.

The console indicated it was having an issue with reading the .vdf files, stating it had an invalid magic number. I disabled the Steam beta access and the problem went away.

Turns out there have been several changes to the ~/.steam/steam/appcache/appinfo.vdf file in the Steam beta:

The file header is 8 bytes longer.

The binary VDF segment for each app entry in appinfo.vdf is different and the method this package uses doesn't seem to be able to parse it. Each segment is preceded by a SHA1 checksum; calculating the checksum for the VDF segment ourselves results in the same checksum. So it's not that we're trying to parse the wrong data, the data itself seems to now use a different format that the library can't parse (yet).

The contents of the binary segments also seem to have changed radically, with things like redundant appinfo.appid fields having been removed. This is a bit hard to determine since I can't parse the file to a more human readable format yet. But for comparison's sake, the appinfo.vdf from 2023 is 15.6 MiB in size, while the current appinfo.vdf in Steam beta is 12.9 MiB.

Anyway, I hope this helps!