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

xml parsing error occurred trying to get md5 data for .... #63

Closed
sairuk opened this issue Feb 24, 2022 · 12 comments
Closed

xml parsing error occurred trying to get md5 data for .... #63

sairuk opened this issue Feb 24, 2022 · 12 comments

Comments

@sairuk
Copy link

sairuk commented Feb 24, 2022

Looks like gog may have changed something recently. We have received and confirmed reports (as per retronas/retronas#117) of our users getting xml parsing errors during manifest refresh from this tool.

Refreshing GOG manifest...

06:07:32 | loading local manifest...
06:07:32 | fetching game product data (page 1)...
06:07:33 | fetching game product data (page 2 / 3)...
06:07:33 | fetching game product data (page 3 / 3)...
06:07:34 | (  1 / 255) fetching game details for a_space_for_the_unbound_prologue...
06:07:41 | xml parsing error occurred trying to get md5 data for setup_a_space_for_the_unbound_-_prologue_v8.54g_(45722).exe
06:07:41 | (  2 / 255) fetching game details for absolute_drift...
06:07:48 | xml parsing error occurred trying to get md5 data for setup_absolute_drift_1.0g_(64bit)_(49142).exe
06:07:48 | (  3 / 255) fetching game details for against_the_moon_prologue...
06:07:54 | xml parsing error occurred trying to get md5 data for setup_against_the_moon_prologue_129_(42110).exe
06:07:54 | (  4 / 255) fetching game details for akalabeth_world_of_doom...
06:08:00 | xml parsing error occurred trying to get md5 data for setup_akalabeth_2.0.0.1.exe
06:08:09 | (  5 / 255) fetching game details for alders_blood_prologue...
@TheLateNightFlight
Copy link

I got rid of the error by changing line 360 tmp_md5_url = page.geturl().replace('?', '.xml?') to tmp_md5_url = page.geturl() + ".xml";

@sairuk
Copy link
Author

sairuk commented Feb 26, 2022

This appeared to correct itself without intervention late yesterday, if someone else can confirm for me (without patching), i will happily close this ticket off


Refreshing GOG manifest...

12:02:31 | loading local manifest...
12:02:31 | fetching game product data (page 1)...
12:02:32 | fetching game product data (page 2 / 3)...
12:02:33 | fetching game product data (page 3 / 3)...
12:02:33 | (  1 / 255) fetching game details for a_space_for_the_unbound_prologue...
12:02:36 | (  2 / 255) fetching game details for absolute_drift...
12:02:39 | (  3 / 255) fetching game details for against_the_moon_prologue...
12:02:42 | (  4 / 255) fetching game details for akalabeth_world_of_doom...

@jturner314
Copy link

jturner314 commented Feb 26, 2022

Fwiw, I just experienced this issue a few minutes ago (using the gogrepo.py script directly, not through the retronas tool), and the fix in @TheLateNightFlight's comment above worked for me.

Update: With the fix applied, I'm seeing the error message for a small fraction of the downloadable files. Maybe GOG is in the middle of a transition which affects only some downloads/servers?

@darkain
Copy link

darkain commented Feb 28, 2022

Same issue here on Feb 27th. Applied the line edit above, and all seems good again. Thanks :)

@DerPit
Copy link

DerPit commented Feb 28, 2022

Just checked. Also here, I do need the patch to get rid of the errors.
Just re-read the whole database (223 games), two of them gave the md5 error despite the patched code:
Foxtail and Hedon.

@CalAlaera
Copy link

Happening for me too. All of my purchased games, without exception, were giving me the error. The patch mentioned in #63 (comment) did correct the error for me. Thanks for your work, all. :)

@sairuk
Copy link
Author

sairuk commented Mar 6, 2022

A few games were still failing to find the md5 for me with the patch, turns out gog gzip larger game info xmls and it wasn't handled, i've added support and a variation on the patch in my fork now and switched our project across to use that.

We also noted thanks to a report on our issues for RetroNAS, sync is completely broken for downloading game files with these xml errors, it'll only sync extras. Originally i'd just figured it was informational

since i like output, i've added an info message containing found md5s as well

21:35:06 | ( 44 / 255) fetching game details for divinity_original_sin_enhanced_edition...
21:35:12 | successfully found md5 98018e49655bf3ca5a4fe8be2096c438
21:35:15 | successfully found md5 719cf94bd99e6447f84f82da701505a3
21:35:18 | successfully found md5 49cfd70796e50b4cde2846c059f91f64
21:35:21 | successfully found md5 e4cc8846e9513c1bcafec5a4d04a8d68
21:35:24 | successfully found md5 47fd76a7963230d1a1db11f116028ffe
21:35:27 | successfully found md5 949d7e5f5503a9e7bc3031c44f002f4b
21:35:30 | successfully found md5 56aa8d107947c49a52fb117c5eeb7fe3
21:35:33 | successfully found md5 c87fbe4ba1b6772db9d03f3d9652a9b1
21:35:36 | successfully found md5 6eb106a43f37da6ebe63d1042300fc8a
21:35:45 | ( 45 / 255) fetching game details for doomdarks_revenge...

Control still has/had an issue getting one of its md5s but i dumped out my temp_md5_url and tried to browse and curl it, both were broken, i also gave it a few mins incase generation was slow on gogs end then I was going to add a retry mech, no luck

21:20:27 | xml parsing error occurred trying to get md5 data for setup_control_ultimate_edition_update_2_(41492)-2.bin

There may be more in that same boat, i'm going through a full update now

@ToxiClay
Copy link

ToxiClay commented Mar 9, 2022

I can confirm that @TheLateNightFlight's fix isn't total. The following games still report md5 errors using his patch:

Cyberpunk 2077
Deus Ex: Mankind Divided
Hedon
Metro: Last Light Redux
No Man's Sky
Star Renegades
Stellaris

Hedon and Star Renegades confuses me, as those are not huge games.

Now, I'll try cherry-picking your commit over to my fork and see what happens.

After swapping Python 2.7.18 for 3.10.2 because I'm a dumb idiot who both was still running 2.x and can't figure out coexistence, I, too, still have two lingering MD5 errors. I'm not knowledgeable enough to debug the variable like you did, so I'll just presume my error is the same as yours.

Line 82: 14:47:22 | xml parsing error occurred trying to get md5 data for patch_cyberpunk_2077_Hotfix_1.5_(53778)_to_Build_3864499Change_4719897_(53890).exe
Line 465: 15:14:46 | xml parsing error occurred trying to get md5 data for setup_star_renegades_1.5.1.5_(53756)-1.bin

@sairuk
Copy link
Author

sairuk commented Mar 9, 2022

I have an issue with one file for Control but the md5 page wasn't available when i checked it manually

You could add a line after this to print out the tmp_md5_url to the console and then try the links in your browser see if they are valid (they include your token iirc, so don't drop em anywhere) xml, then if so, check headers in developer tools to try and identify if they are perhaps using deflate and not gzip etc

I do not own either of those games to test with unfortunately

@ToxiClay
Copy link

ToxiClay commented Mar 9, 2022

Pulling up one of the successful URLs in the browser gives me this:

<file name="setup_star_renegades_1.5.1.5_(53756).exe" available="1" notavailablemsg="" md5="19e753b6e0959ed69842446fce929328" chunks="1" timestamp="2022-02-17 21:15:30" total_size="943168">
<chunk id="0" from="0" to="943167" method="md5">19e753b6e0959ed69842446fce929328</chunk>
</file>

and here's the curl output:

C:\Users\Omega>curl https://gog-cdn-lumen.secure2.footprint.net/token=[[REDACTED]]/setup_star_renegades_1.5.1.5_%2853756%29.exe.xml -o test_success.xml
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   217  100   217    0     0   2040      0 --:--:-- --:--:-- --:--:--  2066

C:\Users\Omega>

Interestingly, trying to open the output file in Notepad++ gives me gibberish.

The curl for the failing MD5 just sits and spins. It's been spinning for three and a half minutes, and I bet if I let it sit and spin while I go to work, it'll just spin for h o u r s.

Edit: No it will not, apparently.

C:\Users\Omega>curl https://gog-cdn-lumen.secure2.footprint.net/token=[[REDACTED]]/setup_star_renegades_1.5.1.5_%2853756%29-1.bin.xml -o test.xml
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0 19703    0     0    0     0      0      0 --:--:--  0:05:23 --:--:--     0
curl: (18) transfer closed with 19703 bytes remaining to read

The file does exist in the manifest, and the downloader succeeds in grabbing it, though. Curious.

@Sargon-Aelther
Copy link

I seem to be getting this for nearly every game. Do I need to edit the code as some comments here suggested or is GOG suffering heavy traffic or something?

@eddie3
Copy link
Owner

eddie3 commented Jul 19, 2022

Thanks all. GOG changed the URLs for where MD5 XML data is stored. I've pushed a fix for this.

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

9 participants