Giter Site home page Giter Site logo

Comments (7)

ravarnamsft avatar ravarnamsft commented on May 26, 2024 1

@tylerhasman , thanks for reporting these issues. We will take a look and fix them and report back here.

from localmultiplayeragent.

tylerhasman avatar tylerhasman commented on May 26, 2024

So I managed to get it to work by launching the jar from my computer with an absolute path as so:
"StartGameCommand": "C:/Assets/jre/bin/java.exe -jar C:/Users/user/Documents/GitHub/WizardGame/out/artifacts/gameserver_jar/gameserver.jar",

Then I ran into another road block. There is a bug with the Java SDK for the game server. You need to initialize the "Build Metadata" in "JsonFileConfiguration", otherwise it throws a NPE. I detected it in the game server by loading in the config file, checking if its null, then setting it to an initialized value and resaving the file to the disc.

        JsonFileConfiguration jsonFileConfiguration = new JsonFileConfiguration();

        if(jsonFileConfiguration.getBuildMetadata() == null){
            logger.warn("Detected build metadata is null!");
            jsonFileConfiguration.setBuildMetadata(new HashMap<>());
            jsonFileConfiguration.save();
            logger.warn("Saved new json stuff");
        }

from localmultiplayeragent.

ravarnamsft avatar ravarnamsft commented on May 26, 2024

@tylerhasman , I can see how the arguments were not converted properly when running outside of the container, but did you see the same issue while running it within a container as well?

Regarding the JsonFileConfiguration, were you trying to access the buildMetadata (when it was null) or are you suggesting that the serialization itself fails if the buildMetadata is null? I don't get the "Save" part above, did you update the file directly?

from localmultiplayeragent.

tylerhasman avatar tylerhasman commented on May 26, 2024

Yes I had to overwrite the file with valid data

from localmultiplayeragent.

dgkanatsios avatar dgkanatsios commented on May 26, 2024

hi @tylerhasman, any further questions/help needed towards this issue? If not, we can close it.

from localmultiplayeragent.

tylerhasman avatar tylerhasman commented on May 26, 2024

I don't believe the issue has actually been fixed. I had to use essentially java reflection to fix it.

from localmultiplayeragent.

dgkanatsios avatar dgkanatsios commented on May 26, 2024

thanks for mentioning that, will keep the issue open. Can you share your workaround so other users can potentially benefit while we're working on the fix?

from localmultiplayeragent.

Related Issues (11)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.