rojo-rbx / vscode-rojo

Visual Studio Code plugin for Rojo
https://marketplace.visualstudio.com/items?itemName=evaera.vscode-rojo
Mozilla Public License 2.0
35 stars 23 forks source link

Rojo server appears to not shut down properly on MacOS when turned off through VSCode UI. #79

Closed JimmyDeemo closed 1 year ago

JimmyDeemo commented 1 year ago

One of our game designers is struggling with server issue for the Rojo studio plugin. It is very similar to this issue on the main Rojo repo but is easily reproducible with his setup.

  1. Start Rojo by selecting a project.json file from VSCode.
  2. Server starts up on port 34872.
  3. Run lsof -i :34872 in terminal to see the service running.
  4. Stop the server running from withing VSCode.
  5. Run lsof -i :34872 again and notice that the service is still running.
  6. Try starting Rojo again, get a crash in the output that reads Address already in use.
  7. Back in terminal, use kill -9 [PID] to kill the running service.
  8. Try starting Rojo again, notice this time the server runs fine.

VSCode plugin version 2.1.2. MacOS Big Sur 11.6 (20G165)

Full error output;

Rojo server listening:
  Address: localhost
  Port:    34872
Visit http://localhost:34872/ in your browser for more information.
[ERROR rojo] Rojo crashed!
[ERROR rojo] This is probably a Rojo bug.
[ERROR rojo]
[ERROR rojo] Please consider filing an issue: https://github.com/rojo-rbx/rojo/issues
[ERROR rojo]
[ERROR rojo] Details: error binding to 127.0.0.1:34872: error creating server listener: Address already in use (os error 48)
[ERROR rojo] in file /Users/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/hyper-0.14.19/src/server/server.rs on line 77
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
LPGhatguy commented 1 year ago

Hello, thanks for filing an issue!

Is the affected machine using Foreman to manage the Rojo installation? This is a known issue with Foreman and some older versions of Aftman, but should not happen anymore on current releases.

JimmyDeemo commented 1 year ago

Thanks for the response. 👍

As it happens, yes, we are using Foreman to manage Rojo at the moment. Is there a better work around for this other than killing the server? We have some slight dependencies on Foreman right now; moving to Aftman sh

LPGhatguy commented 1 year ago

This is a known limitation of Foreman. Sadly, the only options are to wait for the Foreman authors to fix it or to use Aftman instead.