Skip to content

Web interface partially working when executed through vscode server port forward #52

@jeremyfix

Description

@jeremyfix

Describe the bug

I'm running a mesa simulation on a remote machine. I'm programming on the remote with vscode server; The issue comes with the visualisation.

Running, for example mesa runserver examples/wolf_sheep , vscode correctly detects the server being created on port 8521 and sets up a port forward from

remote:8521 to http://localhost:8080/proxy/8521/

The proxy/8521/ that appears in the URL seems to be causing trouble to mesa-viz-tornado.

Here is what I get :

image

Then, opening the developper console, I noticed a lot of messages complaining about the inability to get various files , for example

GET
http://localhost:8080/static/external/bootstrap-5.1.3-dist/css/bootstrap.min.css
[HTTP/1.1 404 Not Found 12ms]

I then edited your modular_template.html, replacing all the /static/ and /local/ to respectively static/ and local/ removing the leading / ; Then , the visualization gets more elements but I'm not yet there;

image

As you can see, there are some remaining "Unexpected token" errors . It seems to me also that :

  • part of the UI is not displayed (on the left, to tweak the parameters of the simulation)
  • the image with the grass is not shown

Do you have any idea of how to fix this ? On the vscode side, I did not find any way to change the forwarded port prefix, to remove the proxy/8521/ prefix; My hope is to adapt your html production code to prevent the ressource loading to go back to the root of the site;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions