marimo-team/marimo

Copilot "Unable to connect"

Closed this issue · 6 comments

Describe the bug

Image

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 marimo-team/vscode-marimo#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