ananis
ananis
Mmarimo
Created by ananis on 7/5/2024 in #help-support
Unable to connect to github copilot
14 replies
Mmarimo
Created by ananis on 7/5/2024 in #help-support
Unable to connect to github copilot
Ah, seems like the script name has changed - https://github.com/rstudio/rstudio/issues/14800
14 replies
Mmarimo
Created by ananis on 7/5/2024 in #help-support
Unable to connect to github copilot
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
New client connected with url: /copilot
Forwarding new client
local Server: node:internal/modules/cjs/loader:1147
throw err;
^

Error: Cannot find module '/home/ubuntu/repos/marimo/marimo/_lsp/copilot/dist/agent.js'
at Module._resolveFilename (node:internal/modules/cjs/loader:1144:15)
at Module._load (node:internal/modules/cjs/loader:985:27)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:135:12)
at node:internal/main/run_main_module:28:49 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}

Node.js v20.10.0
New client connected with url: /copilot
Forwarding new client
local Server: node:internal/modules/cjs/loader:1147
throw err;
^

Error: Cannot find module '/home/ubuntu/repos/marimo/marimo/_lsp/copilot/dist/agent.js'
at Module._resolveFilename (node:internal/modules/cjs/loader:1144:15)
at Module._load (node:internal/modules/cjs/loader:985:27)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:135:12)
at node:internal/main/run_main_module:28:49 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}

Node.js v20.10.0
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!
ubuntu@ip-10-0-0-6:~/repos/marimo/lsp/node_modules/copilot-node-server/copilot/dist$ ls
compiled language-server.js tree-sitter-go.wasm tree-sitter-python.wasm tree-sitter-tsx.wasm tree-sitter.wasm
crypt32.node resources tree-sitter-javascript.wasm tree-sitter-ruby.wasm tree-sitter-typescript.wasm
ubuntu@ip-10-0-0-6:~/repos/marimo/lsp/node_modules/copilot-node-server/copilot/dist$ ls
compiled language-server.js tree-sitter-go.wasm tree-sitter-python.wasm tree-sitter-tsx.wasm tree-sitter.wasm
crypt32.node resources tree-sitter-javascript.wasm tree-sitter-ruby.wasm tree-sitter-typescript.wasm
14 replies
Mmarimo
Created by ananis on 7/5/2024 in #help-support
Unable to connect to github copilot
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/"
ubuntu@ip-10-0-0-6:~$ netstat -tuln | grep 271
tcp 0 0 100.106.136.158:2718 0.0.0.0:* LISTEN
tcp6 0 0 :::27180 :::* LISTEN
tcp6 0 0 :::27190 :::* LISTEN
ubuntu@ip-10-0-0-6:~$ netstat -tuln | grep 271
tcp 0 0 100.106.136.158:2718 0.0.0.0:* LISTEN
tcp6 0 0 :::27180 :::* LISTEN
tcp6 0 0 :::27190 :::* LISTEN
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)
Uncaught (in promise) Error: Request timeout request took longer than 30000 ms to resolve
at new n (icons-BeupAtiJ.js:13:128755)
at icons-BeupAtiJ.js:13:131481
Uncaught (in promise) Error: Request timeout request took longer than 30000 ms to resolve
at new n (icons-BeupAtiJ.js:13:128755)
at icons-BeupAtiJ.js:13:131481
14 replies
Mmarimo
Created by ananis on 7/5/2024 in #help-support
Unable to connect to github copilot
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.
14 replies
Mmarimo
Created by ananis on 7/5/2024 in #help-support
Unable to connect to github copilot
Thank you. So, this lets me access Marimo at {private-ip}:2718.
$ rye run marimo edit --host 100.106.136.158 --no-token --proxy 100.106.136.158

Create or edit notebooks in your browser 📝

URL: http://100.106.136.158
$ rye run marimo edit --host 100.106.136.158 --no-token --proxy 100.106.136.158

Create or edit notebooks in your browser 📝

URL: http://100.106.136.158
Copilot still fails to connect though. I have node installed. Is there a wy to enable debug logs for the server process?
14 replies
Mmarimo
Created by ananis on 7/5/2024 in #help-support
Unable to connect to github copilot
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
Create or edit notebooks in your browser 📝

URL: http://100.106.136.158
Create or edit notebooks in your browser 📝

URL: http://100.106.136.158
And I can't seem to access Marimo at all, at http://100.106.136.158:2718
14 replies