Skip to content

Kernel occasionally hangs in the Pending state on the first cell #17234

@kirilllzaitsev

Description

@kirilllzaitsev

Applies To

  • Notebooks (.ipynb files)
  • Interactive Window and/or Cell Scripts (.py files with #%% markers)

What happened?

  • The notebook is started from the first cell which may never be completed:
Image
  • The issue can be solved by restarting the notebook (occasionally, restarting doesn't work, and only reloading the window helps).
  • This affects only part of the notebooks and may appear again if the notebook has been executed successfully in the past

VS Code Version

1.107.0

Jupyter Extension Version

2025.10.2025121801

Jupyter logs

23:11:57.648 [info] Starting Kernel (Python Path: ~/.conda/envs/e3d/bin/python, Conda, 3.10.19) for '/media/<username>/notebooks/d_ds.ipynb' (disableUI=true)
23:11:59.399 [info] Process Execution: ~/.conda/envs/e3d/bin/python -m pip list
23:11:59.438 [info] Process Execution: ~/.conda/envs/e3d/bin/python -c "import ipykernel; print(ipykernel.__version__); print("5dc3a68c-e34e-4080-9c3e-2a532b2ccb4d"); print(ipykernel.__file__)"
23:11:59.444 [info] Process Execution: ~/.conda/envs/e3d/bin/python -m ipykernel_launcher --f=/run/user/1000/jupyter/runtime/kernel-v3f84bac9f51505782c4717e20dd21a057adaaa983.json
    > cwd: /media/<username>/notebooks
23:12:00.240 [info] Kernel successfully started
23:12:00.541 [error] Widget Error: Failed to access CDN https://unpkg.com/ after 0 attempt(s), TypeError: Failed to fetch
23:12:01.380 [info] Starting Kernel (Python Path: ~/.conda/envs/e3d/bin/python, Conda, 3.10.19) for '/media/<username>/notebooks/d_sam3.ipynb' (disableUI=true)
23:12:01.433 [info] Process Execution: ~/.conda/envs/e3d/bin/python -c "import ipykernel; print(ipykernel.__version__); print("5dc3a68c-e34e-4080-9c3e-2a532b2ccb4d"); print(ipykernel.__file__)"
23:12:01.443 [info] Process Execution: ~/.conda/envs/e3d/bin/python -m ipykernel_launcher --f=/run/user/1000/jupyter/runtime/kernel-v3bcecd339b1ad405eec1470a1f8e97fe1c2887651.json
    > cwd: /media/<username>/notebooks
23:12:02.315 [info] Kernel successfully started
23:12:02.544 [error] Widget Error: Failed to access CDN https://unpkg.com/ after 0 attempt(s), TypeError: Failed to fetch

Coding Language and Runtime Version

Python 3.10.19

Language Extension Version (if applicable)

No response

Anaconda Version (if applicable)

No response

Running Jupyter locally or remotely?

None

Metadata

Metadata

Assignees

Labels

bugIssue identified by VS Code Team member as probable buginfo-neededIssue requires more information from posternotebook-executionKernels issues (start/restart/switch/execution, install ipykernel)

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions