414 Request-URI Too Large

Learn how to use AAO by reading tutorials, and seek help from the AAO community.

Moderator: EN - Forum Moderators

Post Reply
User avatar
Chicken0895
Posts: 5
Joined: Tue Aug 29, 2017 6:01 am
Gender: Male
Spoken languages: English

414 Request-URI Too Large

Post by Chicken0895 »

On a A Game of Turnabouts Pt.2 I seem to not be able to load saves toward the end of the case. Anytime I load a recent save it gives me a http error like below:

414 Request-URI Too Large
nginx/1.18.0
Common sense is one of natures greatest ironies. It turns out that common sense isn't so common.
User avatar
Enthalpy
Community Manager
Posts: 5169
Joined: Wed Jan 04, 2012 4:40 am
Gender: Male
Spoken languages: English, limited Spanish

Re: 414 Request-URI Too Large

Post by Enthalpy »

I might expect issues on a longer trial, but A Game of Turnabouts's second part is well within the range of trial lengths we should support without problems.

Please paste a save link here so I can investigate.
[D]isordered speech is not so much injury to the lips that give it forth, as to the disproportion and incoherence of things in themselves, so negligently expressed. ~ Ben Jonson
User avatar
Chicken0895
Posts: 5
Joined: Tue Aug 29, 2017 6:01 am
Gender: Male
Spoken languages: English

Re: 414 Request-URI Too Large

Post by Chicken0895 »

Thank you for investigating. There have been a few. Here is one such link:

https://aaonline.fr/player.php?trial_id ... gzNjMwOH19

Edit: I just started Part 3 and made a save right away to test it. I get the same error.

Url: https://aaonline.fr/player.php?trial_id ... MzY5fX0%3D
Common sense is one of natures greatest ironies. It turns out that common sense isn't so common.
User avatar
Enthalpy
Community Manager
Posts: 5169
Joined: Wed Jan 04, 2012 4:40 am
Gender: Male
Spoken languages: English, limited Spanish

Re: 414 Request-URI Too Large

Post by Enthalpy »

This is troubling. I'll need to call Unas in for this one, but can you give me some others?
[D]isordered speech is not so much injury to the lips that give it forth, as to the disproportion and incoherence of things in themselves, so negligently expressed. ~ Ben Jonson
User avatar
Chicken0895
Posts: 5
Joined: Tue Aug 29, 2017 6:01 am
Gender: Male
Spoken languages: English

Re: 414 Request-URI Too Large

Post by Chicken0895 »

How many do you need? It appears that any I make on Pt 3 have this error and any I make after a certain point on Part 2 have this error. I can't be certain exactly what part that is, but it is sometime between these two saves:

Works: https://aaonline.fr/player.php?trial_id ... gzNjMwOH19
Error: https://aaonline.fr/player.php?trial_id ... h9fQ%3D%3D

Something odd to note, is that you might get an error for the working one too. When I load it from the game window (that is, when I'm already playing the game) it works. However if I copy it and past it into another tab or window, I get the error again. After that save point, the saves stop working at all.

Part 3 seems to be working this way too. Works fine from the game window but copy/past breaks it. So far I haven't had a save that breaks from in-game too, like the later ones of Part 2 do.
Common sense is one of natures greatest ironies. It turns out that common sense isn't so common.
User avatar
Enthalpy
Community Manager
Posts: 5169
Joined: Wed Jan 04, 2012 4:40 am
Gender: Male
Spoken languages: English, limited Spanish

Re: 414 Request-URI Too Large

Post by Enthalpy »

sigh Okay, yes, there are multiple things wrong, so this is going to be a headache for me to deal with.

On the off chance Unas sees this, hi! Here's what I know so far. The direct cause of the error is that the save data is so large that it's exceeding what the server supports. This is fixable.

The next questions are why this trial data is so large anyways. It shouldn't be. The biggest problem is that save_data is passed as a parameter twice. It shouldn't be. Also troubling is why there's trial diff data. That's in the save data, even though the user started a new part. The only thing I can think of is that it got carried over from a previous part.
[D]isordered speech is not so much injury to the lips that give it forth, as to the disproportion and incoherence of things in themselves, so negligently expressed. ~ Ben Jonson
User avatar
Chicken0895
Posts: 5
Joined: Tue Aug 29, 2017 6:01 am
Gender: Male
Spoken languages: English

Re: 414 Request-URI Too Large

Post by Chicken0895 »

It suppose it's possible it got carried over. Each part of the trial forwards you to the next part automatically.
Common sense is one of natures greatest ironies. It turns out that common sense isn't so common.
User avatar
Enthalpy
Community Manager
Posts: 5169
Joined: Wed Jan 04, 2012 4:40 am
Gender: Male
Spoken languages: English, limited Spanish

Re: 414 Request-URI Too Large

Post by Enthalpy »

Upon further investigation, the actual reason is because this line of regex fails when save_data is the final parameter. If that sounds like techno-jargon to you, it is. Don't worry about it. I think I know how to fix it.

In the meantime, your save data is corrupted. If you give me your latest save, I can uncorrupt it.
[D]isordered speech is not so much injury to the lips that give it forth, as to the disproportion and incoherence of things in themselves, so negligently expressed. ~ Ben Jonson
User avatar
Chicken0895
Posts: 5
Joined: Tue Aug 29, 2017 6:01 am
Gender: Male
Spoken languages: English

Re: 414 Request-URI Too Large

Post by Chicken0895 »

Sounds good. I ended up finishing it, so I don't really need any save data I need to be uncorrupted.

Thank you for offering though.
Common sense is one of natures greatest ironies. It turns out that common sense isn't so common.
User avatar
Unas
Admin / Site programmer
Posts: 8850
Joined: Tue Jul 10, 2007 4:43 pm
Gender: Male
Spoken languages: Français, English, Español
Contact:

Re: 414 Request-URI Too Large

Post by Unas »

Nice catch, Enthalpy, your final investigation seems good, and this regexp definitely seems to be the culprit as to why the parameter gets repeated when it shouldn't be ;-)

Regarding the URL length, I could indeed increase the size that the webserver will accept, but I don't think it's the right way to handle it.
Thinking about it, the game saves should never go to the server in the first place : they are generated by the browser, stored in the browser, and parsed and loaded by the browser...
I included the data in the link for the convenience of it (just open a save by opening a link), but it's probably bad design on my part to have used the main "query parameters" part of the URL to store the save data. It should be in the fragment part instead (ie appending a # to the URI, and the save data parameter behind, eg #save_data=...).
That part never goes to the server in theory, so the problem would disappear.
ImageImageImage
If knowledge can create problems, it is not through ignorance that we can solve them.
Si le savoir peut créer des problèmes, ce n'est pas l'ignorance qui les résoudra. ( Isaac Asimov )
Post Reply