You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Notebook show() on a remote kernel needs a forwarded port #132
In a notebook, show() displays its dashboard from the local FlexViz server at http://127.0.0.1:<port>. With a remote kernel, the browser that renders the notebook is on another machine, so it reaches that address only when the port is forwarded.
show(notebook=True) stays blank. The port does not appear in the Ports view, not after a wait, and not after a click on a http://127.0.0.1:<port> link in the notebook output.
show(notebook=False) works: VS Code forwards the port when webbrowser.open hands it the URL. After that, show(notebook=True) on the same port works too.
The same limit applies to any setup where the notebook frontend and the kernel run on different machines, such as JupyterHub or Colab.
Direction
Carry the dashboard's requests over the Jupyter kernel channel instead of HTTP, as widget libraries do (for example an anywidget / ipywidgets comm). The kernel side calls the same request handling as /dashboard/update, in process. The frontend always reaches the kernel, so no port has to be forwarded.
Open questions:
The JS runtime calls fetch(SERVER_URL + ...) in a few places (updates, cube requests, share). They need one transport seam, with HTTP and the kernel channel behind it.
Cube bundles are binary; the comm must carry bytes (anywidget supports buffers).
A new dependency (anywidget) needs a clear gain over the documented workaround.
Workaround today: pass a fixed port and call show(notebook=False, port=...) once, or forward the port by hand. docs/index.md documents this.
Activity