For certain labextensions, which are bundled alongside their python packages as of JupyterLab 3, voila fails to find the bundled files. Notably this affects k3d 2.11.0: the files bundled with the package are not found. This causes voila instead to find these same packages from a fallback CDN.
I infer that this has happened due to the following output in the browser console:
Loading failed for the <script> with source “http://localhost:8866/voila/k3d.js”. localhost:8866:1:1
Falling back to https://cdn.jsdelivr.net/npm/ for k3d@2.11.0
Reproduce
Have voila, JupyterLab, k3d and plotly (versions above) installed via pip
I ran voila as voila postproc_notebook/demonstration.ipynb --VoilaConfiguration.file_whitelist="['.*']" --debug --enable_nbextensions=True (this to confirm it wasn't a permission error that caused the .js files to not be found)
For me it was enough to have a notebook with the following to trigger the above error messages in the browser:
import k3d
k3d.plot()
I believed this occurs because these packages in particular use hex-strings as filenames instead of the human-readable names that voila expects. This seems to work fine on jupyter-lab, but voila is unable to recognize files in this format.
e.g. in the k3d pypi package, /k3d-2.11.0/k3d/labextension/static/ contains the following files instead of the human-readable k3d.js voila might expect.
Note that jupyter-lab seems to work fine with the filenames being as such.
Expected behavior
On the surface level the behavior of the labextensions seems fine because the fallback CDN does work so the widgets function. Nevertheless, I would want to use the bundled versions of the labextensions as these are the latest version and prevent a callback to an external CDN.
Context
voila version: voila==0.2.16
Operating System and version: Ubuntu 20.04
Browser and version: Firefox 93.0 (64-bit) (but similar on Chrome)
Description
For certain labextensions, which are bundled alongside their python packages as of JupyterLab 3, voila fails to find the bundled files. Notably this affects
k3d 2.11.0
: the files bundled with the package are not found. This causes voila instead to find these same packages from a fallback CDN.I infer that this has happened due to the following output in the browser console:
Reproduce
voila postproc_notebook/demonstration.ipynb --VoilaConfiguration.file_whitelist="['.*']" --debug --enable_nbextensions=True
(this to confirm it wasn't a permission error that caused the .js files to not be found)I believed this occurs because these packages in particular use hex-strings as filenames instead of the human-readable names that voila expects. This seems to work fine on jupyter-lab, but voila is unable to recognize files in this format.
e.g. in the k3d pypi package,
/k3d-2.11.0/k3d/labextension/static/
contains the following files instead of the human-readablek3d.js
voila might expect.Note that jupyter-lab seems to work fine with the filenames being as such.
Expected behavior
On the surface level the behavior of the labextensions seems fine because the fallback CDN does work so the widgets function. Nevertheless, I would want to use the bundled versions of the labextensions as these are the latest version and prevent a callback to an external CDN.
Context
voila==0.2.16
Jupyter Troubleshoot
Command Line Output
Browser Output