marimo-team / marimo

A reactive notebook for Python — run reproducible experiments, execute as a script, deploy as an app, and version with git.
https://marimo.io
Apache License 2.0
5.29k stars 154 forks source link

VSCode extension #1260

Open aangelopoulos opened 2 months ago

aangelopoulos commented 2 months ago

Describe the bug

If you close and quickly reopen a VSCode embedded browser tab, it will display the following error message. Only after a minute or so of having the tab closed does it allow you to reconnect to the session.

image

Environment

{ "marimo": "0.4.7", "OS": "Linux", "OS Version": "6.5.0-4-amd64", "Processor": "x86_64", "Python Version": "3.9.19", "Binaries": { "Browser": "--", "Node": "v16.20.2" }, "Requirements": { "click": "8.1.3", "importlib-resources": "6.0.0", "jedi": "0.18.2", "markdown": "3.6", "pymdown-extensions": "10.8", "pygments": "2.14.0", "tomlkit": "0.12.4", "uvicorn": "0.22.0", "starlette": "0.27.0", "websocket": "missing", "typing-extensions": "4.9.0", "black": "24.4.2" } }

Code to reproduce

This is a VSCode extension issue. I am using extension v0.1.13.

mscolnick commented 2 months ago

How quickly are you closing/reopening? Are you using a keyboard shortcut? I am trying to repro (~3 seconds), and cannot repro myself

aangelopoulos commented 2 months ago

I'm not using a keyboard shortcut. All I'm doing is

  1. Open visualize.py, my marimo notebook
  2. Click the lightning bolt, then "start marimo server (edit)"
  3. The embedded browser opens, and things start running.
  4. I close the embedded browser by clicking the x.
  5. I go back to the lightning bolt and click "Open in embedded browser"

I just checked again, and this causes the error on my system.

mscolnick commented 2 months ago

Thanks for this info - it seems like it is not closing the previous connection for whatever reason. I will continue to investigate