Skip to content

Jupyter Kernel Fails to Start Over Remote-SSH: ‘Unexpected end of JSON input’ Error #25172

Open
@Xinwan-E-Hu

Description

@Xinwan-E-Hu

Environment data

  • VS Code version: 1.100.3 (Remote-SSH)
  • Jupyter Extension version (available under the Extensions sidebar): 2025.4.1
  • Python Extension version (available under the Extensions sidebar): 2025.6.1
  • OS (Windows | Mac | Linux distro) and version: macOS (local), Ubuntu (remote)
  • Python and/or Anaconda version: Python 3.10.14 (Anaconda)
  • Type of virtual environment used (N/A | venv | virtualenv | conda | ...): conda
  • Jupyter server running: Remote

Expected behaviour

The embodied_metalearning Jupyter kernel should launch and allow code cells to execute in .ipynb files when connected via VS Code Remote-SSH.

Actual behaviour

The Jupyter kernel fails to start with the error:
SyntaxError: Unexpected end of JSON input.
Only the R kernel is detected, and Python kernels appear missing.
Running Python scripts in the terminal also fails with the same error.
When accessing the same machine via TeamViewer, everything works fine — including running Jupyter Lab manually. And works well when other people ssh to it.

Steps to reproduce:

[NOTE: Self-contained, minimal reproducing code samples are extremely helpful and will expedite addressing your issue]

  1. SSH into remote machine ([email protected]) via VS Code Remote-SSH
  2. Activate Conda environment (conda activate embodied_metalearning)
  3. Open a Jupyter notebook
  4. Select kernel "Python (embodied_metalearning)"
  5. Attempt to execute a cell

Logs

Output for Jupyter in the Output panel (ViewOutput, change the drop-down the upper-right of the Output panel to Jupyter)

[warn] Failed to get Python interpreter details from Python Extension API for ~/anaconda3/envs/embodied_metalearning/bin/python SyntaxError: Unexpected end of JSON input  
[error] Failed to connect raw kernel session: SyntaxError: Unexpected end of JSON input  
[warn] Kernel Error, context = start Error: Failed to start the Kernel 'embodied_metalearning (Python 3.10.14)'  
[error] Failed to shutdown kernel... Cannot read properties of undefined (reading 'dispose')

Output for Jupyter in the Output panel (ViewOutput, change the drop-down the upper-right of the Output panel to Jupyter)

XXX

Metadata

Metadata

Assignees

Labels

bugIssue identified by VS Code Team member as probable bugtriage-neededNeeds assignment to the proper sub-team

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions