Jupyterhub widgets fail to load

Working with a few notebooks that have widgets and we are encountering a case where widgets will not load.

In the console logs on any web browser accessing the notebook we see this:

Failed to fetch ipywidgets through the “jupyter.widget.control” comm channel, fallback to fetching individual model state. Reason: Control comm was closed too early

Unfortunately I think its fallback fails too.

We unfortunately need the widgets to work in order to use the notebook as its intended purpose - a frontend interface to view and analyze SpyCloud data.

I’ve confirmed separately in a separate JupyterLab environment that the issue is not the notebook.

JupyterHub runs as an unprivileged user - is this possibly the problem? How can I debug this further?

This is still a critical level issue for my work needs, is there anyone who has any insights into how to go about debugging this?

OK well I feel dumb.

It turns out that Spycloud starts with an Anaconda managed environment in their Jupyter envs. Which in turn installs a lot of extra stuff that is not default for the Hub environment. And the only reason I figured this out? I went through a clean JupyterLab instance which properly gave debug output about missing modules/imports and calculated the proper pip3 install to run in the Hub for global users. THAT then made the notebook work.

You’d think Spycloud would keep notes about this kind of stuff, but nope!

1 Like