code-server: Error starting Python extension under code-server
OS/Web Information
- Web Browser: Version 88.0.4324.182 (Developer Build) built on Debian bullseye/sid, running on Debian bullseye/sid (64-bit)
- Local OS: Debian testing, using code-server installed as a Progressive Web Application
- Remote OS: Arch Linux container image, running on Ubuntu host in GKE
- Remote Architecture: Coder Enterprise
code-server --version: 3.9.0-1 06c7e17674bd72c1bb655471a69e2f1a4244b329
Steps to Reproduce
- Install the official Python extension
- Open the Command Palette (Ctrl+Shift+P) and select “Python: Select Interpreter”
Expected
A list of interpreters should appear
Actual
An error stack is logged to the Log (Remote Extension) log:
[2021-03-18 15:33:45.481] [exthost] [info] ExtensionService#_doActivateExtension ms-toolsai.jupyter {"startup":false,"extensionId":{"value":"ms-python.python","_lower":"ms-python.python"},"activationEvent":"onCommand:python.setInterpreter"}
[2021-03-18 15:33:45.481] [exthost] [info] ExtensionService#loadCommonJSModule file:///home/coder/.local/share/code-server/extensions/ms-toolsai.jupyter-2020.12.1/out/client/extension
[2021-03-18 15:33:45.482] [exthost] [error] Activating extension ms-toolsai.jupyter failed due to an error:
[2021-03-18 15:33:45.488] [exthost] [error] Error: Cannot find module '/home/coder/.local/share/code-server/extensions/ms-toolsai.jupyter-2020.12.1/out/client/extension'
Require stack:
- /opt/coder/code-server/lib/vscode/out/vs/loader.js
- /opt/coder/code-server/lib/vscode/out/bootstrap-amd.js
- /opt/coder/code-server/lib/vscode/out/bootstrap-fork.js
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:965:15)
at Function.Module._load (internal/modules/cjs/loader.js:841:27)
at Function.t._load (/opt/coder/code-server/lib/vscode/out/vs/workbench/services/extensions/node/extensionHostProcess.js:1093:657)
at Function.i._load (/opt/coder/code-server/lib/vscode/out/vs/workbench/services/extensions/node/extensionHostProcess.js:1062:334)
at Function.n._load (/opt/coder/code-server/lib/vscode/out/vs/workbench/services/extensions/node/extensionHostProcess.js:1058:567)
at Module.require (internal/modules/cjs/loader.js:1025:19)
at require (internal/modules/cjs/helpers.js:72:18)
at Function.r [as __$__nodeRequire] (/opt/coder/code-server/lib/vscode/out/vs/loader.js:20:263)
at p._loadCommonJSModule (/opt/coder/code-server/lib/vscode/out/vs/workbench/services/extensions/node/extensionHostProcess.js:1063:631)
at p._doActivateExtension (/opt/coder/code-server/lib/vscode/out/vs/workbench/services/extensions/node/extensionHostProcess.js:959:742)
at p._activateExtension (/opt/coder/code-server/lib/vscode/out/vs/workbench/services/extensions/node/extensionHostProcess.js:958:822)
at Object.actualActivateExtension (/opt/coder/code-server/lib/vscode/out/vs/workbench/services/extensions/node/extensionHostProcess.js:956:453)
at h._activateExtension (/opt/coder/code-server/lib/vscode/out/vs/workbench/services/extensions/node/extensionHostProcess.js:680:603)
at /opt/coder/code-server/lib/vscode/out/vs/workbench/services/extensions/node/extensionHostProcess.js:680:281
at Array.map (<anonymous>)
at h._activateExtensions (/opt/coder/code-server/lib/vscode/out/vs/workbench/services/extensions/node/extensionHostProcess.js:680:269)
at h._activateExtensions (/opt/coder/code-server/lib/vscode/out/vs/workbench/services/extensions/node/extensionHostProcess.js:680:338)
at h.activateByEvent (/opt/coder/code-server/lib/vscode/out/vs/workbench/services/extensions/node/extensionHostProcess.js:677:745)
at p._activateByEvent (/opt/coder/code-server/lib/vscode/out/vs/workbench/services/extensions/node/extensionHostProcess.js:957:300)
at /opt/coder/code-server/lib/vscode/out/vs/workbench/services/extensions/node/extensionHostProcess.js:966:111
at processTicksAndRejections (internal/process/task_queues.js:97:5)
Screenshot

Notes
This issue can be reproduced in VS Code: Yes/No
I don’t have VSCode installed locally, and would prefer not to install it, sorry
This is possibly related to https://github.com/cdr/code-server/issues/2675 or https://github.com/microsoft/vscode-python/issues/14959. It may also be a limitation of Coder’s internal extension marketplace
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 3
- Comments: 18 (7 by maintainers)
I was able to get Python working with version (
code-server 3.9.2 109d2ce3247869eaeab67aa7e5423503ec9eb859 )of code-server by doing these in orderThis project is so great , it gives me the same excitey feelings as emacs, so great.
@trir262 hi!
Just noticed this - you appear to be using Microsoft’s ‘official’/proprietary
vscode-serverbinary, not our open-sourcecode-servertool (which is what this repo is for). We currently do not support connecting to a locally installed VSCode with an extension, andcode-servercan only be accessed in a web browser.I’ve mentioned this on the original issues you’ve filed upstream too!
I now went to Extensions and saw the possibility to install the extensions to the remote endpoint. That way I am able to install the extensions and now it does seem to work for me. I was able to install Jupyter and now python dev works as it should. There is an inconsistency apparently in installing vsix offline and “Installing extension in remote”
Here are the steps I took:
Installed vscode on win10 client Installed “Remote Development” extension Connected to SSH Linux endpoint, which installed vscode server Downloaded vsix for Python, gitlens & jupyter Installed Python & Gitlens via offline install (linux device has no access to internet) Unable to install Jupyter (apparently that’s not supported, according to my other issue) Opened a remote path that has a .py file in it Opened .py file --> Exception appears in bottom screen I don’t run vscode in a web browser but use the client
Apologies, Here’s my info: Version: 1.54.3 (system setup) Commit: 2b9aebd5354a3629c3aba0a5f5df49f43d6689f8 Date: 2021-03-15T10:55:45.459Z Electron: 11.3.0 Chrome: 87.0.4280.141 Node.js: 12.18.3 V8: 8.7.220.31-electron.0 OS: Windows_NT x64 10.0.19042
I think this might be because the Python extension version we ship right now needs code-server 3.9.1/VSCode 1.53. Can you try on the latest version?