-
Notifications
You must be signed in to change notification settings - Fork 2
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
Unexpected end of JSON input #32
Comments
I can reproduce just by disabling the service worker, although that gives me a different error: js-shell: ls
ErrnoError: Invalid argument Evidently the service worker is currently required. |
JupyterLite itself is able to use shared array buffers (when CORS isolated) instead of the service worker. This allows me to use the contents drive even without the service worker. Would it be possible that the terminal can also use either alternative? |
Here is where the Pyodide kernel switches between the comlink (service worker based) and coincident (shared array buffer based) worker: https://github.com/jupyterlite/pyodide-kernel/blob/6a2777961fcefb7ff4f0a907aad4726aea2f7e23/packages/pyodide-kernel/src/kernel.ts#L46 |
cockle, the project that implements the shell functionally used here, currently requires shared array buffer to work and hence this terminal extension does too. The service worker requirement must be due to the use of Future changes in this and indeed in everything else in both |
The lower prioritisation right now makes sense :) As far as I understand, DriveFS by default uses the service worker, but can be subclassed to use shared array buffers, which is what the pyodide-kernel uses. So in theory all needed code should already be there. |
Description
I'm trying out the
jupyterlite-terminal
extension in a custom JupyterLite deployment, which disables the service worker but runs in a secure context (so the contents drive is available). When executing any command, it fails with a JSON parse error.Reproduce
ls
commandExpected behavior
The terminal command should execute.
Context
Browser Output
The text was updated successfully, but these errors were encountered: