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

Games that corrupt the manifest DAT file #81

Open
bassclarinetl2 opened this issue Dec 18, 2022 · 8 comments
Open

Games that corrupt the manifest DAT file #81

bassclarinetl2 opened this issue Dec 18, 2022 · 8 comments

Comments

@bassclarinetl2
Copy link

Version String: Python 3.11.0 (main, Oct 24 2022, 18:26:48) [MSC v.1933 64 bit (AMD64)] on win32

Hi Kalanyr,

I thought (in a similar vein to #60 and #61) I'd pass along a number of games that seem to corrupt the manifest when running py -m gogrepoc update (without a gog-manifest.dat) and the py -m download—related explicitly to null characters being present in the data file (which can be manually resolved by looking for the special regex character \0 and removing the entire game entry (e.g. from {'bg_url: to its corresponding right bracket }. The affected games are listed below the ######################### .

I have also noticed that many of the affected sections have excessively long changelog entries if that helps with diagnostics.

An excerpt of the series of outputs from running py -m gogrepoc download can be found here: https://pastebin.com/dwgKU9Jp

NOTE: In the pastebin ">>> preceded by an empty line is my redacted prompt

#########################

Cossacks Anthology: https://www.gog.com/en/game/cossacks_anthology
Cyberpunk 2077: https://www.gog.com/en/game/cyberpunk_2077
Gabriel Knight: Sins of the Fathers: https://www.gog.com/en/game/gabriel_knight_sins_of_the_fathers_20th_anniversary_edition
Geneforge 1: https://www.gog.com/en/game/geneforge_15
Planetscape - Torment: https://www.gog.com/en/game/planescape_torment_enhanced_edition
SpaceChem: https://www.gog.com/en/game/spacechem
Spelunky: https://www.gog.com/en/game/spelunky
Neverwinter Nights Diamond Edition: https://www.gog.com/en/game/neverwinter_nights_enhanced_edition_pack
Risen: https://www.gog.com/en/game/risen
Rise of the Triad: https://www.gog.com/en/game/rise_of_the_triad__dark_war and https://www.gog.com/en/game/rise_of_the_triad
Stellaris: https://www.gog.com/en/game/stellaris
Stronghold Crusader/HD: https://www.gog.com/en/game/stronghold_crusader
The Witcher: https://www.gog.com/en/game/the_witcher
The Witcher 2: Enhanced Edition (there seemed to be two entries for this game although only one was affected): https://www.gog.com/en/game/the_witcher_2
SteamWorld Dig: https://www.gog.com/en/game/steamworld_dig
Thea 2 The Shattering: https://www.gog.com/en/game/thea_2_the_shattering
Yooka Laylee: Impossible Lair: https://www.gog.com/en/game/yookalaylee_and_the_impossible_lair
Alan Wake: https://www.gog.com/en/game/alan_wake
Alan Wake: American Nightmare: https://www.gog.com/en/game/alan_wakes_american_nightmare

@Kalanyr
Copy link
Owner

Kalanyr commented Dec 18, 2022 via email

@Kalanyr
Copy link
Owner

Kalanyr commented Dec 18, 2022 via email

@bassclarinetl2
Copy link
Author

Sorry for the delay. Just reran it. and it works once (login, update, and download) and then when running update again to make sure it hasn't missed anything, it throws:

14:52:44 | loading local manifest...
14:52:44 | fatal...
Traceback (most recent call last):
  File "H:\gog\gogrepoc.py", line 2931, in <module>
    main(process_argv(sys.argv))
  File "H:\gog\gogrepoc.py", line 2670, in main
    cmd_update(args.os, args.lang, args.skipknown, args.updateonly, not args.full, args.ids, args.skipids,args.skiphidden,args.installers,args.resumemode,args.strictverify)
  File "H:\gog\gogrepoc.py", line 1274, in cmd_update
    gamesdb = load_manifest()
              ^^^^^^^^^^^^^^^
  File "H:\gog\gogrepoc.py", line 369, in load_manifest
    ad = r.read()
         ^^^^^^^^
  File "<frozen codecs>", line 701, in read
  File "<frozen codecs>", line 504, in read
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xfb in position 1004556: invalid start byte```

@bassclarinetl2
Copy link
Author

To answer your earlier question regarding the manifest file itself and where I'm seeing the nul characters:

image

I'm using Sublime Text as the editor.

@Kalanyr
Copy link
Owner

Kalanyr commented Dec 18, 2022 via email

@Kalanyr
Copy link
Owner

Kalanyr commented Dec 18, 2022 via email

@bassclarinetl2
Copy link
Author

Sorry for the delayed reply. Deleting the manifest (e.g. rm gog-manifest.dat) followed by an gogrepoc update does appear to fix things. That said, running an update against the existing manifest seems to introduce corruption. At this point its more a nuisance since the workaround seems to fix things.

@Kalanyr
Copy link
Owner

Kalanyr commented Dec 29, 2022 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants