Not a bug SharedDataURL feature might break the game

Discussion in 'Archive (Read Only)' started by Vollinger, Jun 23, 2024 at 7:42 PM.

  1. Vollinger

    Vollinger Lieutenant

    Joined:
    Jan 16, 2022
    Messages:
    39
    Likes Received:
    68
    Build: 4480
    Mode: any

    SERVER NAME: any
    SEED-ID: any

    If applicable:
    MODIFIED PLAYFIELDS: any

    Reproducibility: always
    Severity: Major

    Type: wrong scenario data

    Summary: If the shared data is wrong, broken, not reachable or outdated the game will be completely broken.

    Description:
    If you enable the SharedDataURL - feature on your server, the clients will *no longer* sync the shared data with the server the "old way". No matter what the outcome of the attempted download is, the client will still connect to the server. And this is where a ton of shenanigans can happen, since the client will NOT have the up-to-date data. You'll probably just see a ton of errors in the console, or your game might crash - i don't even know if interacting with the server in that state might even break the savegame on the server completely, which would be fatal.
    Additionally, if the url itself in the server configuration did not change even though the file was updated, the game will *not* redownload the zip. It probably assumes the url denotes the version of the file (which is probably only valid for the 3 supported cloud services).

    To sum it up:
    * if the content of the shared data zip is outdated, the game might break.
    * if the url of the shared data zip did not change (even though it might contain an updated zip), the client will not download it and the game might break
    * if the zip does not have the expected folder structure, the game might break
    * if the zip was not downloadable for some reason, the game might break
    * if the url is not reachable for the client, the game might break.

    Suggested solution:
    Since the idea of providing the shared data as a separate download is still a good idea, as long as the game server itself has limited bandwidth, there's an easy option how to solve it:
    Call the "old way"-method *after* the download (no matter the outcome), so the "old way" can ensure that the files stay in sync between the client and the server. This will solve all the issues mentioned above:
    If the download was successful, it will not have to sync anything and everything will work as expected. If the download failed, it will then just download the files, as it used to do in all the previous versions. If the zip file was incomplete or outdated, it will just sync the files that need an update.

    Nice-To-Have:
    If the http client that downloads the shared data would support HTTP ETags or the Last-Modified header it would no longer require server admins to configure a new (and different) url after every scenario update.

    Steps to Reproduce:
    1) configure any url on a server with a scenario (just don't use an url with a valid shared data zip)
    2) make sure your cache for that server is empty
    3) start game and connect to that server
    4) mayhem

    Screenshots, Crash Logs, any other Relevant Information or Download links:
     
    #1
    Caveator and ravien_ff like this.
  2. Taelyn

    Taelyn Administrator Staff Member Community Manager

    • Developer
    • Administrator
    Joined:
    Oct 4, 2021
    Messages:
    791
    Likes Received:
    1,322
    As explained in the update notes the server owner is repsonsible to provide the correct data.
    This is done by uploading a new zip and creating a new URL, nothing different then updating a scenario on the server
     
    #2

Share This Page