Coder Social home page Coder Social logo

Comments (17)

hqnghi88 avatar hqnghi88 commented on June 27, 2024 2

Hi i will see your js. The windows machine must have admin right access or it will alway return randomly error….

from gama.clients.

xiaofanliang avatar xiaofanliang commented on June 27, 2024 1

I think @neo is right. I switched my GAMA back to 1.8 version and the server can start fine without the JAVA issue (but then the rendering issues loop back to what I had at the very beginning, which is no error messages whatsoever but cannot load simulation).

I followed @neo's suggestion and go to my sh file and change this line (it is essentially revert the commit mentioned above)
if ! "$( dirname $( realpath "${BASH_SOURCE[0]}" ) )"
back to the previous commit
if ! "$( dirname "${BASH_SOURCE[0]}" )"

and then start the server with GAMA 1.9 version, and the index.html is running smoothly like below
s

and syntax.html is reporting statistics
ss

and SimpleGUI_new.html is functional except for a few toy examples. It also requires tweaking the absolute and model path. Right now the way the path is programmed requires users to download GAMA github version (https://github.com/gama-platform/gama). I did that, but there are still some examples that cannot be run. For example, Simple Traffic Model.gaml reported the following errors.
sss

In conclusion, this gama.client can only run on 1.9 version, and need a few tweaks in gama-headless.sh for Mac users (may not need it for Linux) to start the server. Some library examples cannot be run in the SimpleGUI_new.html.

from gama.clients.

hqnghi88 avatar hqnghi88 commented on June 27, 2024 1

Hi,
I am not really a pro user mac but im currently can launch the bash headless.sh on m1. So may be you can open an issue on gama repository if you think the scripts must be changed.
The syntax.html is not pre-defined statistics but it s a real simulation on an example server.
Regarding simpleGUI , it is as you tested, some specific model cannot launch for the moment.

from gama.clients.

hqnghi88 avatar hqnghi88 commented on June 27, 2024

Please try again with my new commit (of course with the latest alpha version of GAMA).

from gama.clients.

xiaofanliang avatar xiaofanliang commented on June 27, 2024

Hi! @hqnghi88 thanks for updating. I re-downloaded the alpha version of the GAMA, clone the new repo, and repeat my steps above, but the same issues persist. There are no error messages on the browser or the terminal.

This is the view when I opened index.html on my browser. Am I supposed to see the simulation running from gama_client.js? Are my steps above the right way to load the examples?

Screen Shot 2023-02-09 at 3 31 42 PM

from gama.clients.

hqnghi88 avatar hqnghi88 commented on June 27, 2024

Your steps are right, what is in console tab (you are showing network, please see in console)?

from gama.clients.

xiaofanliang avatar xiaofanliang commented on June 27, 2024

You can see the console tab output on the bottom right of the image. It did not report any error message. Not sure if this has any impact, but I open the index.html by double-clicking the file in the local folder, with a path like file:///~/gama.client/index.html rather than ws://localhost:6868/. In fact, ws://localhost:6868/ will not load on the browser (it says sites cannot be reached).

from gama.clients.

hqnghi88 avatar hqnghi88 commented on June 27, 2024

Yes it is supposed to open index.html , ws is a websocket and browser address cant process that kind. Nothing in the terminam where gamaserver launched?

from gama.clients.

hqnghi88 avatar hqnghi88 commented on June 27, 2024

You should pull gama.client repo, i changed the code in that repo, not the gama repo (just be sure you are using the latest alpha)

from gama.clients.

xiaofanliang avatar xiaofanliang commented on June 27, 2024

Yes, I pulled the gama.client repo, not the GAMA repo, and installed the alpha version: GAMA_1.9.0_MacOS_M1_02.09.23_4b82ffc7.dmg. There is no error message on the terminal where gamaserver is launched. It just says: 0:0:0:0:0:0:0:1 entered the room!

from gama.clients.

hqnghi88 avatar hqnghi88 commented on June 27, 2024

Send me your gamaclient.js

from gama.clients.

xiaofanliang avatar xiaofanliang commented on June 27, 2024

Do you need to have JAVA or Eclipse installed or configured in a specific way? I just restarted my computer fresh and rerun the process on my Mac M1 and my friend's window system (both installed with Alpha version. I installed GAMA_1.9.0_MacOS_M1_02.09.23_4b82ffc7.dmg and he installed GAMA_1.9.0_Windows_with_JDK_02.09.23_4b82ffc7.exe). I configured path to the model through the application, and he configured the path to the model through git version of GAMA. both of us ran into JAVA-related issues in the server.

My error starts even before GAMA can listen on the port:
screenshot

His error starts after the listening:
329840276_1367576724061970_74724495388094605_n

I attached my gamaclient.js in case you still want to take a look:
https://drive.google.com/file/d/1FyDZ6c16nNATJv3YclFd_vSX7H6yeHvI/view?usp=sharing

Thanks for digging into this rabbit hole. I tried reinstalled GAMA and start all the process fresh again and now the JAVA errors persist. They did not show up before.

from gama.clients.

hqnghi88 avatar hqnghi88 commented on June 27, 2024

I checked your js and it's perfect, do you have any changes in GAMA.js so that it is not updated? Even if the path it should show a message as:
Screenshot 2023-02-10 at 15 08 44
Regarding the 2 error message, it is relate with the path and access right, please try with the highest priviledges on each OS (sudo or administrator)

from gama.clients.

neo avatar neo commented on June 27, 2024

I think the Could not find or load main class org... error could be because you didn't run the bash script from the headless directory?

from gama.clients.

xiaofanliang avatar xiaofanliang commented on June 27, 2024

@hqnghi88 I saw that that error message (Invalid LngLat object) shows up at one point in my trial at the window computer. It never shows in Mac. I will try to set the privileges and see if that works.

from gama.clients.

xiaofanliang avatar xiaofanliang commented on June 27, 2024

I think the Could not find or load main class org... error could be because you didn't run the bash script from the headless directory?

It shows the same error even if I start in the headless directory.
screen

from gama.clients.

neo avatar neo commented on June 27, 2024

It seems like realpath was introduced in this commit gama-platform/gama@240559e in gama-headless.sh but it's actually only available in linux but not in mac?

from gama.clients.

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.