Unable to connect to github copilot
Hi - just started using Marimo and it looks pretty nifty!
I have been trying to enable github copilot with it but can't seem to. When I select it in the settings, it just says "Unable to connect" and I can't find any debugging info in the repository, or the logs.
I am running Marimo on a remote machine with a private IP set to host, might that be the issue?
rye run marimo edit --host {private-ip} --no-token
10 Replies
I have exactly the same problem, but I am running Marimo locally. So this seems not to be your issue.
You have to run the --proxy={private-ip}
--host just restricts the ip interface for access to the server
Can you help me understand how will that make copilot work?
I can access Marimo by setting the host variable fine. Using
proxy={private-ip}
leaves me this
And I can't seem to access Marimo at all, at http://100.106.136.158:2718
Yup. So, copilot runs on another server in the background, and assumes that the way marimo is connecting is the same way it should connect.
--host=localhost is the default, and restricts access to the server unless the request comes from localhost. So that's why you can't connect now, you still need --host={private IP}
--proxy was set up for domains (e.g. your server is notebooks.company.co). Actually since you are running with a raw IP, I don't think this is needed, but give it a shot.
Do you have node installed on your server?
Thank you. So, this lets me access Marimo at {private-ip}:2718.
Copilot still fails to connect though. I have node installed. Is there a wy to enable debug logs for the server process?
marimo -d -l DEBUG edit --host 100.106.136.158 --no-token --proxy 100.106.136.158 --port=2718
For full verbosity. It could also be a firewall issue if 27180 is blocked
Thank you for helping me through it! After running this command, here are the logs when I toggle "AI code completion" in Marimo UI from None to Github.
Weirdly, code-autocomplete requests seem to be successful in the terminal logs, but frontend still says "unable to connect" and I don't actually see it.
Did you check your firewall? Also, if you pop developer tools, it should let know know why the request fails
Yep. The private IP comes from using tailscale vpn which doesn't need you to open any ports on firewall. I think that isn't an issue because I created a simple WS server on 27190, and can seemingly access it from my browser, at "ws://http://100.106.136.158:27190/"
The first entry is the marimo server, second one is the copilot one(?) and the third one is the test WS server, which is accessible from the browser.
From dev tools, I can see a WS connection request from the frontend to 27180, but it doesn't seem to receive a response.
Console logs from dev tools show the following error, and sometimes about a websocket being already closed (but I cant always get it to appear)
I think I got it. I set up the Marim repo locally and added logging here - https://github.com/marimo-team/marimo/blob/293e3cd122ed5f8cdc5ae2b9a4d22498ef92fe9e/lsp/index.ts#L52
So, the copilot script Marimo LSP server wants to run seems to be missing. Looking at the original package, there actually isn't an
agent.js
, nor there is one in the compiled LSP package by Marimo. I am not sure how it works at all!
Ah, seems like the script name has changed - https://github.com/rstudio/rstudio/issues/14800
Made a PR - https://github.com/marimo-team/marimo/pull/1745Thanks!