Repository navigation
Description
Title: Unable to connect to Colab kernel from VS Code (remote server not reachable)
Description
When trying to connect a Jupyter notebook (.ipynb) in VS Code to a Colab CPU kernel, VS Code shows an error popup:
Unable to connect to the remote server
Ensure the server is running and reachable.
The Colab kernel selection UI opens but fails immediately and no remote session is created. This happens consistently for every notebook, even after restarting VS Code. The Colab extension appears to attempt to contact a Colab-hosted URL but fails with DNS resolution (ENOTFOUND).
Environment
- VS Code version: 1.106.0
- Colab extension version: 0.1.1
- Jupyter extension version: 2025.9.1
- OS (Linux | Mac | Windows): Windows
- Python version shown in VS Code: 3.13.6
- Are you signed into a Google account inside VS Code? Yes
- Is local Jupyter installed? Yes (installed via
pip)
Repro Steps
- Open VS Code.
- Open a
.ipynbnotebook. - Click the kernel selector.
- Choose Colab CPU.
- The popup error appears: "Unable to connect to the remote server" and no kernel is created.
Expected Behaviour
VS Code should successfully connect to a Colab remote kernel and allow executing the notebook using Colab CPU.
Actual Behaviour
The Colab connection fails immediately. A popup shows:
Unable to connect to the remote server
Ensure the server is running and reachable.
No kernel starts and the notebook stays unconnected.
Additional context
- Screenshot showing the error (uploaded):
/mnt/data/Screenshot 2025-11-15 215432.png - The extension attempts to contact a Colab-proxied URL and fails DNS resolution (
ENOTFOUND). This suggests either the generated Colab URL is incorrect/expired or there is a network/DNS resolution issue for that hostname.
Logs
Colab Extension Logs
(from VS Code: View → Output → select "Colab")
[2025-11-21T06:56:23.567Z] [Info] Visual Studio Code: 1.106.0
[2025-11-21T06:56:23.567Z] [Info] Remote: N/A
[2025-11-21T06:56:23.567Z] [Info] App Host: desktop
[2025-11-21T06:56:23.567Z] [Info] Jupyter extension version: 2025.9.1
(This appears to be the Colab output header. Full Colab output, if different, can be attached here.)
Jupyter Extension Logs
(from VS Code: View → Output → select "Jupyter")
12:28:58.711 [error] Error fetching kernels from https://8080-m-s-th9d9w1c2tj0-c.us-east4-2.prod.colab.dev/ (Colab CPU): FetchError: request to https://8080-m-s-th9d9w1c2tj0-c.us-east4-2.prod.colab.dev/api/kernels?1763708338613 failed, reason: getaddrinfo ENOTFOUND 8080-m-s-th9d9w1c2tj0-c.us-east4-2.prod.colab.dev
at ClientRequest.<anonymous> (~\.vscode\extensions\google.colab-0.1.1\out\extension.js:1:308091)
at ClientRequest.emit (node:events:531:35)
at emitErrorEvent (node:_http_client:105:11)
at TLSSocket.socketErrorListener (node:_http_client:518:5)
at TLSSocket.emit (node:events:519:28)
at emitErrorNT (node:internal/streams/destroy:170:8)
at emitErrorCloseNT (node:internal/streams/destroy:129:3)
at processTicksAndRejections (node:internal/process/task_queues:90:21)
12:28:58.789 [error] Jupyter Lab Helper:getKernelSpecs failure: Error: Poll (@jupyterlab/services:KernelSpecManager#specs) is disposed.
at i.dispose (~\.vscode\extensions\ms-toolsai.jupyter-2025.9.1-win32-x64\dist\node_modules\@jupyterlab\services\index.js:11:35847)
at Kr.dispose (~\.vscode\extensions\ms-toolsai.jupyter-2025.9.1-win32-x64\dist\node_modules\@jupyterlab\services\index.js:11:75387)
at ~\.vscode\extensions\ms-toolsai.jupyter-2025.9.1-win32-x64\dist\extension.node.js:181:22619
at processTicksAndRejections (node:internal/process/task_queues:105:5)
12:29:00.973 [error] Error fetching kernels from https://8080-m-s-th9d9w1c2tj0-c.us-east4-2.prod.colab.dev/ (Colab CPU): FetchError: request to https://8080-m-s-th9d9w1c2tj0-c.us-east4-2.prod.colab.dev/api/kernels?1763708340865 failed, reason: getaddrinfo ENOTFOUND 8080-m-s-th9d9w1c2tj0-c.us-east4-2.prod.colab.dev
at ClientRequest.<anonymous> (~\.vscode\extensions\google.colab-0.1.1\out\extension.js:1:308091)
at ClientRequest.emit (node:events:531:35)
at emitErrorEvent (node:_http_client:105:11)
at TLSSocket.socketErrorListener (node:_http_client:518:5)
at TLSSocket.emit (node:events:519:28)
at emitErrorNT (node:internal/streams/destroy:170:8)
at emitErrorCloseNT (node:internal/streams/destroy:129:3)
at processTicksAndRejections (node:internal/process/task_queues:90:21)
12:29:01.049 [error] Jupyter Lab Helper:getKernelSpecs failure: Error: Poll (@jupyterlab/services:KernelSpecManager#specs) is disposed.
at i.dispose (~\.vscode\extensions\ms-toolsai.jupyter-2025.9.1-win32-x64\dist\node_modules\@jupyterlab\services\index.js:11:35847)
at Kr.dispose (~\.vscode\extensions\ms-toolsai.jupyter-2025.9.1-win32-x64\dist\node_modules\@jupyterlab\services\index.js:11:75387)
at ~\.vscode\extensions\ms-toolsai.jupyter-2025.9.1-win32-x64\dist\extension.node.js:181:22619
at processTicksAndRejections (node:internal/process/task_queues:105:5)
12:29:01.050 [error] UniversalRemoteKernelFinder: Failed to get kernels without cache FetchError: request to https://8080-m-s-th9d9w1c2tj0-c.us-east4-2.prod.colab.dev/api/kernels?1763708340865 failed, reason: getaddrinfo ENOTFOUND 8080-m-s-th9d9w1c2tj0-c.us-east4-2.prod.colab.dev
at ClientRequest.<anonymous> (~\.vscode\extensions\google.colab-0.1.1\out\extension.js:1:308091)
at ClientRequest.emit (node:events:531:35)
at emitErrorEvent (node:_http_client:105:11)
at TLSSocket.socketErrorListener (node:_http_client:518:5)
at TLSSocket.emit (node:events:519:28)
at emitErrorNT (node:internal/streams/destroy:170:8)
at emitErrorCloseNT (node:internal/streams/destroy:129:3)
at processTicksAndRejections (node:internal/process/task_queues:90:21)
Activity
kevineger commentedon Nov 21, 2025
Thanks for the report @Kishor1536 and sorry you're running into this.
Unfortunately those repro steps don't repro the issue for me (it's effectively the hello-world of using the extension), so there must be some other step masking itself that's landing you and a couple others in this situation.
I think the fix detailed [here](#206 (comment) should address it, but I'm guessing a bit.
If you could enable trace logging (screenshot below) in the VS Code settings for Colab, relaunch VS Code and send those over, that'd be really helpful!
To best track the issue and work towards a fix, I'll be closing this as a duplicate of #206.
Mubarraqqq commentedon Nov 25, 2025
I can't activate my colab kernel while signed into a Microsoft account on VS code