OXP list fails to download

For test results, bug reports, announcements of new builds etc.

Moderators: another_commander, winston, Getafix

another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6554
Joined: Wed Feb 28, 2007 7:54 am

OXP list fails to download

Post by another_commander »

Not sure when this started happening, but downloading the OXP list now results in a download error, and the log has this:
Latest.log wrote:
12:56:21.830 [plist.parse.failed]: Failed to parse C:\DriveD/Oolite/SourceCode/oolite.app/GNUstep/Library/Caches/org.aegidian.oolite/Oolite-download.plist as a property list.
Parse failed at line 14008 (char 539673) - invalid utf8 data while parsing quoted string
12:56:21.833 [oxz.manager.error]: Downloaded manifest was not a valid plist, has been left in C:\DriveD/Oolite/SourceCode/oolite.app/GNUstep/Library/Caches/org.aegidian.oolite/Oolite-download.plist
The error points to this entry in the downloaded file:
"description" = "This OXP adds enhanced Viper Patrols, Viper Pursuits, and Viper Interceptors, to richer stable systems; GalCop Deputies to stable poor/average systems; and Bounty Hunters to unstable/dangerous systems. They are not über ships - far from it - but with the advent of heavy pirates and heavy assassins into the core game, some toughening of GalCop Vipers seemed appropriate.";

The same entry appears as follows in the previously existing (and working) Oolite-manifests.plist:
description = "This OXP adds enhanced Viper Patrols, Viper Pursuits, and Viper Interceptors, to richer stable systems; GalCop Deputies to stable poor/average systems; and Bounty Hunters to unstable/dangerous systems. They are not \U00FCber ships - far from it - but with the advent of heavy pirates and heavy assassins into the core game, some toughening of GalCop Vipers seemed appropriate.";

The error points to the last character in the string, but my bet is that it is the word über that kills it, since this is the only difference I can see between the two. Something to do with the way the file is UTF-8 encoded server-side maybe? - ü has code 00FC in Unicode.
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6554
Joined: Wed Feb 28, 2007 7:54 am

Re: OXP list fails to download

Post by another_commander »

Further to the previous post and, to be more clear, this is exactly what the offending text looks like in Notepad++:

Image

If I replace that binary character with a ü copy/pasted from the Windows character map, the plist becomes valid again.
User avatar
phkb
Impressively Grand Sub-Admiral
Impressively Grand Sub-Admiral
Posts: 4653
Joined: Tue Jan 21, 2014 10:37 pm
Location: Writing more OXPs, because the world needs more OXPs.

Re: OXP list fails to download

Post by phkb »

According to the DB, it's got the correct character in it:
Image
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6554
Joined: Wed Feb 28, 2007 7:54 am

Re: OXP list fails to download

Post by another_commander »

Github also displays the character in that file correctly, but there is obviously something very wrong with the encoding. It fails to load for you as well, I believe?
User avatar
phkb
Impressively Grand Sub-Admiral
Impressively Grand Sub-Admiral
Posts: 4653
Joined: Tue Jan 21, 2014 10:37 pm
Location: Writing more OXPs, because the world needs more OXPs.

Re: OXP list fails to download

Post by phkb »

another_commander wrote: Mon Sep 11, 2023 12:22 pm
It fails to load for you as well, I believe?
Correct, although it was working a couple of days ago, and I know no one has been updating OXP's except for me (because I have direct access to the DB). So the description hasn't changed. Let me quickly update the description on that record and see if we can get things flowing.
User avatar
phkb
Impressively Grand Sub-Admiral
Impressively Grand Sub-Admiral
Posts: 4653
Joined: Tue Jan 21, 2014 10:37 pm
Location: Writing more OXPs, because the world needs more OXPs.

Re: OXP list fails to download

Post by phkb »

OK, the record has been updated to just a standard "u". Might have to wait for the cache to update, though.
User avatar
phkb
Impressively Grand Sub-Admiral
Impressively Grand Sub-Admiral
Posts: 4653
Joined: Tue Jan 21, 2014 10:37 pm
Location: Writing more OXPs, because the world needs more OXPs.

Re: OXP list fails to download

Post by phkb »

Is there a way to force the cache to refresh?
User avatar
hiran
Theorethicist
Posts: 2060
Joined: Fri Mar 26, 2021 1:39 pm
Location: a parallel world I created for myself. Some call it a singularity...

Re: OXP list fails to download

Post by hiran »

I cannot test right now. But from what I read it seems to me that Oolite does not read the file with UTF8 encoding.

So we can look at the source, we can also check if a BOM might have helped.
Sunshine - Moonlight - Good Times - Oolite
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6554
Joined: Wed Feb 28, 2007 7:54 am

Re: OXP list fails to download

Post by another_commander »

hiran wrote: Mon Sep 11, 2023 1:30 pm
But from what I read it seems to me that Oolite does not read the file with UTF8 encoding.

So we can look at the source, we can also check if a BOM might have helped.
No, Oolite reads everything exactly the same as it always has - there have not been any changes to the code that downloads and parses the data. Something changed on the file itself. Anyway, standing by for the cache refresh whenever that might be.
User avatar
hiran
Theorethicist
Posts: 2060
Joined: Fri Mar 26, 2021 1:39 pm
Location: a parallel world I created for myself. Some call it a singularity...

Re: OXP list fails to download

Post by hiran »

another_commander wrote: Mon Sep 11, 2023 1:34 pm
hiran wrote: Mon Sep 11, 2023 1:30 pm
But from what I read it seems to me that Oolite does not read the file with UTF8 encoding.

So we can look at the source, we can also check if a BOM might have helped.
No, Oolite reads everything exactly the same as it always has - there have not been any changes to the code that downloads and parses the data. Something changed on the file itself. Anyway, standing by for the cache refresh whenever that might be.
I did not say that Oolite has changed.

It just appears that Oolite reads the file in some encoding that does not support unicode characters. That is why these characters must not be part of the file, but escaping them helps.

This information is crucial to tools that would generate such catalogs.
Sunshine - Moonlight - Good Times - Oolite
User avatar
hiran
Theorethicist
Posts: 2060
Joined: Fri Mar 26, 2021 1:39 pm
Location: a parallel world I created for myself. Some call it a singularity...

Re: OXP list fails to download

Post by hiran »

phkb wrote: Mon Sep 11, 2023 12:56 pm
Is there a way to force the cache to refresh?
How about deleting
GNUstep/Library/Caches/org.aegidian.oolite/Oolite-download.plist
?
Sunshine - Moonlight - Good Times - Oolite
User avatar
hiran
Theorethicist
Posts: 2060
Joined: Fri Mar 26, 2021 1:39 pm
Location: a parallel world I created for myself. Some call it a singularity...

Re: OXP list fails to download

Post by hiran »

I have no clue what is really happening behind the scenes, but when I test right now I neither get a wrong or correct file.
Instead I get a 404 error code. If the response content, which is a nice error messages wrapped in HTML get parsed as a plist file, that obviously has to fail.
Sunshine - Moonlight - Good Times - Oolite
User avatar
phkb
Impressively Grand Sub-Admiral
Impressively Grand Sub-Admiral
Posts: 4653
Joined: Tue Jan 21, 2014 10:37 pm
Location: Writing more OXPs, because the world needs more OXPs.

Re: OXP list fails to download

Post by phkb »

I just did a test on my Linux machine and the list downloads successfully now.
User avatar
phkb
Impressively Grand Sub-Admiral
Impressively Grand Sub-Admiral
Posts: 4653
Joined: Tue Jan 21, 2014 10:37 pm
Location: Writing more OXPs, because the world needs more OXPs.

Re: OXP list fails to download

Post by phkb »

Of course, that doesn't explain what's changed. The record that I updated had not changed in over two years. The code that downloads the list in Oolite itself hasn't changed. So, the only component left is the bit in the middle: somewhere between the call to the API to retrieve the list, and the extract from the DB to update the list, something has changed. Maybe in how the file is stored, or how the file is extracted/created, or how it's transmitted back to Oolite. Either way, that's logically where the change must have happened.
User avatar
timer
---- E L I T E ----
---- E L I T E ----
Posts: 330
Joined: Sat Mar 17, 2012 8:26 pm
Location: Laenin spiv club
Contact:

Re: OXP list fails to download

Post by timer »

if in hosts file exists

Code: Select all

195.74.38.129 oolite.org addons.oolite.org
check direct download from origin server http://addons.oolite.org/api/1.0/overview
I got corrupted (bad utf-8 symbol) file.

At this moment, after downloading, my script (on VPS) fix this and then upload file to GitHub.
But what happened - I don't know :(
My actions have no any effect on the old server.
Cobra MK III owner since 1994
Post Reply