# Problem rendering a dashboard with Voilà

**URL:** <https://discourse.jupyter.org/t/problem-rendering-a-dashboard-with-voila/17579>\
**Category:** Widgets\
**Tags:** help-wanted\
**Created:** [January 18, 2023, 8:12am UTC](https://discourse.jupyter.org/t/problem-rendering-a-dashboard-with-voila/17579 "2023-01-18T08:12:50Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![nl.fr](https://avatars.discourse-cdn.com/v4/letter/n/b2d939/32.png) [@nl.fr](https://discourse.jupyter.org/u/nl.fr)\
**Post date:** [January 18, 2023, 8:12am UTC](https://discourse.jupyter.org/t/problem-rendering-a-dashboard-with-voila/17579/1 "2023-01-18T08:12:50Z")

</div>

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:

```auto
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)

---

<div class="post-metadata">

**Author:** ![JoelStansbury](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/joelstansbury/32/9028_2.png) [@JoelStansbury](https://discourse.jupyter.org/u/JoelStansbury)\
**Post date:** [February 4, 2023, 1:54am UTC](https://discourse.jupyter.org/t/problem-rendering-a-dashboard-with-voila/17579/2 "2023-02-04T01:54:22Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![JoelStansbury](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/joelstansbury/32/9028_2.png) [@JoelStansbury](https://discourse.jupyter.org/u/JoelStansbury)\
**Post date:** [February 4, 2023, 2:02am UTC](https://discourse.jupyter.org/t/problem-rendering-a-dashboard-with-voila/17579/3 "2023-02-04T02:02:35Z")

</div>

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)

---

<div class="post-metadata">

**Author:** ![JoelStansbury](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/joelstansbury/32/9028_2.png) [@JoelStansbury](https://discourse.jupyter.org/u/JoelStansbury)\
**Post date:** [February 4, 2023, 6:26pm UTC](https://discourse.jupyter.org/t/problem-rendering-a-dashboard-with-voila/17579/4 "2023-02-04T18:26:26Z")

</div>

This seems relevant

> <https://github.com/voila-dashboards/voila/issues/244>
>
> \*\*Issue:\*\* When serving a notebook with \`voila\`, \`hvplot\` objects are not render…ed in the browser.
> 
> Here is a minimal example, using \`networkx\` and \`hvplot\` together. 
> 
> \`\`\`
> import networkx as nx
> import hvplot.networkx as hvnx
> 
> G = nx.erdos\_renyi\_graph(n=30, p=0.3)
> options = \[1, 2, 3\]
> 
> @interact(options=options)
> def plot\_graph(options):
> # Ignore options, it is just a dummy to test that ipywidgets work
> # with @interact.
> return hvnx.draw(G)
> # 
> # Contrast with
> # return nx.draw(G)
> # which works.
> \`\`\`

---

<div class="post-metadata">

**Author:** ![nl.fr](https://avatars.discourse-cdn.com/v4/letter/n/b2d939/32.png) [@nl.fr](https://discourse.jupyter.org/u/nl.fr)\
**Post date:** [February 16, 2023, 12:32pm UTC](https://discourse.jupyter.org/t/problem-rendering-a-dashboard-with-voila/17579/5 "2023-02-16T12:32:33Z")

</div>

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](https://1drv.ms/u/s!At_bnTzrsBoPgQmvyntr3nwrG1n1?e=cm5Sl6).
