"uploading score tape to score server - TIMEOUT"

Found a bug in R'n'D? Report it here!

Moderators: Flumminator, Zomis

Post Reply
BryanFRitt
Posts: 219
Joined: Mon Nov 13, 2017 4:16 pm

"uploading score tape to score server - TIMEOUT"

Post by BryanFRitt »

I'm trying to upload tapes on the server
MAIN MENU > SETUP > GAME & MENU > UPLOAD TAPES TO SERVER
and every time I get this popup.
UPLOAD FAILED!
ONLY __ TAPES UPLOADED!
With '__' being an 'integer'(Changes practically every run), or 'ONLY __' being replaced by 'NO'.
and this in the terminal.
- uploading score tape to score server - TIMEOUT.

===============================================================================
SUMMARY: Uploading tapes failed.
===============================================================================
It then puts the menu back at the main menu, instead of the "MAIN MENU > SETUP > GAME & MENU > UPLOAD TAPES TO SERVER" menu where I was.

One time I also got this in the terminal.
[ERROR] server failed to handle request: 400 Bad Request
rocksndiamonds-4.3.2.0

Other questions:
Is it trying to upload the correct levels?
Is it uploading the whole levelset even if some tapes of the levelset are already on server?
Life is partially trying to strike a balance between generating new things/ideas, and making sure they are good/organized. These extremes can be said to between gibberish mess and nothing said/done.
BryanFRitt
Posts: 219
Joined: Mon Nov 13, 2017 4:16 pm

Re: "uploading score tape to score server - TIMEOUT"

Post by BryanFRitt »

Looks like in finally finished this time...

There isn't a UPLOAD TAPES TO SERVER option any more, perhaps instead of disappearing the UPLOAD TAPES TO SERVER option*, it could say NO TAPES NEEDED TO BE UPLOADED. (Although it would be awkward in menu though, ideas for better way?)

*disappearing makes it so people that knows it exists, can get frustrated in looking for it, and for those that don't know it's on option remain longer at not knowing it's an option.
Life is partially trying to strike a balance between generating new things/ideas, and making sure they are good/organized. These extremes can be said to between gibberish mess and nothing said/done.
User avatar
Holger
Site Admin
Posts: 4073
Joined: Fri Jun 18, 2004 4:13 pm
Location: Germany
Contact:

Re: "uploading score tape to score server - TIMEOUT"

Post by Holger »

Hi Bryan, thanks for your observations. They pointed me to at least one bug and one improvement.

First of all (although this most probably was not the case you encountered), when you select "Upload tapes to server" from the setup menu while having the score server disabled in the setup menu at the same time, the program tries to upload tapes and fails after a timeout (because the score server is disabled). (Running into a timeout while knowing that the server is disabled is pretty stupid, of course, but this part of the code did not assume that this situation could occur.)

This is fixed now: When explicitly asking to upload tapes to the server, it is now ensured that the score server is enabled.

But most probably you already had the score server enabled, as the program apparently was able to upload at least a few tapes to the server before failing to completely upload all other tapes for whatever reason. This case should already be handled more or less gracefully: The program uploads whatever tape it can, marks them as "uploaded" (not per single tape, but per level set, if upload was completed for all tapes for that level set) and goes on or maybe fails. If it fails, the next attempt will continue uploading those tapes that were not uploaded with the previous attempt (potentially uploading tapes repeatedly from a level set that was not completed in the previous attempt).

That way, even with a bad network connection, one should be able to upload all remaining tapes in several upload attempts, if needed. (As the program uploads all tapes sequentially, waiting for each upload to be completed before uploading the next one, flooding the score server with too many pending upload connections should usually not happen.)
It then puts the menu back at the main menu, instead of the "MAIN MENU > SETUP > GAME & MENU > UPLOAD TAPES TO SERVER" menu where I was.
That behavior could indeed be discussed. Currently the program always returns to the main menu after uploading tapes (be it successful or not).
One time I also got this in the terminal.
[ERROR] server failed to handle request: 400 Bad Request
Yes, I can see two of these errors in the web servers log file (less than an hour before you posted), but this HTTP response code apparently came directly from the web server, not from the API server web application (which answers certain requests with HTTP response codes like 403 or 404, but not 400). I assume that they were caused by incomplete requests due to the same reason that caused the timeouts.
Is it trying to upload the correct levels?
Yes, it does. It does not try to upload tapes from level sets that have already been successfully uploaded. Also see above.
Is it uploading the whole levelset even if some tapes of the levelset are already on server?
Yes, that's right. As only completed tape folders for whole level sets are marked as "uploaded", some tapes may be uploaded again if the upload failed while uploading a series of tapes for one specific level set.
Looks like in finally finished this time...
Great! So it worked as described, completing the upload of all tapes in several attempts, if needed.
There isn't a UPLOAD TAPES TO SERVER option any more, perhaps instead of disappearing the UPLOAD TAPES TO SERVER option*, it could say NO TAPES NEEDED TO BE UPLOADED. (Although it would be awkward in menu though, ideas for better way?)
Yes, I also thought about this, and decided to hide this menu entry if there are no tapes that can be uploaded.
*disappearing makes it so people that knows it exists, can get frustrated in looking for it, and for those that don't know it's on option remain longer at not knowing it's an option.
The program should always tell you (using a dialog) if tapes can be uploaded from the setup menu, usually as a result of the user clicking "no" when offered to upload tapes that can be uploaded.
Post Reply