Copilot "Unable to connect"
Describe the bug
It points to the docs "for troubleshooting", but not really seeing much info there about how to figure out what's going wrong.
Seems to be the same issue as https://github.com/marimo-team/vscode-marimo/issues/43 but seemed like it belongs on this repo, since it's not related to the VSCode extension
Environment
$ marimo env { "marimo": "0.9.14", "OS": "Linux", "OS Version": "5.10.102.1-microsoft-standard-WSL2", "Processor": "x86_64", "Python Version": "3.11.5", "Binaries": { "Browser": "--", "Node": "v18.18.0" }, "Dependencies": { "click": "8.1.7", "docutils": "0.21.2", "itsdangerous": "2.2.0", "jedi": "0.19.1", "markdown": "3.6", "narwhals": "1.10.0", "packaging": "24.0", "psutil": "5.9.8", "pygments": "2.18.0", "pymdown-extensions": "10.8.1", "pyyaml": "6.0.1", "ruff": "0.7.1", "starlette": "0.37.2", "tomlkit": "0.12.5", "typing-extensions": "missing", "uvicorn": "0.29.0", "websockets": "12.0" }, "Optional Dependencies": {} }
Code to reproduce
No response
how are you running marimo? different port or proxy? anything in the chrome/browser network logs?
Just in case you're using Conda -- our package on conda-forge does not include Copilot. Install from PyPI for Copilot support.
Strange, had already tried restarting server and refreshing page, but for whatever reason doing it again seemed to fix the issue: was able to get authorized
Where can I find more info about how marimo is using the copilot connection? looks like it's authorizing as the official github extension, so I'm assuming it's reverse engineered? (and has full access to my whole GH account?). Wondering whether there's a risk of getting my account flagged for using this?
@gabrielgrant we use https://github.com/jfcherng/copilot-node-server which as far as I know is also used by Sublime Text
this still exists , first time clicking on github gives the error , but if you choose none and github again , the error goes away.
marimo env
{
"marimo": "0.10.7",
"OS": "Linux",
"OS Version": "5.14.0-503.19.1.el9_5.x86_64",
"Processor": "",
"Python Version": "3.12.8",
"Binaries": {
"Browser": "--",
"Node": "v23.5.0"
},
...
Here is the error message: error logs :
ERROR: Exception in ASGI application
Traceback (most recent call last):
File "/usr/local/lib/python3.12/site-packages/uvicorn/protocols/websockets/websockets_impl.py", line 243, in run_asgi
result = await self.app(self.scope, self.asgi_receive, self.asgi_send) # type: ignore[func-returns-value]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/uvicorn/middleware/proxy_headers.py", line 60, in __call__
return await self.app(scope, receive, send)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/starlette/applications.py", line 112, in __call__
await self.middleware_stack(scope, receive, send)
File "/usr/local/lib/python3.12/site-packages/starlette/middleware/errors.py", line 152, in __call__
await self.app(scope, receive, send)
File "/usr/local/lib/python3.12/site-packages/starlette/middleware/base.py", line 101, in __call__
await self.app(scope, receive, send)
File "/usr/local/lib/python3.12/site-packages/starlette/middleware/authentication.py", line 48, in __call__
await self.app(scope, receive, send)
File "/usr/local/lib/python3.12/site-packages/starlette/middleware/cors.py", line 77, in __call__
await self.app(scope, receive, send)
File "/usr/local/lib/python3.12/site-packages/marimo/_server/api/middleware.py", line 88, in __call__
return await self.app(scope, receive, send)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/marimo/_server/api/middleware.py", line 316, in __call__
return await self.app(scope, receive, send)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/marimo/_server/api/middleware.py", line 329, in __call__
await self._proxy_websocket(scope, receive, send, ws_url)
File "/usr/local/lib/python3.12/site-packages/marimo/_server/api/middleware.py", line 381, in _proxy_websocket
async with connect(ws_url) as ws_client:
^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/websockets/asyncio/client.py", line 485, in __aenter__
return await self
^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/websockets/asyncio/client.py", line 442, in __await_impl__
self.connection = await self.create_connection()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/websockets/asyncio/client.py", line 368, in create_connection
_, connection = await loop.create_connection(factory, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/asyncio/base_events.py", line 1135, in create_connection
raise OSError('Multiple exceptions: {}'.format(
OSError: Multiple exceptions: [Errno 111] Connect call failed ('::1', 2918, 0, 0), [Errno 111] Connect call failed ('127.0.0.1', 2918)
I'm running it in docker btw
thanks for flagging this @eshirvana
I'm having this same issue, I think. marimo env shows "Node": "v22.14.0"
ERROR: Exception in ASGI application
Traceback (most recent call last):
File "/usr/local/opt/miniforge3/lib/python3.10/site-packages/uvicorn/protocols/websockets/websockets_impl.py", line 243, in run_asgi
result = await self.app(self.scope, self.asgi_receive, self.asgi_send) # type: ignore[func-returns-value]
File "/usr/local/opt/miniforge3/lib/python3.10/site-packages/uvicorn/middleware/proxy_headers.py", line 60, in __call__
return await self.app(scope, receive, send)
File "/usr/local/opt/miniforge3/lib/python3.10/site-packages/starlette/applications.py", line 112, in __call__
await self.middleware_stack(scope, receive, send)
File "/usr/local/opt/miniforge3/lib/python3.10/site-packages/starlette/middleware/errors.py", line 152, in __call__
await self.app(scope, receive, send)
File "/usr/local/opt/miniforge3/lib/python3.10/site-packages/marimo/_server/api/auth.py", line 220, in __call__
return await super().__call__(scope, receive, send)
File "/usr/local/opt/miniforge3/lib/python3.10/site-packages/starlette/middleware/sessions.py", line 85, in __call__
await self.app(scope, receive, send_wrapper)
File "/usr/local/opt/miniforge3/lib/python3.10/site-packages/starlette/middleware/base.py", line 100, in __call__
await self.app(scope, receive, send)
File "/usr/local/opt/miniforge3/lib/python3.10/site-packages/marimo/_server/api/auth.py", line 251, in __call__
await super().__call__(scope, receive, send)
File "/usr/local/opt/miniforge3/lib/python3.10/site-packages/starlette/middleware/authentication.py", line 48, in __call__
await self.app(scope, receive, send)
File "/usr/local/opt/miniforge3/lib/python3.10/site-packages/marimo/_server/api/auth.py", line 240, in wrapped_app
await app(scope, receive, send)
File "/usr/local/opt/miniforge3/lib/python3.10/site-packages/starlette/middleware/cors.py", line 77, in __call__
await self.app(scope, receive, send)
File "/usr/local/opt/miniforge3/lib/python3.10/site-packages/marimo/_server/api/middleware.py", line 92, in __call__
return await self.app(scope, receive, send)
File "/usr/local/opt/miniforge3/lib/python3.10/site-packages/marimo/_server/api/middleware.py", line 337, in __call__
return await self.app(scope, receive, send)
File "/usr/local/opt/miniforge3/lib/python3.10/site-packages/marimo/_server/api/middleware.py", line 350, in __call__
await self._proxy_websocket(scope, receive, send, ws_url)
File "/usr/local/opt/miniforge3/lib/python3.10/site-packages/marimo/_server/api/middleware.py", line 402, in _proxy_websocket
async with connect(ws_url) as ws_client:
File "/usr/local/opt/miniforge3/lib/python3.10/site-packages/websockets/asyncio/client.py", line 587, in __aenter__
return await self
File "/usr/local/opt/miniforge3/lib/python3.10/site-packages/websockets/asyncio/client.py", line 541, in __await_impl__
self.connection = await self.create_connection()
File "/usr/local/opt/miniforge3/lib/python3.10/site-packages/websockets/asyncio/client.py", line 467, in create_connection
_, connection = await loop.create_connection(factory, **kwargs)
File "/usr/local/opt/miniforge3/lib/python3.10/asyncio/base_events.py", line 1084, in create_connection
raise OSError('Multiple exceptions: {}'.format(
OSError: Multiple exceptions: [Errno 61] Connect call failed ('::1', 3218, 0, 0), [Errno 61] Connect call failed ('127.0.0.1', 3218)
I was getting this error, but it's gone now
Still getting this error
still having same problem
Still getting this problem too
for folks still having this issue, we just released a new version of marimo with an updated version of the GitHub copilot binaries (that should have better reliability).
Can people take the following steps:
- Upgrade to marimo >
0.13.13 - Make sure node > 20 is installed
node --version(we recommend > 22) - Try logging in again.
If this doesn't work, please respond with:
cat $XDG_CACHE_HOME/marimo/logs/github-copilot-lsp.log(orcat ~/.cache/marimo/logs/github-copilot-lsp.log)marimo env
if there are no issues, ill close this in a few days
And for conda user's (cc @astrowonk), this is not yet enabled in Conda environments, but will be soon (https://github.com/conda-forge/marimo-feedstock/issues/7)
This works for me outside of docker, but inside docker it shows:
Unable to connect to GitHub Copilot.
This error is output from the container:
[E 250529 17:38:26 middleware:372] Error proxying websocket: Multiple exceptions: [Errno 111] Connect call failed ('::1', 3120, 0, 0), [Errno 111] Connect call failed ('127.0.0.1', 3120)
I only have port 2718 exposed in my docker compose file.
Here's the log file
$ cat ~/.cache/marimo/logs/github-copilot-lsp.log
[INFO] WebSocket server listening on port 3120
Marimo env
$ marimo env
{
"marimo": "0.13.14",
"OS": "Linux",
"OS Version": "6.10.14-linuxkit",
"Processor": "aarch64",
"Python Version": "3.13.3",
"Binaries": {
"Browser": "--",
"Node": "v22.16.0"
},
"Dependencies": {
"click": "8.2.1",
"docutils": "0.21.2",
"itsdangerous": "2.2.0",
"jedi": "0.19.2",
"markdown": "3.8",
"narwhals": "1.41.0",
"packaging": "25.0",
"psutil": "7.0.0",
"pygments": "2.19.1",
"pymdown-extensions": "10.15",
"pyyaml": "6.0.2",
"starlette": "0.47.0",
"tomlkit": "0.13.2",
"typing-extensions": "4.13.2",
"uvicorn": "0.34.2",
"websockets": "15.0.1"
},
"Optional Dependencies": {
"loro": "1.5.1",
"python-lsp-ruff": "2.2.2",
"python-lsp-server": "1.12.2",
"ruff": "0.11.12"
},
"Experimental Flags": {}
}
Is there a config I could copy into docker that is generated by connecting copilot outside docker?
I am also having this issue. Mine just shows connecting... forever.
$ cat ~/.cache/marimo/logs/github-copilot-lsp.log
[INFO] WebSocket server listening on port 3120
[INFO] New connection from ::1
[INFO] Matched language server: copilot
[INFO] Forwarding new client connection
[INFO] Created language server process: node /Users/bhavesh/opt/anaconda3/envs/prt/lib/python3.11/site-packages/marimo/_lsp/copilot/language-server.js --stdio
[DEBUG] Received message: {"jsonrpc":"2.0","id":"0","method":"initialize","params":{"capabilities":{"workspace":{"workspaceFolders":false}},"initializationOptions":{"editorInfo":{"name":"marimo","version":"0.1.0"},"editorPluginInfo":{"name":"marimo","version":"0.1.0"}},"processId":null,"rootUri":"file:///__marimo_copilot__.py","workspaceFolders":[]}}
[DEBUG] Received message: {"jsonrpc":"2.0","method":"initialized","params":{}}
[DEBUG] Received message: {"jsonrpc":"2.0","id":"2","method":"checkStatus","params":{}}
[INFO] New connection from ::1
[INFO] Matched language server: copilot
[INFO] Created language server process: node /Users/bhavesh/opt/anaconda3/envs/prt/lib/python3.11/site-packages/marimo/_lsp/copilot/language-server.js --stdio
[INFO] Forwarding new client connection
[DEBUG] Received message: {"jsonrpc":"2.0","id":"0","method":"initialize","params":{"capabilities":{"workspace":{"workspaceFolders":false}},"initializationOptions":{"editorInfo":{"name":"marimo","version":"0.1.0"},"editorPluginInfo":{"name":"marimo","version":"0.1.0"}},"processId":null,"rootUri":"file:///__marimo_copilot__.py","workspaceFolders":[]}}
[DEBUG] Received message: {"jsonrpc":"2.0","method":"initialized","params":{}}
[DEBUG] Received message: {"jsonrpc":"2.0","id":"2","method":"checkStatus","params":{}}
$ marimo env
{
"marimo": "0.13.15",
"OS": "Darwin",
"OS Version": "24.3.0",
"Processor": "arm",
"Python Version": "3.11.11",
"Binaries": {
"Browser": "137.0.7151.68",
"Node": "v22.16.0"
},
"Dependencies": {
"click": "8.1.8",
"docutils": "0.21.2",
"itsdangerous": "2.2.0",
"jedi": "0.19.2",
"markdown": "3.8",
"narwhals": "1.28.0",
"packaging": "24.2",
"psutil": "6.1.1",
"pygments": "2.19.1",
"pymdown-extensions": "10.15",
"pyyaml": "6.0.2",
"starlette": "0.47.0",
"tomlkit": "0.13.2",
"typing-extensions": "4.12.2",
"uvicorn": "0.34.3",
"websockets": "15.0.1"
},
"Optional Dependencies": {
"altair": "5.5.0",
"duckdb": "1.3.0",
"nbformat": "5.10.4",
"openai": "1.84.0",
"pandas": "2.2.3",
"polars": "1.30.0",
"pyarrow": "19.0.0",
"loro": "1.5.1",
"ruff": "0.11.12",
"sqlglot": "26.22.1"
},
"Experimental Flags": {}
}
Same here:
cat ~/.cache/marimo/logs/github-copilot-lsp.log
[INFO] New connection from ::1
[DEBUG] Received message: {"jsonrpc":"2.0","id":"0","method":"initialize","params":{"capabilities":{"workspace":{"workspaceFolders":false}},"initializationOptions":{"editorInfo":{"name":"marimo","version":"0.1.0"},"editorPluginInfo":{"name":"marimo","version":"0.1.0"}},"processId":null,"rootUri":"file:///__marimo_copilot__.py","workspaceFolders":[]}}
[INFO] WebSocket closed with code 1005:
marimo env:
{
"marimo": "0.14.13",
"editable": false,
"OS": "Darwin",
"OS Version": "24.5.0",
"Processor": "arm",
"Python Version": "3.12.6",
"Binaries": {
"Browser": "138.0.7204.169",
"Node": "v18.20.6"
},
"Dependencies": {
"click": "8.2.1",
"docutils": "0.22",
"itsdangerous": "2.2.0",
"jedi": "0.19.2",
"markdown": "3.8.2",
"narwhals": "2.0.1",
"packaging": "25.0",
"psutil": "7.0.0",
"pygments": "2.19.2",
"pymdown-extensions": "10.16.1",
"pyyaml": "6.0.2",
"starlette": "0.47.2",
"tomlkit": "0.13.3",
"typing-extensions": "4.14.1",
"uvicorn": "0.35.0",
"websockets": "15.0.1"
},
"Optional Dependencies": {
"altair": "5.5.0",
"duckdb": "1.3.2",
"nbformat": "5.10.4",
"pandas": "2.3.1",
"polars": "1.31.0",
"pyarrow": "21.0.0",
"loro": "1.5.3",
"pytest": "8.4.1",
"python-lsp-ruff": "2.2.2",
"python-lsp-server": "1.13.0",
"ruff": "0.12.7",
"sqlglot": "27.4.1"
},
"Experimental Flags": {
"tracing": true,
"performant_table_charts": true,
"inline_ai_tooltip": true
}
}```
It seems uv is the (at least my) problem here:
When I start marimo using uv run marimo edit github copilot is still not able to connect and I am getting this error:
[E 250807 09:11:27 middleware:372] Error proxying websocket: Multiple exceptions: [Errno 61] Connect call failed ('::1', 3122, 0, 0), [Errno 61] Connect call failed ('127.0.0.1', 3122)
When switching into my venv and start marimo it works:
source .venv/bin/activate && marimo edit
I am having this issue with copilot too. I see it when running both uv run marimo and source .venv/bin/activate && marimo edit
Error in the terminal as follows:
[E 250822 11:11:20 middleware:486] WebSocket proxy error: Multiple exceptions: [Errno 61] Connect call failed ('::1', 3122, 0, 0), [Errno 61] Connect call failed ('127.0.0.1', 3122)
[E 250822 11:11:20 middleware:372] Error proxying websocket: Multiple exceptions: [Errno 61] Connect call failed ('::1', 3122, 0, 0), [Errno 61] Connect call failed ('127.0.0.1', 3122)
Error in the UI like this.
Persistent through restarts.
I only have this issue when running marimo with uv. Activating the venv and run marimo without uv works.
@agawley can you post the output of marimo env?
"marimo": "0.15.0",
"editable": false,
"OS": "Darwin",
"OS Version": "24.5.0",
"Processor": "arm",
"Python Version": "3.13.3",
"Binaries": {
"Browser": "139.0.7258.129",
"Node": "v10.14.0"
},
"Dependencies": {
"click": "8.2.1",
"docutils": "0.22",
"itsdangerous": "2.2.0",
"jedi": "0.19.2",
"markdown": "3.8.2",
"narwhals": "2.1.2",
"packaging": "25.0",
"psutil": "7.0.0",
"pygments": "2.19.2",
"pymdown-extensions": "10.16.1",
"pyyaml": "6.0.2",
"starlette": "0.47.2",
"tomlkit": "0.13.3",
"typing-extensions": "4.14.1",
"uvicorn": "0.35.0",
"websockets": "15.0.1"
},
"Optional Dependencies": {
"pandas": "2.3.2",
"loro": "1.5.4",
"python-lsp-ruff": "2.2.2",
"python-lsp-server": "1.13.0",
"ruff": "0.12.10"
},
"Experimental Flags": {}
}```
@agawley you'l need to update Node. Make sure node > 20 is installed node --version (we recommend > 22)
Yeah. That’s weird. I use nvm and have done nvm use 22. Now node -v says 22 but Marino env still says 10.
On Fri, 22 Aug 2025 at 18:09, Akshay Agrawal @.***> wrote:
akshayka left a comment (marimo-team/marimo#2780) https://github.com/marimo-team/marimo/issues/2780#issuecomment-3215044716
@agawley https://github.com/agawley you'l need to update Node. Make sure node > 20 is installed node --version (we recommend > 22)
— Reply to this email directly, view it on GitHub https://github.com/marimo-team/marimo/issues/2780#issuecomment-3215044716, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAEBQSGRMCW6OURHSQST7T3O5FE7AVCNFSM6AAAAABRENJ7KWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTEMJVGA2DINZRGY . You are receiving this because you were mentioned.Message ID: @.***>
@mscolnick just put in some hardening that should come in with 0.15.1. We'll keep this open because there may be more pitfalls.
Please keep reporting, especially if you're reading this comment post 0.15.1 release
Yeah. That’s weird. I use nvm and have done nvm use 22. Now node -v says 22 but Marino env still says 10. …
This was just node config soup at my end. Upgrading node and actually using the upgraded version fixed it for me.
I have a same problem. Log file
[INFO] New connection from ::1
[DEBUG] Received message: {"jsonrpc":"2.0","id":"0","method":"initialize","params":{"capabilities":{"workspace":{"workspaceFolders":false}},"initializationOptions":{"editorInfo":{"name":"marimo","version":"0.1.0"},"editorPluginInfo":{"name":"marimo","version":"0.1.0"}},"processId":null,"rootUri":"file:///__marimo_copilot__.py","workspaceFolders":[]}}
[INFO] WebSocket closed with code 1005:
And marimo env gives
{
"marimo": "0.15.0",
"editable": false,
"OS": "Windows",
"OS Version": "11",
"Processor": "AMD64 Family 25 Model 116 Stepping 1, AuthenticAMD",
"Python Version": "3.13.7",
"Binaries": {
"Browser": "139.0.7258.154",
"Node": "v24.7.0"
},
"Dependencies": {
"click": "8.2.1",
"docutils": "0.22",
"itsdangerous": "2.2.0",
"jedi": "0.19.2",
"markdown": "3.8.2",
"narwhals": "2.2.0",
"packaging": "25.0",
"psutil": "7.0.0",
"pygments": "2.19.2",
"pymdown-extensions": "10.16.1",
"pyyaml": "6.0.2",
"starlette": "0.47.3",
"tomlkit": "0.13.3",
"typing-extensions": "4.15.0",
"uvicorn": "0.35.0",
"websockets": "15.0.1"
},
"Optional Dependencies": {
"altair": "5.5.0",
"anywidget": "0.9.18",
"duckdb": "1.3.2",
"openai": "1.102.0",
"pandas": "2.3.2",
"polars": "1.32.3",
"pyarrow": "21.0.0",
"loro": "1.5.4",
"python-lsp-ruff": "2.2.2",
"python-lsp-server": "1.13.1",
"ruff": "0.12.10",
"sqlglot": "27.9.0"
},
"Experimental Flags": {
"rtc_v2": true,
"sql_linter": true,
"performant_table_charts": true,
"inline_ai_tooltip": true
}
}
For me there was an easy solution. I installed marimo as a tool uv tool install marimo.
FWIW, 0.15.1 just released and should help you debug (this is a big thread so reminder to others you can always mute a thread)
Hmm, hoping no news is good news! Please reopen with a new issue if this pops up again