Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Voila-Vuetify template fails to load after the loading bar is displayed #878

Closed
Jul3k opened this issue Apr 28, 2021 · 6 comments
Closed

Comments

@Jul3k
Copy link

Jul3k commented Apr 28, 2021

When using the voila-vuetify template the widgets fail to load. An the the site gets stuck after the loading bar is displayed.
Screenshot from 2021-04-28 10-26-45

In Chrome the error message reads "Cannot read property 'kernelChanged' of undefined":
Screenshot from 2021-04-28 10-10-39

on Firefox the error message is "Uncaught (in promise) TypeError: e.sessionContext is undefined":
Screenshot from 2021-04-28 10-11-42

Loading the notebooks without specifying a template works without issues. The Notebook for testing just shows a simple ipyvuetify widget. The issue might be related to jupyter-flex uncaught exception #78. They recommend downgrading to a previous version of voila in the 0.2.X series. For me I could only get it working by downgrading to voila==0.1.24 and voial-vuetify==0.4.0
Here is a list of the installed package versions. I could reproduce this issue on three machines running Linux.

ipyvue==1.5.0
ipyvuetify==1.6.2
jupyter-client==6.1.12
jupyter-console==6.2.0
jupyter-core==4.7.1
jupyter-packaging==0.9.2
jupyter-server==1.6.4
jupyterlab-pygments==0.1.2
voila==0.2.9
voila-vuetify==0.5.1

I am not sure if this is an issue with voila or voila-vuetify, but since the error occures in voila.js I deceided to open the issue here.

@jtpio
Copy link
Member

jtpio commented Apr 29, 2021

Thanks @Jul3k.

Would you be able to try with the latest 0.2.10 release of voila?

For me I could only get it working by downgrading to voila==0.1.24

Were you also able to check with 0.2.7?

@Jul3k
Copy link
Author

Jul3k commented Apr 29, 2021

@jtpio thank you for the recommendation. Installing the latest 0.2.10 shows the same issue like versions 0.2.9 and 0.2.8. Downgrading to 0.2.7 does indeed work, but I have to start the jupyter notebook server with --VoilaConfiguration.enable_nbextensions=True. I think it is the correct way to enable the extensions but unfortunately not documented in voila-vuetify. Otherwise the widgets don't load becuase jupyter-vue.js and jupyter-vuetify.js cannot be found.

@jtpio
Copy link
Member

jtpio commented Apr 29, 2021

Thanks @Jul3k for checking.

There was a refactoring of the frontend that was shipped in 0.2.8, so it's very likely this is the reason the other templates are seeing this.

So looking at the code for voila vuetify, the WidgetManager is instantiated there: https://github.com/voila-dashboards/voila-vuetify/blob/9c0ead3855ef9223d160c60a4a5abfcb719b1af7/share/jupyter/nbconvert/templates/vuetify-base/util.js#L92

However the structure of the context is not the same between the template:

https://github.com/voila-dashboards/voila-vuetify/blob/9c0ead3855ef9223d160c60a4a5abfcb719b1af7/share/jupyter/nbconvert/templates/vuetify-base/util.js#L68-L82

And the one now in Voila master:

const context = {
sessionContext: {
session: {
kernel,
kernelChanged: {
connect: () => {}
},
},
statusChanged: {
connect: () => {}
},
kernelChanged: {
connect: () => {}
},
connectionStatusChanged: {
connect: () => {}
},
},
saveState: {
connect: () => {}
},
};

Not sure any of the classes from the Voila frontend were ever part of the public API, but it's a good sign that we should also be testing compatibility with downstream templates here in the voila repo.

Hopefully #846 will make the frontend more structured with properly defined APIs at the plugin level, so this should help detecting such issues.

@jtpio
Copy link
Member

jtpio commented Apr 29, 2021

In the meantime, the simplest fix might be to update the vuetify template to use the new structure for the context object passed to the widget manager. And require voila>=0.2.8 when cutting a new release.

@maartenbreddels
Copy link
Member

I guess voila-dashboards/voila-vuetify#44 is the fix

@Jul3k
Copy link
Author

Jul3k commented Apr 29, 2021

The fix mentioned by @jtpio, which is already implemented by voila-dashboards/voila-vuetify#44 in the meantime while I was looking into the issue solves the problem. Thank you!

@Jul3k Jul3k closed this as completed Apr 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants