voila-dashboards / voila

Voilà turns Jupyter notebooks into standalone web applications
https://voila.readthedocs.io
Other
5.45k stars 505 forks source link

Intermittent js module loading #1483

Closed paddymul closed 3 months ago

paddymul commented 3 months ago

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

  1. Load a dashboard based on an ipywidgets widget.
  2. eventually see this error.
    [Open Browser Console for more detailed log - Double click to close this message]
    Model class 'VBoxModel' from module '@jupyter-widgets/controls' is loaded but can not be instantiated
    get_model@https://voilahub.foo.io/user/user@foo.com/voila/static/2336.voila.js:1:65958
    M@https://voilahub.foo.io/user/user@foo.com/voila/static/2632.voila.js:1:6273
    M@https://voilahub.foo.io/user/user@foo.com/voila/static/2632.voila.js:1:6083
    _deserialize_state@https://voilahub.foo.io/user/user@foo.com/voila/static/2632.voila.js:1:12362
    _make_model@https://voilahub.foo.io/user/user@foo.com/voila/static/2336.voila.js:1:70461

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
The output is too long to list.
Command Line Output
Paste the output from your command line running `voila` here, use `--debug` if possible.
Browser Output
Paste the output from your browser Javascript console here.

If using JupyterLab

Installed Labextensions
jupyter labextension list
JupyterLab v4.0.6
{
    "name": "@jupyterlab/application-top",
    "version": "4.0.6",
    "private": true,
    "license": "BSD-3-Clause",
    "scripts": {
        "build": "npm run clean && webpack",
        "build:dev": "npm run build",
        "build:prod": "webpack --config webpack.prod.config.js",
        "build:prod:minimize": "webpack --config webpack.prod.minimize.config.js",
        "build:prod:minimize:report": "npm run build:prod:minimize:stats && webpack-bundle-analyzer --no-open --mode static --report static/webpack-bundle-analyzer.html stats.json static",
        "build:prod:minimize:stats": "webpack --profile --config webpack.prod.minimize.config.js --json > stats.json",
        "build:prod:release": "webpack --config webpack.prod.release.config.js",
        "build:stats": "webpack --profile --json > stats.json",
        "clean": "rimraf build",
        "prepublishOnly": "npm run build",
        "watch": "webpack --watch"
    },
    "resolutions": {
        "@codemirror/language": "^6.0.0",
        "@codemirror/state": "^6.2.0",
        "@codemirror/view": "^6.9.6",
        "@jupyter/ydoc": "~1.0.2",
        "@jupyterlab/application": "~4.0.6",
        "@jupyterlab/application-extension": "~4.0.6",
        "@jupyterlab/apputils": "~4.1.6",
        "@jupyterlab/apputils-extension": "~4.0.6",
        "@jupyterlab/attachments": "~4.0.6",
        "@jupyterlab/cell-toolbar": "~4.0.6",
        "@jupyterlab/cell-toolbar-extension": "~4.0.6",
        "@jupyterlab/cells": "~4.0.6",
        "@jupyterlab/celltags-extension": "~4.0.6",
        "@jupyterlab/codeeditor": "~4.0.6",
        "@jupyterlab/codemirror": "~4.0.6",
        "@jupyterlab/codemirror-extension": "~4.0.6",
        "@jupyterlab/completer": "~4.0.6",
        "@jupyterlab/completer-extension": "~4.0.6",
        "@jupyterlab/console": "~4.0.6",
        "@jupyterlab/console-extension": "~4.0.6",
        "@jupyterlab/coreutils": "~6.0.6",
        "@jupyterlab/csvviewer": "~4.0.6",
        "@jupyterlab/csvviewer-extension": "~4.0.6",
        "@jupyterlab/debugger": "~4.0.6",
        "@jupyterlab/debugger-extension": "~4.0.6",
        "@jupyterlab/docmanager": "~4.0.6",
        "@jupyterlab/docmanager-extension": "~4.0.6",
        "@jupyterlab/docregistry": "~4.0.6",
        "@jupyterlab/documentsearch": "~4.0.6",
        "@jupyterlab/documentsearch-extension": "~4.0.6",
        "@jupyterlab/extensionmanager": "~4.0.6",
        "@jupyterlab/extensionmanager-extension": "~4.0.6",
        "@jupyterlab/filebrowser": "~4.0.6",
        "@jupyterlab/filebrowser-extension": "~4.0.6",
        "@jupyterlab/fileeditor": "~4.0.6",
        "@jupyterlab/fileeditor-extension": "~4.0.6",
        "@jupyterlab/help-extension": "~4.0.6",
        "@jupyterlab/htmlviewer": "~4.0.6",
        "@jupyterlab/htmlviewer-extension": "~4.0.6",
        "@jupyterlab/hub-extension": "~4.0.6",
        "@jupyterlab/imageviewer": "~4.0.6",
        "@jupyterlab/imageviewer-extension": "~4.0.6",
        "@jupyterlab/inspector": "~4.0.6",
        "@jupyterlab/inspector-extension": "~4.0.6",
        "@jupyterlab/javascript-extension": "~4.0.6",
        "@jupyterlab/json-extension": "~4.0.6",
        "@jupyterlab/launcher": "~4.0.6",
        "@jupyterlab/launcher-extension": "~4.0.6",
        "@jupyterlab/logconsole": "~4.0.6",
        "@jupyterlab/logconsole-extension": "~4.0.6",
        "@jupyterlab/lsp": "~4.0.6",
        "@jupyterlab/lsp-extension": "~4.0.6",
        "@jupyterlab/mainmenu": "~4.0.6",
        "@jupyterlab/mainmenu-extension": "~4.0.6",
        "@jupyterlab/markdownviewer": "~4.0.6",
        "@jupyterlab/markdownviewer-extension": "~4.0.6",
        "@jupyterlab/markedparser-extension": "~4.0.6",
        "@jupyterlab/mathjax-extension": "~4.0.6",
        "@jupyterlab/metadataform": "~4.0.6",
        "@jupyterlab/metadataform-extension": "~4.0.6",
        "@jupyterlab/metapackage": "~4.0.6",
        "@jupyterlab/nbconvert-css": "~4.0.6",
        "@jupyterlab/nbformat": "~4.0.6",
        "@jupyterlab/notebook": "~4.0.6",
        "@jupyterlab/notebook-extension": "~4.0.6",
        "@jupyterlab/observables": "~5.0.6",
        "@jupyterlab/outputarea": "~4.0.6",
        "@jupyterlab/pdf-extension": "~4.0.6",
        "@jupyterlab/property-inspector": "~4.0.6",
        "@jupyterlab/rendermime": "~4.0.6",
        "@jupyterlab/rendermime-extension": "~4.0.6",
        "@jupyterlab/rendermime-interfaces": "~3.8.6",
        "@jupyterlab/running": "~4.0.6",
        "@jupyterlab/running-extension": "~4.0.6",
        "@jupyterlab/services": "~7.0.6",
        "@jupyterlab/settingeditor": "~4.0.6",
        "@jupyterlab/settingeditor-extension": "~4.0.6",
        "@jupyterlab/settingregistry": "~4.0.6",
        "@jupyterlab/shortcuts-extension": "~4.0.6",
        "@jupyterlab/statedb": "~4.0.6",
        "@jupyterlab/statusbar": "~4.0.6",
        "@jupyterlab/statusbar-extension": "~4.0.6",
        "@jupyterlab/terminal": "~4.0.6",
        "@jupyterlab/terminal-extension": "~4.0.6",
        "@jupyterlab/theme-dark-extension": "~4.0.6",
        "@jupyterlab/theme-light-extension": "~4.0.6",
        "@jupyterlab/toc": "~6.0.6",
        "@jupyterlab/toc-extension": "~6.0.6",
        "@jupyterlab/tooltip": "~4.0.6",
        "@jupyterlab/tooltip-extension": "~4.0.6",
        "@jupyterlab/translation": "~4.0.6",
        "@jupyterlab/translation-extension": "~4.0.6",
        "@jupyterlab/ui-components": "~4.0.6",
        "@jupyterlab/ui-components-extension": "~4.0.6",
        "@jupyterlab/vega5-extension": "~4.0.6",
        "@lezer/common": "^1.0.0",
        "@lezer/highlight": "^1.0.0",
        "@lumino/algorithm": "^2.0.0",
        "@lumino/application": "^2.0.1",
        "@lumino/commands": "^2.0.1",
        "@lumino/coreutils": "^2.0.0",
        "@lumino/datagrid": "^2.0.1",
        "@lumino/disposable": "^2.0.0",
        "@lumino/domutils": "^2.0.0",
        "@lumino/dragdrop": "^2.0.0",
        "@lumino/keyboard": "^2.0.0",
        "@lumino/messaging": "^2.0.0",
        "@lumino/polling": "^2.0.0",
        "@lumino/properties": "^2.0.0",
        "@lumino/signaling": "^2.0.0",
        "@lumino/virtualdom": "^2.0.0",
        "@lumino/widgets": "^2.0.1",
        "react": "^18.2.0",
        "react-dom": "^18.2.0",
        "yjs": "^13.5.40"
    },
    "dependencies": {
        "@jupyterlab/application": "~4.0.6",
        "@jupyterlab/application-extension": "~4.0.6",
        "@jupyterlab/apputils-extension": "~4.0.6",
        "@jupyterlab/cell-toolbar-extension": "~4.0.6",
        "@jupyterlab/celltags-extension": "~4.0.6",
        "@jupyterlab/codemirror-extension": "~4.0.6",
        "@jupyterlab/completer-extension": "~4.0.6",
        "@jupyterlab/console-extension": "~4.0.6",
        "@jupyterlab/coreutils": "~6.0.6",
        "@jupyterlab/csvviewer-extension": "~4.0.6",
        "@jupyterlab/debugger-extension": "~4.0.6",
        "@jupyterlab/docmanager-extension": "~4.0.6",
        "@jupyterlab/documentsearch-extension": "~4.0.6",
        "@jupyterlab/extensionmanager-extension": "~4.0.6",
        "@jupyterlab/filebrowser-extension": "~4.0.6",
        "@jupyterlab/fileeditor-extension": "~4.0.6",
        "@jupyterlab/help-extension": "~4.0.6",
        "@jupyterlab/htmlviewer-extension": "~4.0.6",
        "@jupyterlab/hub-extension": "~4.0.6",
        "@jupyterlab/imageviewer-extension": "~4.0.6",
        "@jupyterlab/inspector-extension": "~4.0.6",
        "@jupyterlab/javascript-extension": "~4.0.6",
        "@jupyterlab/json-extension": "~4.0.6",
        "@jupyterlab/launcher-extension": "~4.0.6",
        "@jupyterlab/logconsole-extension": "~4.0.6",
        "@jupyterlab/lsp-extension": "~4.0.6",
        "@jupyterlab/mainmenu-extension": "~4.0.6",
        "@jupyterlab/markdownviewer-extension": "~4.0.6",
        "@jupyterlab/markedparser-extension": "~4.0.6",
        "@jupyterlab/mathjax-extension": "~4.0.6",
        "@jupyterlab/metadataform-extension": "~4.0.6",
        "@jupyterlab/notebook-extension": "~4.0.6",
        "@jupyterlab/pdf-extension": "~4.0.6",
        "@jupyterlab/rendermime-extension": "~4.0.6",
        "@jupyterlab/running-extension": "~4.0.6",
        "@jupyterlab/settingeditor-extension": "~4.0.6",
        "@jupyterlab/shortcuts-extension": "~4.0.6",
        "@jupyterlab/statusbar-extension": "~4.0.6",
        "@jupyterlab/terminal-extension": "~4.0.6",
        "@jupyterlab/theme-dark-extension": "~4.0.6",
        "@jupyterlab/theme-light-extension": "~4.0.6",
        "@jupyterlab/toc-extension": "~6.0.6",
        "@jupyterlab/tooltip-extension": "~4.0.6",
        "@jupyterlab/translation-extension": "~4.0.6",
        "@jupyterlab/ui-components-extension": "~4.0.6",
        "@jupyterlab/vega5-extension": "~4.0.6"
    },
    "devDependencies": {
        "@jupyterlab/builder": "^4.0.6",
        "@jupyterlab/buildutils": "^4.0.6",
        "chokidar": "^3.4.0",
        "css-loader": "^6.7.1",
        "duplicate-package-checker-webpack-plugin": "^3.0.0",
        "fs-extra": "^10.1.0",
        "glob": "~7.1.6",
        "handlebars": "^4.5.3",
        "html-loader": "~1.3.0",
        "html-webpack-plugin": "^5.5.0",
        "license-webpack-plugin": "^4.0.2",
        "mini-css-extract-plugin": "^2.7.0",
        "mini-svg-data-uri": "^1.4.4",
        "rimraf": "~3.0.0",
        "sort-package-json": "~1.53.1",
        "source-map-loader": "~1.0.2",
        "style-loader": "~3.3.1",
        "terser-webpack-plugin": "^5.3.7",
        "webpack": "^5.76.1",
        "webpack-bundle-analyzer": "^4.8.0",
        "webpack-cli": "^5.0.1",
        "webpack-merge": "^5.8.0",
        "whatwg-fetch": "^3.0.0",
        "worker-loader": "^3.0.2"
    },
    "engines": {
        "node": ">=18.0.0"
    },
    "jupyterlab": {
        "name": "JupyterLab",
        "version": "4.0.6",
        "extensions": {
            "@jupyterlab/application-extension": "",
            "@jupyterlab/apputils-extension": "",
            "@jupyterlab/cell-toolbar-extension": "",
            "@jupyterlab/celltags-extension": "",
            "@jupyterlab/codemirror-extension": "",
            "@jupyterlab/completer-extension": "",
            "@jupyterlab/console-extension": "",
            "@jupyterlab/csvviewer-extension": "",
            "@jupyterlab/debugger-extension": "",
            "@jupyterlab/docmanager-extension": "",
            "@jupyterlab/documentsearch-extension": "",
            "@jupyterlab/extensionmanager-extension": "",
            "@jupyterlab/filebrowser-extension": "",
            "@jupyterlab/fileeditor-extension": "",
            "@jupyterlab/help-extension": "",
            "@jupyterlab/htmlviewer-extension": "",
            "@jupyterlab/hub-extension": "",
            "@jupyterlab/imageviewer-extension": "",
            "@jupyterlab/inspector-extension": "",
            "@jupyterlab/launcher-extension": "",
            "@jupyterlab/logconsole-extension": "",
            "@jupyterlab/lsp-extension": "",
            "@jupyterlab/mainmenu-extension": "",
            "@jupyterlab/markdownviewer-extension": "",
            "@jupyterlab/markedparser-extension": "",
            "@jupyterlab/mathjax-extension": "",
            "@jupyterlab/metadataform-extension": "",
            "@jupyterlab/notebook-extension": "",
            "@jupyterlab/rendermime-extension": "",
            "@jupyterlab/running-extension": "",
            "@jupyterlab/settingeditor-extension": "",
            "@jupyterlab/shortcuts-extension": "",
            "@jupyterlab/statusbar-extension": "",
            "@jupyterlab/terminal-extension": "",
            "@jupyterlab/theme-dark-extension": "",
            "@jupyterlab/theme-light-extension": "",
            "@jupyterlab/toc-extension": "",
            "@jupyterlab/tooltip-extension": "",
            "@jupyterlab/translation-extension": "",
            "@jupyterlab/ui-components-extension": ""
        },
        "mimeExtensions": {
            "@jupyterlab/javascript-extension": "",
            "@jupyterlab/json-extension": "",
            "@jupyterlab/pdf-extension": "",
            "@jupyterlab/vega5-extension": ""
        },
        "buildDir": "./build",
        "outputDir": "..",
        "singletonPackages": [
            "@codemirror/language",
            "@codemirror/state",
            "@codemirror/view",
            "@jupyter/ydoc",
            "@jupyterlab/application",
            "@jupyterlab/apputils",
            "@jupyterlab/cell-toolbar",
            "@jupyterlab/codeeditor",
            "@jupyterlab/codemirror",
            "@jupyterlab/completer",
            "@jupyterlab/console",
            "@jupyterlab/coreutils",
            "@jupyterlab/debugger",
            "@jupyterlab/docmanager",
            "@jupyterlab/documentsearch",
            "@jupyterlab/extensionmanager",
            "@jupyterlab/filebrowser",
            "@jupyterlab/fileeditor",
            "@jupyterlab/htmlviewer",
            "@jupyterlab/imageviewer",
            "@jupyterlab/inspector",
            "@jupyterlab/launcher",
            "@jupyterlab/logconsole",
            "@jupyterlab/lsp",
            "@jupyterlab/mainmenu",
            "@jupyterlab/markdownviewer",
            "@jupyterlab/metadataform",
            "@jupyterlab/notebook",
            "@jupyterlab/rendermime",
            "@jupyterlab/rendermime-interfaces",
            "@jupyterlab/services",
            "@jupyterlab/settingeditor",
            "@jupyterlab/settingregistry",
            "@jupyterlab/statedb",
            "@jupyterlab/statusbar",
            "@jupyterlab/terminal",
            "@jupyterlab/toc",
            "@jupyterlab/tooltip",
            "@jupyterlab/translation",
            "@jupyterlab/ui-components",
            "@lezer/common",
            "@lezer/highlight",
            "@lumino/algorithm",
            "@lumino/application",
            "@lumino/commands",
            "@lumino/coreutils",
            "@lumino/datagrid",
            "@lumino/disposable",
            "@lumino/domutils",
            "@lumino/dragdrop",
            "@lumino/keyboard",
            "@lumino/messaging",
            "@lumino/polling",
            "@lumino/properties",
            "@lumino/signaling",
            "@lumino/virtualdom",
            "@lumino/widgets",
            "react",
            "react-dom",
            "yjs"
        ],
        "linkedPackages": {},
        "staticDir": "../static"
    }
}
extension bqplot key @lumino/messaging core val ^2.0.0 extension val ^1
extension bqplot key @lumino/widgets core val ^2.0.1 extension val ^1
extension jupyterlab-plotly key @lumino/messaging core val ^2.0.0 extension val ^1.2.3
extension jupyterlab-plotly key @lumino/widgets core val ^2.0.1 extension val ^1.8.1
/Users/paddy/cyto/env/share/jupyter/labextensions
        cytoexension v0.2.0 enabled OK
        ipydatagrid v1.3.0 enabled OK
        jupyterlab_pygments v0.3.0 enabled OK (python, jupyterlab_pygments)
        bqplot v0.5.44 enabled  X (python, bqplot)
        nbdime-jupyterlab v3.0.1 enabled OK
        jupyter-matplotlib v0.11.4 enabled OK
        ipyevents v2.0.1 enabled OK
        jupyterlab-plotly v5.13.1 enabled  X
        @jupyter-lsp/jupyterlab-lsp v5.0.3 enabled OK (python, jupyterlab-lsp)
        @voila-dashboards/jupyterlab-preview v2.3.7 enabled OK (python, voila)
        @jupyterlab/git v0.50.1 enabled OK (python, jupyterlab-git)
        @jupyter-widgets/jupyterlab-manager v5.0.11 enabled OK (python, jupyterlab_widgets)

   The following extensions are outdated:
        bqplot
        jupyterlab-plotly

   Consider checking if an update is available for these packages.

Disabled extensions:
    @jupyterlab/completer-extension:base-service
    @jupyterlab/fileeditor-extension:language-server
    @jupyterlab/lsp-extension:settings
    @jupyterlab/notebook-extension:language-server
{
    "name": "@jupyterlab/application-top",
    "version": "4.0.6",
    "private": true,
    "license": "BSD-3-Clause",
    "scripts": {
        "build": "npm run clean && webpack",
        "build:dev": "npm run build",
        "build:prod": "webpack --config webpack.prod.config.js",
        "build:prod:minimize": "webpack --config webpack.prod.minimize.config.js",
        "build:prod:minimize:report": "npm run build:prod:minimize:stats && webpack-bundle-analyzer --no-open --mode static --report static/webpack-bundle-analyzer.html stats.json static",
        "build:prod:minimize:stats": "webpack --profile --config webpack.prod.minimize.config.js --json > stats.json",
        "build:prod:release": "webpack --config webpack.prod.release.config.js",
        "build:stats": "webpack --profile --json > stats.json",
        "clean": "rimraf build",
        "prepublishOnly": "npm run build",
        "watch": "webpack --watch"
    },
    "resolutions": {
        "@codemirror/language": "^6.0.0",
        "@codemirror/state": "^6.2.0",
        "@codemirror/view": "^6.9.6",
        "@jupyter/ydoc": "~1.0.2",
        "@jupyterlab/application": "~4.0.6",
        "@jupyterlab/application-extension": "~4.0.6",
        "@jupyterlab/apputils": "~4.1.6",
        "@jupyterlab/apputils-extension": "~4.0.6",
        "@jupyterlab/attachments": "~4.0.6",
        "@jupyterlab/cell-toolbar": "~4.0.6",
        "@jupyterlab/cell-toolbar-extension": "~4.0.6",
        "@jupyterlab/cells": "~4.0.6",
        "@jupyterlab/celltags-extension": "~4.0.6",
        "@jupyterlab/codeeditor": "~4.0.6",
        "@jupyterlab/codemirror": "~4.0.6",
        "@jupyterlab/codemirror-extension": "~4.0.6",
        "@jupyterlab/completer": "~4.0.6",
        "@jupyterlab/completer-extension": "~4.0.6",
        "@jupyterlab/console": "~4.0.6",
        "@jupyterlab/console-extension": "~4.0.6",
        "@jupyterlab/coreutils": "~6.0.6",
        "@jupyterlab/csvviewer": "~4.0.6",
        "@jupyterlab/csvviewer-extension": "~4.0.6",
        "@jupyterlab/debugger": "~4.0.6",
        "@jupyterlab/debugger-extension": "~4.0.6",
        "@jupyterlab/docmanager": "~4.0.6",
        "@jupyterlab/docmanager-extension": "~4.0.6",
        "@jupyterlab/docregistry": "~4.0.6",
        "@jupyterlab/documentsearch": "~4.0.6",
        "@jupyterlab/documentsearch-extension": "~4.0.6",
        "@jupyterlab/extensionmanager": "~4.0.6",
        "@jupyterlab/extensionmanager-extension": "~4.0.6",
        "@jupyterlab/filebrowser": "~4.0.6",
        "@jupyterlab/filebrowser-extension": "~4.0.6",
        "@jupyterlab/fileeditor": "~4.0.6",
        "@jupyterlab/fileeditor-extension": "~4.0.6",
        "@jupyterlab/help-extension": "~4.0.6",
        "@jupyterlab/htmlviewer": "~4.0.6",
        "@jupyterlab/htmlviewer-extension": "~4.0.6",
        "@jupyterlab/hub-extension": "~4.0.6",
        "@jupyterlab/imageviewer": "~4.0.6",
        "@jupyterlab/imageviewer-extension": "~4.0.6",
        "@jupyterlab/inspector": "~4.0.6",
        "@jupyterlab/inspector-extension": "~4.0.6",
        "@jupyterlab/javascript-extension": "~4.0.6",
        "@jupyterlab/json-extension": "~4.0.6",
        "@jupyterlab/launcher": "~4.0.6",
        "@jupyterlab/launcher-extension": "~4.0.6",
        "@jupyterlab/logconsole": "~4.0.6",
        "@jupyterlab/logconsole-extension": "~4.0.6",
        "@jupyterlab/lsp": "~4.0.6",
        "@jupyterlab/lsp-extension": "~4.0.6",
        "@jupyterlab/mainmenu": "~4.0.6",
        "@jupyterlab/mainmenu-extension": "~4.0.6",
        "@jupyterlab/markdownviewer": "~4.0.6",
        "@jupyterlab/markdownviewer-extension": "~4.0.6",
        "@jupyterlab/markedparser-extension": "~4.0.6",
        "@jupyterlab/mathjax-extension": "~4.0.6",
        "@jupyterlab/metadataform": "~4.0.6",
        "@jupyterlab/metadataform-extension": "~4.0.6",
        "@jupyterlab/metapackage": "~4.0.6",
        "@jupyterlab/nbconvert-css": "~4.0.6",
        "@jupyterlab/nbformat": "~4.0.6",
        "@jupyterlab/notebook": "~4.0.6",
        "@jupyterlab/notebook-extension": "~4.0.6",
        "@jupyterlab/observables": "~5.0.6",
        "@jupyterlab/outputarea": "~4.0.6",
        "@jupyterlab/pdf-extension": "~4.0.6",
        "@jupyterlab/property-inspector": "~4.0.6",
        "@jupyterlab/rendermime": "~4.0.6",
        "@jupyterlab/rendermime-extension": "~4.0.6",
        "@jupyterlab/rendermime-interfaces": "~3.8.6",
        "@jupyterlab/running": "~4.0.6",
        "@jupyterlab/running-extension": "~4.0.6",
        "@jupyterlab/services": "~7.0.6",
        "@jupyterlab/settingeditor": "~4.0.6",
        "@jupyterlab/settingeditor-extension": "~4.0.6",
        "@jupyterlab/settingregistry": "~4.0.6",
        "@jupyterlab/shortcuts-extension": "~4.0.6",
        "@jupyterlab/statedb": "~4.0.6",
        "@jupyterlab/statusbar": "~4.0.6",
        "@jupyterlab/statusbar-extension": "~4.0.6",
        "@jupyterlab/terminal": "~4.0.6",
        "@jupyterlab/terminal-extension": "~4.0.6",
        "@jupyterlab/theme-dark-extension": "~4.0.6",
        "@jupyterlab/theme-light-extension": "~4.0.6",
        "@jupyterlab/toc": "~6.0.6",
        "@jupyterlab/toc-extension": "~6.0.6",
        "@jupyterlab/tooltip": "~4.0.6",
        "@jupyterlab/tooltip-extension": "~4.0.6",
        "@jupyterlab/translation": "~4.0.6",
        "@jupyterlab/translation-extension": "~4.0.6",
        "@jupyterlab/ui-components": "~4.0.6",
        "@jupyterlab/ui-components-extension": "~4.0.6",
        "@jupyterlab/vega5-extension": "~4.0.6",
        "@lezer/common": "^1.0.0",
        "@lezer/highlight": "^1.0.0",
        "@lumino/algorithm": "^2.0.0",
        "@lumino/application": "^2.0.1",
        "@lumino/commands": "^2.0.1",
        "@lumino/coreutils": "^2.0.0",
        "@lumino/datagrid": "^2.0.1",
        "@lumino/disposable": "^2.0.0",
        "@lumino/domutils": "^2.0.0",
        "@lumino/dragdrop": "^2.0.0",
        "@lumino/keyboard": "^2.0.0",
        "@lumino/messaging": "^2.0.0",
        "@lumino/polling": "^2.0.0",
        "@lumino/properties": "^2.0.0",
        "@lumino/signaling": "^2.0.0",
        "@lumino/virtualdom": "^2.0.0",
        "@lumino/widgets": "^2.0.1",
        "react": "^18.2.0",
        "react-dom": "^18.2.0",
        "yjs": "^13.5.40"
    },
    "dependencies": {
        "@jupyterlab/application": "~4.0.6",
        "@jupyterlab/application-extension": "~4.0.6",
        "@jupyterlab/apputils-extension": "~4.0.6",
        "@jupyterlab/cell-toolbar-extension": "~4.0.6",
        "@jupyterlab/celltags-extension": "~4.0.6",
        "@jupyterlab/codemirror-extension": "~4.0.6",
        "@jupyterlab/completer-extension": "~4.0.6",
        "@jupyterlab/console-extension": "~4.0.6",
        "@jupyterlab/coreutils": "~6.0.6",
        "@jupyterlab/csvviewer-extension": "~4.0.6",
        "@jupyterlab/debugger-extension": "~4.0.6",
        "@jupyterlab/docmanager-extension": "~4.0.6",
        "@jupyterlab/documentsearch-extension": "~4.0.6",
        "@jupyterlab/extensionmanager-extension": "~4.0.6",
        "@jupyterlab/filebrowser-extension": "~4.0.6",
        "@jupyterlab/fileeditor-extension": "~4.0.6",
        "@jupyterlab/help-extension": "~4.0.6",
        "@jupyterlab/htmlviewer-extension": "~4.0.6",
        "@jupyterlab/hub-extension": "~4.0.6",
        "@jupyterlab/imageviewer-extension": "~4.0.6",
        "@jupyterlab/inspector-extension": "~4.0.6",
        "@jupyterlab/javascript-extension": "~4.0.6",
        "@jupyterlab/json-extension": "~4.0.6",
        "@jupyterlab/launcher-extension": "~4.0.6",
        "@jupyterlab/logconsole-extension": "~4.0.6",
        "@jupyterlab/lsp-extension": "~4.0.6",
        "@jupyterlab/mainmenu-extension": "~4.0.6",
        "@jupyterlab/markdownviewer-extension": "~4.0.6",
        "@jupyterlab/markedparser-extension": "~4.0.6",
        "@jupyterlab/mathjax-extension": "~4.0.6",
        "@jupyterlab/metadataform-extension": "~4.0.6",
        "@jupyterlab/notebook-extension": "~4.0.6",
        "@jupyterlab/pdf-extension": "~4.0.6",
        "@jupyterlab/rendermime-extension": "~4.0.6",
        "@jupyterlab/running-extension": "~4.0.6",
        "@jupyterlab/settingeditor-extension": "~4.0.6",
        "@jupyterlab/shortcuts-extension": "~4.0.6",
        "@jupyterlab/statusbar-extension": "~4.0.6",
        "@jupyterlab/terminal-extension": "~4.0.6",
        "@jupyterlab/theme-dark-extension": "~4.0.6",
        "@jupyterlab/theme-light-extension": "~4.0.6",
        "@jupyterlab/toc-extension": "~6.0.6",
        "@jupyterlab/tooltip-extension": "~4.0.6",
        "@jupyterlab/translation-extension": "~4.0.6",
        "@jupyterlab/ui-components-extension": "~4.0.6",
        "@jupyterlab/vega5-extension": "~4.0.6"
    },
    "devDependencies": {
        "@jupyterlab/builder": "^4.0.6",
        "@jupyterlab/buildutils": "^4.0.6",
        "chokidar": "^3.4.0",
        "css-loader": "^6.7.1",
        "duplicate-package-checker-webpack-plugin": "^3.0.0",
        "fs-extra": "^10.1.0",
        "glob": "~7.1.6",
        "handlebars": "^4.5.3",
        "html-loader": "~1.3.0",
        "html-webpack-plugin": "^5.5.0",
        "license-webpack-plugin": "^4.0.2",
        "mini-css-extract-plugin": "^2.7.0",
        "mini-svg-data-uri": "^1.4.4",
        "rimraf": "~3.0.0",
        "sort-package-json": "~1.53.1",
        "source-map-loader": "~1.0.2",
        "style-loader": "~3.3.1",
        "terser-webpack-plugin": "^5.3.7",
        "webpack": "^5.76.1",
        "webpack-bundle-analyzer": "^4.8.0",
        "webpack-cli": "^5.0.1",
        "webpack-merge": "^5.8.0",
        "whatwg-fetch": "^3.0.0",
        "worker-loader": "^3.0.2"
    },
    "engines": {
        "node": ">=18.0.0"
    },
    "jupyterlab": {
        "name": "JupyterLab",
        "version": "4.0.6",
        "extensions": {
            "@jupyterlab/application-extension": "",
            "@jupyterlab/apputils-extension": "",
            "@jupyterlab/cell-toolbar-extension": "",
            "@jupyterlab/celltags-extension": "",
            "@jupyterlab/codemirror-extension": "",
            "@jupyterlab/completer-extension": "",
            "@jupyterlab/console-extension": "",
            "@jupyterlab/csvviewer-extension": "",
            "@jupyterlab/debugger-extension": "",
            "@jupyterlab/docmanager-extension": "",
            "@jupyterlab/documentsearch-extension": "",
            "@jupyterlab/extensionmanager-extension": "",
            "@jupyterlab/filebrowser-extension": "",
            "@jupyterlab/fileeditor-extension": "",
            "@jupyterlab/help-extension": "",
            "@jupyterlab/htmlviewer-extension": "",
            "@jupyterlab/hub-extension": "",
            "@jupyterlab/imageviewer-extension": "",
            "@jupyterlab/inspector-extension": "",
            "@jupyterlab/launcher-extension": "",
            "@jupyterlab/logconsole-extension": "",
            "@jupyterlab/lsp-extension": "",
            "@jupyterlab/mainmenu-extension": "",
            "@jupyterlab/markdownviewer-extension": "",
            "@jupyterlab/markedparser-extension": "",
            "@jupyterlab/mathjax-extension": "",
            "@jupyterlab/metadataform-extension": "",
            "@jupyterlab/notebook-extension": "",
            "@jupyterlab/rendermime-extension": "",
            "@jupyterlab/running-extension": "",
            "@jupyterlab/settingeditor-extension": "",
            "@jupyterlab/shortcuts-extension": "",
            "@jupyterlab/statusbar-extension": "",
            "@jupyterlab/terminal-extension": "",
            "@jupyterlab/theme-dark-extension": "",
            "@jupyterlab/theme-light-extension": "",
            "@jupyterlab/toc-extension": "",
            "@jupyterlab/tooltip-extension": "",
            "@jupyterlab/translation-extension": "",
            "@jupyterlab/ui-components-extension": ""
        },
        "mimeExtensions": {
            "@jupyterlab/javascript-extension": "",
            "@jupyterlab/json-extension": "",
            "@jupyterlab/pdf-extension": "",
            "@jupyterlab/vega5-extension": ""
        },
        "buildDir": "./build",
        "outputDir": "..",
        "singletonPackages": [
            "@codemirror/language",
            "@codemirror/state",
            "@codemirror/view",
            "@jupyter/ydoc",
            "@jupyterlab/application",
            "@jupyterlab/apputils",
            "@jupyterlab/cell-toolbar",
            "@jupyterlab/codeeditor",
            "@jupyterlab/codemirror",
            "@jupyterlab/completer",
            "@jupyterlab/console",
            "@jupyterlab/coreutils",
            "@jupyterlab/debugger",
            "@jupyterlab/docmanager",
            "@jupyterlab/documentsearch",
            "@jupyterlab/extensionmanager",
            "@jupyterlab/filebrowser",
            "@jupyterlab/fileeditor",
            "@jupyterlab/htmlviewer",
            "@jupyterlab/imageviewer",
            "@jupyterlab/inspector",
            "@jupyterlab/launcher",
            "@jupyterlab/logconsole",
            "@jupyterlab/lsp",
            "@jupyterlab/mainmenu",
            "@jupyterlab/markdownviewer",
            "@jupyterlab/metadataform",
            "@jupyterlab/notebook",
            "@jupyterlab/rendermime",
            "@jupyterlab/rendermime-interfaces",
            "@jupyterlab/services",
            "@jupyterlab/settingeditor",
            "@jupyterlab/settingregistry",
            "@jupyterlab/statedb",
            "@jupyterlab/statusbar",
            "@jupyterlab/terminal",
            "@jupyterlab/toc",
            "@jupyterlab/tooltip",
            "@jupyterlab/translation",
            "@jupyterlab/ui-components",
            "@lezer/common",
            "@lezer/highlight",
            "@lumino/algorithm",
            "@lumino/application",
            "@lumino/commands",
            "@lumino/coreutils",
            "@lumino/datagrid",
            "@lumino/disposable",
            "@lumino/domutils",
            "@lumino/dragdrop",
            "@lumino/keyboard",
            "@lumino/messaging",
            "@lumino/polling",
            "@lumino/properties",
            "@lumino/signaling",
            "@lumino/virtualdom",
            "@lumino/widgets",
            "react",
            "react-dom",
            "yjs"
        ],
        "linkedPackages": {},
        "staticDir": "../static"
    }
}
extension bqplot key @lumino/messaging core val ^2.0.0 extension val ^1
extension bqplot key @lumino/widgets core val ^2.0.1 extension val ^1
extension jupyterlab-plotly key @lumino/messaging core val ^2.0.0 extension val ^1.2.3
extension jupyterlab-plotly key @lumino/widgets core val ^2.0.1 extension val ^1.8.1
paddymul commented 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.

trungleduc commented 3 months ago

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.

paddymul commented 3 months ago

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.

trungleduc commented 3 months ago

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?

paddymul commented 3 months ago

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.

trungleduc commented 3 months ago

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.

paddymul commented 3 months ago

what commands do you want me to run at the console.

paddymul commented 3 months ago

I have a sense that this bug is some sort of race condition, because it works for a lot of our stuff, then fails

trungleduc commented 3 months ago

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.

paddymul commented 3 months ago

Want to setup a screenshare?

trungleduc commented 3 months ago

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.

martinRenou commented 3 months ago

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)

paddymul commented 3 months ago

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?

paddymul commented 3 months ago

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

maartenbreddels commented 3 months ago

Would indeed be nice to reproduce this and give a better error msg. Can you give a reproducible example Paddy?

paddymul commented 3 months ago

I will work on a reproduction of the bug.