stderr Widget Javascript not detected. How to register it?
- Clear out
shared/jupyterandetc/jupyterfolders - Install and register modules and extensions:
pip install jupyter-kernel-gateway==0.5.1
pip install ipython==4.2.0
pip install jupyter-client==4.2.2
pip install jupyter-cms==0.5.0
pip install jupyter-core==4.1.0
pip install jupyter-dashboards==0.6.0
pip install jupyter-dashboards-bundlers==0.8.0
pip install jupyter-declarativewidgets==0.6.2
pip install ipywidgets==5.1.5
jupyter cms quick-setup --sys-prefix
jupyter dashboards quick-setup --sys-prefix
jupyter declarativewidgets quick-setup --sys-prefix
jupyter dashboards_bundlers quick-setup --sys-prefix
jupyter nbextension enable --py --sys-prefix widgetsnbextension
- Verify the install:
jupyter nbextension list
Known nbextensions:
config dir: foobar\etc\jupyter\nbconfig
notebook section
declarativewidgets/js/main enabled
- Validating: ok
jupyter-js-widgets/extension enabled
- Validating: ok
jupyter_cms/notebook/main enabled
- Validating: ok
jupyter_dashboards/notebook/main enabled
- Validating: ok
tree section
jupyter_cms/dashboard/main enabled
- Validating: ok
edit section
jupyter_cms/editor/main enabled
- Validating: ok
- Publish a dummy notebook to dashboards server
- Open that dashboard. In the console you inevitably find
dashboard.js:1 stderr Widget Javascript not detected. It may not be installed properly. Did you enable the widgetsnbextension? If not, then run "jupyter nbextension enable --py --sys-prefix widgetsnbextension"
stream @ dashboard.js:1a @ dashboard.js:1(anonymous function) @ dashboard.js:1i.onIOPub @ dashboard.js:66e._handleIOPub @ dashboard.js:27e.handleMsg @ dashboard.js:27t._onWSMessage @ dashboard.js:27_ws.onmessage @ dashboard.js:27
Failed to parse SourceMap: http://server:3000/components/dashboard.js.map
Declarative Widgets not supported ("urth_components" directory not found)
Widget frontend version does not match the backend.
That command was run successfully above, no?
dashboard.js:1 stderr Widget Javascript not detected. It may not be installed properly.
This message is logged by ipywidgets because it doesn't see its JavaScript on local disk. It expects it on local disk because that's how things work in Jupyter Notebook. However, in the dashboard server case, the JS for ipywidgets is NOT served up by the kernel gateway where ipywidgets gets imported. Instead, the JS comes from the dashboard server which is a separate process.
Basically, this is another one of those harmless errors that gets logged because ipywidgets assumes it is only ever used in a notebook server. However, I want to make sure: is the dashboard working correct for you or not?
Testing...
Is kernel gateway expected to reference the same set of libraries as the jupyter notebook server that initiated the Deploy As / Dashboard on Jupyter Dashboards Server step?
What if python repo that runs kernel gateway is missing libraries that jupyter notebook has access to?
The kernel gateway needs access to libraries referenced in the notebooks that are run against it. For example, in our docker setups, we make sure to install ipywidgets and declarative widgets in the kernel gateway image. You could also start your notebook with a pip install, to make any dependencies available to the kernel gateway (but the former is preferrable).
I have the same problem and my Dashboard server doesn't serve properly .. has this been addressed / is there a solution ?