Skip to content
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

Unable to init server on WSL #29

Closed
jdan opened this issue Nov 21, 2020 · 11 comments
Closed

Unable to init server on WSL #29

jdan opened this issue Nov 21, 2020 · 11 comments
Labels
bug Something isn't working windows

Comments

@jdan
Copy link

jdan commented Nov 21, 2020

Environment

  • OS: Windows via WSL
  • OS Version: 10
  • VS Code Version: 1.51.1
  • Racket version: 7.2
  • Racket Langserver: checksum 19953f6afda5f8f6b539e88d0c6be57599a8a11f
  • Magic Racket version: 0.5.6

Error message

Unable to init server: Could not connect: Connection refused
Gtk initialization failed for display ":0"
  context...:
   "/usr/share/racket/pkgs/gui-lib/mred/private/wx/gtk/queue.rkt": [running body]
   temp37_0
   for-loop
   run-module-instance!125
   for-loop
   [repeats 1 more time]
   run-module-instance!125
   for-loop
   [repeats 1 more time]
   run-module-instance!125
   do-dynamic-require5
   "/usr/share/racket/pkgs/gui-lib/mred/private/wx/platform.rkt": [running body]
   temp37_0
   for-loop
   run-module-instance!125
   for-loop
   ...

Additional context

I am running this in Windows Subsystem Linux 2

Unsure why the langserver needs gtk, maybe that's just racket startup stuff? I'm able to run racket from my terminal without issue

jdan@DAPHNE:~$ racket
Welcome to Racket v7.2.
> (+  3 4)
7
>
@jdan jdan added the bug Something isn't working label Nov 21, 2020
@Eugleo
Copy link
Owner

Eugleo commented Nov 26, 2020

Hey, next week I'm getting a Windows machine to test Magic Racket on WSL. So, hold on a little longer! In the meantime, check over at racket-langserver if this isn't a well-known problem.

@1gmar
Copy link

1gmar commented Nov 30, 2020

Hey @jdan, I'm experiencing a similar issue when trying to init server inside a devcontainer.

Have you managed to work around this issue?

Any insight would be highly appreciated.

@jdan
Copy link
Author

jdan commented Nov 30, 2020

Nope no dice yet but haven't tried anything fancy :)

@stereobooster
Copy link

stereobooster commented Jan 18, 2021

related #31, jeapostrophe/racket-langserver#18

xvbf is a potential solution here

@Runi-c
Copy link
Contributor

Runi-c commented Apr 16, 2021

This issue is now tracked at jeapostrophe/racket-langserver#45

@lopezca
Copy link

lopezca commented Jul 5, 2021

Hello!

Great plugin, thank you!

I also have this issue when trying to run it when there is no display available;
xvfb does work, but the server has to be started beforehand.

would it be possible to add a configuration option to change the command to launch the server?
that way, it can be modified to make it work with xvfb and use it as usual.

cheers!

@HugoBarreto
Copy link

Could someone provide the exact steps that you're using to run racket-langserver in WSL?

I'm using VS Code and couldn't figure how to use xvfb in this context.

@SFurnace
Copy link

@HugoBarreto @jdan I found a workaround, please see this #51

@Eugleo Eugleo added the windows label Dec 26, 2021
@Eugleo
Copy link
Owner

Eugleo commented Dec 26, 2021

Closing, as there is currently a workaround and the issue itself cannot be fixed on the side of Magic Racket. I will link the workaround from the readme.

@Eugleo Eugleo closed this as completed Dec 26, 2021
@tim-harding
Copy link

tim-harding commented Jan 12, 2022

{
    "magicRacket.languageServer.command": "xvfb-run",
    "magicRacket.languageServer.arguments": [
        "--auto-servernum",
        "racket",
        "--lib",
        "racket-langserver"
    ],
}

This is the configuration that works for me. I had to add --auto-servernum to make the server start up consistently.

@coyorkdow
Copy link

Same problem on vscode ssh to a Debian instance and magic-racket extension crashed. Using xvbf works fine to me.

{
    "magicRacket.languageServer.command": "xvfb-run",
    "magicRacket.languageServer.arguments": [
        "--auto-servernum",
        "racket",
        "--lib",
        "racket-langserver"
    ],
}

This is the configuration that works for me. I had to add --auto-servernum to make the server start up consistently.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working windows
Projects
None yet
Development

No branches or pull requests

10 participants