Closed paddymul closed 3 months ago
It might be nice if all of the extension js files were bundled into a single mega js file. Caching would be easier, and I would think the pageload would be more reliable or at least repeatable. As is, it's unclear if there is a race condition or if there was an http error when an individual file is requested.
I do know that the user who saw this error, cleared their browser cache this morning, and had successfully loaded the dashboard today before they saw this error later in the day.
Voila uses the same federated extension system of JupyterLab where all extensions are loaded dynamically. Could you provide a minimal notebook to reproduce the error? I can take a look at it.
I am trying to build a limited reproduction of the bug. It is difficult since the bug is intermittent. The weird thing is that our dashboard loads a VBox
on the initial rendering which always works. Then after a long running process, it calls display(widgets.VBox(...
on another bit of the UI. The second display
is what fails intermittently. and the JS fails saying it can't find a VBox
model, one of which has already been rendered.
Model class 'VBoxModel' from module '@jupyter-widgets/controls' is loaded but can not be instantiated
from your error message, the class is available, could you post the error log from the browser console?
I think this is the relevant failure from the browser console.
Error: widget model not found
get_model https://voilahub.foo.io/user/pmullen@foo.com/voila/static/2336.voila.js:1
M https://voilahub.foo.io/user/pmullen@foo.com/voila/static/2632.voila.js:1
M https://voilahub.foo.io/user/pmullen@foo.com/voila/static/2632.voila.js:1
_deserialize_state https://voilahub.foo.io/user/pmullen@foo.com/voila/static/2632.voila.js:1
_make_model https://voilahub.foo.io/user/pmullen@foo.com/voila/static/2336.voila.js:1
[Video Gen.ipynb:41:15](https://voilahub.foo.io/user/pmullen@foo.com/voila/render/Video%20Gen.ipynb?org_id=org-0b83&redirects=1)
error https://voilahub.foo.io/user/pmullen@foo.com/voila/render/Video Gen.ipynb?org_id=org-0b83&redirects=1:41
_make_model https://voilahub.foo.io/user/pmullen@foo.com/voila/static/2336.voila.js:1
I currently have a running console in the reproduction state, so I can run whatever you want.
it looks like an issue with the widget model data, the widget manager can not load the data from the model id. It's hard to guess the issue without having access to the debugger.
what commands do you want me to run at the console.
I have a sense that this bug is some sort of race condition, because it works for a lot of our stuff, then fails
what commands do you want me to run at the console.
I don't know, even if it's intermittent if you can provide me some code to try, I may figure out the issue.
Want to setup a screenshare?
I'm not actively working on Voila right now but I can add this issue to my todo once I have something to test locally.
The error message comes from here: https://github.com/jupyter-widgets/ipywidgets/blob/main/packages/base-manager/src/manager-base.ts#L621
It seems the model data was received by the front-end but it fails to deserialize the model. This could be due to factors that are not up to Voila e.g. custom widget library that fails to deserialize its own widget model.
It would be useful to get a Notebook that triggers these issues, especially if it's using custom widgets libraries (I see you have bqplot and plotly installed)
I would really like to be able to package this into a single reproducable notebook that replicates this problem. But we have a complex environment and we get to this error state after multiple API calls. All of that code and infrastructure is proprietary, so I can't share it
@martinRenou could you describe the type of problems that would make a library occasionally fail to deserialize it's own widget?
Ahh, I was finally able to reproduce on my end. We have a VBox that wraps a reacton.ipywidgets.Video
which we use as part of a filebrowser/video viewer. In our voila instance we read the file into the widget, in our jupyter instance we serve up the file via a URL. When the file is beyond 10 MB we get the vbox.js error.
So poor error messaging somewhere, but this doesn't seem tied to voila.
sorry for the confusion, thanks for the prompting
Would indeed be nice to reproduce this and give a better error msg. Can you give a reproducible example Paddy?
I will work on a reproduction of the bug.
Description
We intermittently see JS Module loading errors in our voila application. Ocassionally we get module loading errors on our voila dashboard that serves notebooks built on top of ipywidgets. Our deployment environment and notebooks are consistent. We had been using voila 0.5.0a2, and recently upgraded to 0.5.7 and jupyterlab 4.0 . Previously we would see this error on maybe 30% of page loads. Since the upgrade we saw our first one in 100+ page loads.
Reproduce
Expected behavior
If the page loads once, it should always load consistently.
Context
voila 0.5.7 Firefox, OS X
We serve up voila dashboards from a per-user jupyterhub instance, voila is invoked via jhsingle-native-proxy
Troubleshoot Output
Command Line Output
Browser Output
If using JupyterLab
Installed Labextensions