-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
index.html not rendering or showing what gama_client.js is supposed to show #2
Comments
Please try again with my new commit (of course with the latest alpha version of GAMA). |
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? |
Your steps are right, what is in console tab (you are showing network, please see in console)? |
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). |
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? |
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) |
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! |
Send me your gamaclient.js |
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: His error starts after the listening: I attached my gamaclient.js in case you still want to take a look: 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. |
Hi i will see your js. The windows machine must have admin right access or it will alway return randomly error…. |
I think the |
@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. |
It seems like |
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) and then start the server with GAMA 1.9 version, and the index.html is running smoothly like below and syntax.html is reporting statistics 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. 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. |
Hi, |
Hi great people!
Thanks for investing in my issues.
I found the GAMA headless server https://gama-platform.org/wiki/HeadlessServer#hello-world-visualization-in-mapbox and tried to run a copy on my local machine. I had not been successful yet (elaboration below). I assume this server and the JS client allow me to run and show GAMA simulation results on the web. Have there been any successful examples deployed on the web that I can click and see?
For the issue I ran into, here is an elaboration:
I am using a MacOS M1 Chip computer, with a M1 chip GAMA installation. I followed the steps in this webpage: https://gama-platform.org/wiki/HeadlessServer#hello-world-visualization-in-mapbox to start a headless server and try to run the HellowWorld Visualization in Mapbox (JS client).
To start the server, I entered the following codes in my terminal:
The server seems to start fine:
Then, I go to the gama.client.js to modify the path of the library model file (highlighted). The path is found by opening the specific library model in local GAMA software, going to File -> Properties -> Location.
I uncommented the example that is on road traffic and commented out all other examples (see below).
Then in the same gama_client.js, I modify the local path to Websocket to ws://localhost:6868/, because that is the port in the server.
That are ALL the changes I made. Then, I opened the index.html file in my browser and it shows this: The base map is rendered correctly, but no simulation is rendered (I am expecting something from gama_client.js).
Once I loaded the index.html, the terminal says:
0:0:0:0:0:0:0:1 entered the room!
And there are no other error messages. I am not sure how to interpret the error warnings in the browser inspector.
I tried the following approaches, and it did not solve the problem:
- Change to a different port
- Change to a different html (e.g., syntax.html)
- Change to a different browser
Any idea of what to go next will be appreciated because I am clueless. Thanks!
The text was updated successfully, but these errors were encountered: