vscode-jupyter: The editor could not be opened due to an unexpected error: Cannot read properties of undefined
Type: Bug
I’m working remotely and very often loose connection to the jupyter server. The workflow if that happens need to improve a bit, there are too many popup alerts… Right now this happened to my notebook after I got disconnected and connected again.

Extension version: 2022.9.1002511105 VS Code version: Code 1.71.2 (74b1f979648cc44d385a2286793c226e611f59e7, 2022-09-14T21:07:15.900Z) OS version: Darwin arm64 20.6.0 Modes: Sandboxed: No Remote OS version: Linux x64 4.18.0-348.12.2.el8_5.x86_64
System Info
Item | Value |
---|---|
CPUs | Apple M1 (8 x 24) |
GPU Status | 2d_canvas: enabled canvas_oop_rasterization: disabled_off direct_rendering_display_compositor: disabled_off_ok gpu_compositing: enabled metal: disabled_off multiple_raster_threads: enabled_on opengl: enabled_on rasterization: enabled raw_draw: disabled_off_ok skia_renderer: enabled_on video_decode: enabled video_encode: enabled vulkan: disabled_off webgl: enabled webgl2: enabled webgpu: disabled_off |
Load (avg) | 1, 2, 2 |
Memory (System) | 16.00GB (0.30GB free) |
Process Argv | –crash-reporter-id 4cf64333-f132-4c56-a15d-29c771efde05 |
Screen Reader | no |
VM | 0% |
Item | Value |
---|---|
Remote | SSH: ber |
OS | Linux x64 4.18.0-348.12.2.el8_5.x86_64 |
CPUs | AMD EPYC 7502 32-Core Processor (128 x 2977) |
Memory (System) | 503.46GB (340.95GB free) |
VM | 0% |
A/B Experiments
vsliv368cf:30146710
vsreu685:30147344
python383cf:30185419
vspor879:30202332
vspor708:30202333
vspor363:30204092
vstes627:30244334
vslsvsres303:30308271
pythonvspyl392:30443607
vserr242cf:30382550
pythontb:30283811
vsjup518:30340749
pythonptprofiler:30281270
vsdfh931cf:30280410
vshan820:30294714
vstes263cf:30335440
vscoreces:30445986
pythondataviewer:30285071
vscod805cf:30301675
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
cmake_vspar411cf:30557515
vsaa593cf:30376535
pythonvs932:30410667
cppdebug:30492333
vsclangdc:30486549
c4g48928:30535728
hb751961:30553087
dsvsc012:30540252
azure-dev_surveyone:30548225
2144e591:30553903
fc301958:30573243
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 17
- Comments: 22 (1 by maintainers)
I had this issue with the error message
the editor could not be opened due to an unexpected error: Cannot read properties of undefined (reading 'onDidChangeContent')
. Using vscode locally on MacOS. I don’t use copilot. Reloading the window viaF1 > Developer: Reload Window
resolved the issue.Same issue in Feb’23 version of VSCode. I just can’t use it for longer than 10-15 minutes. Need to reload window to continue working.
Edit: It seems as if GitHub Copilot is causing the issue. Is anyone else using the Copilot extension?
I have the same issue here too; definitely, copilot that triggers the issue for me I wrote a message in the other thread.
Thank you all for your feedback and patience. This issue is now mitigated in latest VS Code Insiders and will be available in next Stable.
What happens is Copilot (or any other extension) crashes the extension host and then the serializer for ipynb notebook is no longer available. Even if the extension host is restarted, we fail to re-associate the serializer extension with the notebook document in the workbench/ui. This should now be improved, work happened in https://github.com/microsoft/vscode/issues/179224
Has anyone solved this problem?
I have this issue too; remote server, appears where my Jupyter notebooks should be. I use copilot.
EDIT: After coming to this thread and seeing that the issue was potentially associated with copilot, I noticed that the copilot extension had issued a warning that it required reloading. Once I reloaded copilot the issue was resolved.
We need to notify the copilot team. Opened a discussion here
Also have this issue. I use the copilot plugin.