Problem rendering a dashboard with Voilà

Hi all,

I have a Jupyter notebook deployed as a web app using Voilà. This notebook embeds approx. 60 ipywigets and 2 bokeh plots. Everything works fine under jupyterlab but I’m facing a page rendering problem when the app is deployed with voilà.

The symptom is the following: 1. we open a browser passing our app URL from command line. 2. we observe a partial rendering of the web page (only the markdown cells are properly rendered). 3. the dashboard is finally rendred after a long delay (30s to one minute) or never rendered. In the latter case, the browser’s console “sometimes” says : “Failed to fetch ipywidgets through the “jupyter.widget.control” comm channel, fallback to fetching individual model state. Reason: Control comm did not respond in time”. 5. forcing the refresh of the page usally fixes the problem (a few attempts might be necessary).

Please note that I’m using pre-heated kernels on voilà side.

Here is the conda env. I’m using:

jupyter_bokeh             3.0.5              pyhd8ed1ab_0    conda-forge
jupyter_client            7.0.6              pyhd8ed1ab_0    conda-forge
jupyter_core              5.1.3            py38h578d9bd_0    conda-forge
jupyter_server            1.23.4             pyhd8ed1ab_0    conda-forge
jupyterlab                3.5.2              pyhd8ed1ab_0    conda-forge
jupyterlab_pygments       0.2.2              pyhd8ed1ab_0    conda-forge
jupyterlab_server         2.18.0             pyhd8ed1ab_0    conda-forge
jupyterlab_widgets        3.0.5              pyhd8ed1ab_0    conda-forge

ipykernel                 5.5.5            py38hd0cf306_0    conda-forge
ipython                   8.8.0              pyh41d4057_0    conda-forge
ipython_genutils          0.2.0                      py_1    conda-forge
ipywidgets                8.0.4              pyhd8ed1ab_0    conda-forge

voila                     0.4.0              pyhd8ed1ab_0    conda-forge

Any tip that could help me to locate the problem would be welcome.
Thanks!

(I tried to upload an screenshot to give you an idea of what the dashboard looks like but I got a systematic error)

I think jupyterlab has a data rate limit. Maybe voila has something similar?

1 Like

W.r.t. “never rendered” I had similar issue when I opened the web page too early (I would not even get the loading animation).
Waiting for voila to print out the url before launching the browser fixed that for me. Not exactly the same as you described, but something to watch out for I think.
(I don’t pre-heat though, maybe you don’t have this problem)

1 Like

This seems relevant

Many thanks for the link Joel.
It’s not the same problem, in fact. In my case it looks like a performances issue when I open the browser and connect to Voilà. I have to refresh my page 3 or 4 times before obtaining the expected display.