BadZipFile Error when launching pyodide kernel via JuptyerLiteServer
See original GitHub issueDescription
This issue is encountered when using the JuptyerLiteServer
class within thebe
.
The JupyterLiteServer appears to start successfully and begins initializing the kernel, but then an error occurs part way through initialization. This does not appear to be related to the wheels provided by JupyterLite, which appear to be loaded correctly – instead it appears to be an issue with package loading inside the pyodide kernel? is this potentially a configuration issue when using the server within thebe?
The javascript console shows:
The network tab shows:
The only 404 in the network list is related to the service worker. This has not been configured as it was assumed this was optional and needed only to enable the jupyterlite file system extension?
Reproduce
The issue is encountered in the development branch of thebe here: https://github.com/executablebooks/thebe/pull/569 It could be reproduced locally by:
- checkout the branch
- install 16, npm 8, turborepo
- cd thebe
- npm install
- npm run build; npm run build:demo
- cd apps/simple
- npm run start:simple
- Open a webrowser using the link shown in the console and go to the JupyterLite example
- Click activate
Expected behavior
Expecting the packages to load successfully
Context
- JupyterLite version: 0.1.0-beta.14
- Operating System and version: any
- Browser and version: any
Issue Analytics
- State:
- Created 10 months ago
- Comments:5 (3 by maintainers)
Top GitHub Comments
as a quick fix, you could roll back and hard pin to a version that doesn’t include the service worker/unified contents, then, e.g.
b9
. things are not going to work the way one expects if it’s half-deployed.otherwise, you’d need to correctly wire up the service worker before debugging files-in-kernels: for production sites, you’d absolutely want the serviceworker, if possible, as it provides a substantial cache benefit, especially for pyodide.
web server. what files actually get served. again, this would be easiest with a binder/readthedocs/CI log, basically anything other than having to debug your code locally.
Turns out the error above was due to webpack misconfiguration(!) resulting in files with
.whl
extensions that actually only contained webpack export statements. Closing this as there is a separate issue open for adding the service worker https://github.com/executablebooks/thebe/issues/575