code-server: [Bug]: Jupyter Notebook not working
Is there an existing issue for this?
- I have searched the existing issues
OS/Web Information
- Web Browser: Chrome
- Local OS: Any
- Remote OS: Docker (Unraid OS)
- Remote Architecture: AMD x64
- `code-server --version`: 4.0.1
Expected
[Notebook Creation]: Creation and opening of new .ipynb file with proper layout as shown in MS documentation [Notebook Opening]: Opening .ipynb file should result in proper layout shown with possibility of editing the notebook file.
Actual
[Notebook Creation]: Error message “Command ‘Jupyter: Create New Jupyter Notebook’ resulted in an error (NO provider registered for view type: ‘jupyter-notebook’)”, no file being created, black screen. [Notebook Opening]: Error message “Cannot open resource with notebook editor type ‘jupyter-notebook’, please check if you have the right extension installed or enabled.”, file content not shown, black screen.
Logs
In the following, the Chrome console output related to the situations mentioned above
[Notebook Creation]:
(node:11546) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.(Use `node --trace-deprecation ...` to show where the warning was created)
…
mainThreadExtensionService.ts:95 Activating extension 'vscode.ipynb' failed: Cannot find module '/usr/local/share/.config/yarn/global/node_modules/code-server/vendor/modules/code-oss-dev/extensions/ipynb/dist/ipynbMain.js'
Require stack:
- /usr/local/share/.config/yarn/global/node_modules/code-server/vendor/modules/code-oss-dev/out/vs/loader.js
- /usr/local/share/.config/yarn/global/node_modules/code-server/vendor/modules/code-oss-dev/out/bootstrap-amd.js
- /usr/local/share/.config/yarn/global/node_modules/code-server/vendor/modules/code-oss-dev/out/bootstrap-fork.js.
…
CRITI FAILED to destory notebook Error: NO provider registered for view type: 'jupyter-notebook'
at O.withNotebookDataProvider (notebookServiceImpl.ts:611:10)
at async u.createReferencedObject (notebookEditorModelResolverServiceImpl.ts:64:16)
at async a.resolve (notebookEditorModelResolverServiceImpl.ts:216:18)
at async l.$tryCreateNotebook (mainThreadNotebookDocuments.ts:131:15)
[Notebook Opening]:
mainThreadExtensionService.ts:95 Activating extension 'vscode.ipynb' failed: Cannot find module '/usr/local/share/.config/yarn/global/node_modules/code-server/vendor/modules/code-oss-dev/extensions/ipynb/dist/ipynbMain.js'
Require stack:
- /usr/local/share/.config/yarn/global/node_modules/code-server/vendor/modules/code-oss-dev/out/vs/loader.js
- /usr/local/share/.config/yarn/global/node_modules/code-server/vendor/modules/code-oss-dev/out/bootstrap-amd.js
- /usr/local/share/.config/yarn/global/node_modules/code-server/vendor/modules/code-oss-dev/out/bootstrap-fork.js.
Screenshot/Video
[Notebook Creation]:

[Notebook Opening]:

Content of folder /usr/local/share/.config/yarn/global/node_modules/code-server/vendor/modules/code-oss-dev/extensions/ipynb (Mentioned in the above errors)

Does this issue happen in VS Code?
- I cannot reproduce this in VS Code.
Are you accessing code-server over HTTPS?
- I am using HTTPS.
Notes
Trying to work with Jupiter Notebooks, unable to have it working with ms-python.python & ms-toolsai.jupyter extensions having tried both GUI and CLI (with code-server --install-extension) install methods.
Tried to look for other issues posted, no one seems to be similar as most were related to stuff regarding old code-server versions (prior to 4.0)
Tried with enviroments:
- Python 3.8.10
- Miniconda 3.9.5 Same errors in both cases
Nginx reverse proxy is used to access code-server
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 1
- Comments: 31 (17 by maintainers)
Yeah, just tried install script on ubuntu machine (so no Docker, just plain
code-server) and there is no problem whatsoever. At this point I’m pretty confident this is somehow related tolinuxserver/code-serverimage. I’ll wait for a feedback from @jsjoeio and than close this issue and open a new one in linuxserver repo. Thank for your help 😊@benz0li I will ask my admin if they can do the tls termination up front. I will update the progress in this issue! Thanks for your help 🙏 🙏
@crissed53 TLS termination should be done by Kubeflow not by the container image(s). Have a look at https://github.com/kubeflow/kubeflow/issues/5976.
ℹ️ For https://demo.jupyter.b-data.ch TLS termination is done by JupyterHub. The JupyterLab container exposes HTTP on port
8888and requests are proxied through JupyterHub.I swear this was working when we released 4.0.1. Looks like we’ll need to fix again 😢
I reproduced locally with 4.0.1 using macOS + Brave.
Thanks for raising this issue.
I can confirm it is 4.1.0. Sorry for the typo.
It is likely #4976, as I am also running CS via nginx on a domain.
I updated to 4.0.2 and now Jupyter Notebooks seem to be working fine…
So just to clarify, the error above is expected when running
code-serverlocally on MacOS (as was earlier reproduced with Brave, and I just reproduced on MacOS with Chrome andcode-server==4.0.2). I’ve tried opening a notebook after changing folder and am still faced with the following error (both with HTTP and HTTPS), installingms-python.pythonandms-toolsai.jupyteras user:Everything working properly with
codercom/code-server:4.0.1, too. One only needsapt-get update && apt-get -y install --no-install-recommends python3-venv python3-pipas root andms-python.pythonandms-toolsai.jupyteras user [coder].@vdallavalle How did you install
code-serveritself? If you install extensionms-toolsai.jupyterat system level [as root], you must take care of some stuff yourself, i.e. create itstmp-folder manually.👉 See https://gitlab.b-data.ch/jupyterlab/r/r-ver/-/blob/master/r-ver/latest.Dockerfile#L186-L188.
Thank you for the replay but none of your suggestions has to do with my case: as you can see from my nginx configuration I am indeed using https to connect with
code-server. Moreover I don’t usually access application under incoginto mode (I mean, why should I 😝). Actually it’s not clear in the images I posted but all my tests are within an opened folder (with File > Open Folder), so that’s not what causes my issue.You may also
docker run --rm -p 8888:8888 -e GEN_CERT=yes -v jupyter-user-jovyan:/home/jovyan [image]with any of the followingimages:registry.gitlab.b-data.ch/jupyterlab/r/r-verregistry.gitlab.b-data.ch/jupyterlab/r/tidyverseregistry.gitlab.b-data.ch/jupyterlab/r/verseregistry.gitlab.b-data.ch/jupyterlab/r/geospatialregistry.gitlab.b-data.ch/jupyterlab/julia/ver@jsjoeio Jupyter Notebooks work just fine: See https://demo.jupyter.b-data.ch for a reference deployment using JupyterHub and JupyterLab + code-server.
See https://github.com/coder/code-server/issues/4689#issuecomment-1006472915
plus