Skip to content

Error starting Python extension under code-server #2929

Closed

Description

@jawnsy

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 06c7e17

Steps to Reproduce

  1. Install the official Python extension
  2. 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

image

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 #2675 or microsoft/vscode-python#14959. It may also be a limitation of Coder's internal extension marketplace

Activity

  1. code-asher commented on Mar 18, 2021

    @code-asher
    Member

    Fingers crossed this might be fixed. 🤞 #2341 (comment)

  2. oxy commented on Mar 20, 2021

    @oxy

    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?

  3. added
    waiting-for-infoWaiting for more information from submitter
    and removed
    needs-investigationThis issue needs to be further investigated
    on Mar 22, 2021
  4. ediphy-dcottrell commented on Mar 25, 2021

    @ediphy-dcottrell

    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 confirm context of "versoin"? Version of code-server or version of extension?

  5. jsjoeio commented on Mar 25, 2021

    @jsjoeio
    Contributor

    @ediphy-dcottrell I believe here @oxy is referring to the latest version of code-server: 3.9.1

  6. qorrect commented on Mar 27, 2021

    @qorrect

    I was able to get Python working with version (code-server 3.9.2 109d2ce3247869eaeab67aa7e5423503ec9eb859 ) of code-server by doing these in order

    1. Disable extensions.autoUpdate ( label Extensions: Auto update )
    2. Downloading version ms-toolsai.jupyter-2020.11.358541065 of jupyter and installing it ( you can google the whole string )
    3. Downloading version ms-python.python-2020.11.358366026 of python and installing it

    This project is so great , it gives me the same excitey feelings as emacs, so great.

  7. trir262 commented on Mar 29, 2021

    @trir262

    I am also unable to start python.
    local os = Windows 10
    remote os = Oracle Linux 7.8
    vscode server 1.54.3

    installed extensions

    • Python v2021.3.680753044
    • GitLens v11.3.0

    Error message:
    Cannot activate the 'Python' extension because it depends on the 'Jupyter' extension, which is disabled. Would you like to enable the extension and reload the window?

    However Jupyter is not supported on VS Code Server (see my related issue in microsoft/vscode-jupyter#5342 (comment)) and I can not install that extension remotely.

  8. added
    needs-investigationThis issue needs to be further investigated
    and removed
    waiting-for-infoWaiting for more information from submitter
    on Mar 29, 2021
  9. added this to the On Deck milestone on Mar 29, 2021
  10. jsjoeio commented on Mar 29, 2021

    @jsjoeio
    Contributor

    @trir262 what version of code-server are you using?

    I added this to an upcoming milestone. We'll investigate.

  11. trir262 commented on Mar 29, 2021

    @trir262

    I hope I have the right version : 1.54.3
    I looked in .vscode-server/bin/2b9aebd5354a3629c3aba0a5f5df49f43d6689f8/package.json

  12. jsjoeio commented on Mar 29, 2021

    @jsjoeio
    Contributor

    Ah, yes, that's the VS Code version. I meant the code-server version. Here's where you can find it:
    2021-03-29 13 51 59

  13. trir262 commented on Mar 29, 2021

    @trir262

    Apologies,
    Here's my info:
    Version: 1.54.3 (system setup)
    Commit: 2b9aebd
    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

  14. jsjoeio commented on Mar 29, 2021

    @jsjoeio
    Contributor

    No worries at all! Hmm...That looks like VS Code's Help information (not code-server). A few follow-ups:

    • What does your setup look like?
    • How are you using code-server?
    • What version of code-server are you using?
  15. trir262 commented on Mar 29, 2021

    @trir262

    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

  16. jsjoeio commented on Mar 29, 2021

    @jsjoeio
    Contributor

    Ah, that clarifies things a bit. Thanks for the extra notes! We'll investigate this further. Though it sounds like your issue is with the Jupyter extension and not the Python extension? Or rather both I guess.

    Do you mind opening a separate issue for the issues with Jupyter and link to that other issue you opened? That way, when we look at separate the two issues.

  17. trir262 commented on Mar 29, 2021

    @trir262

    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"

  18. jsjoeio commented on Mar 29, 2021

    @jsjoeio
    Contributor

    Ah yeah, we could probably do a better job explaining the differences between the two. Well glad you got it working!

  19. oxy commented on Mar 30, 2021

    @oxy

    @trir262 hi!

    Just noticed this - you appear to be using Microsoft's 'official'/proprietary vscode-server binary, not our open-source code-server tool (which is what this repo is for). We currently do not support connecting to a locally installed VSCode with an extension, and code-server can only be accessed in a web browser.

    I've mentioned this on the original issues you've filed upstream too!

  20. SJang1 commented on Apr 21, 2021

    @SJang1

    Here went to the same issue, but after updating Python and Jupyter extensions, this error had disappeared.
    Error: Cannot find module '/home/username/.local/share/code-server/extensions/ms-toolsai.jupyter-2020.12.1/out/client/extension'

    Now Just having this error
    [Extension Host] (node:62109) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.

    and when to try starting thing : Notification comes out : Python extension loading... (Looks like python extension not loading?)

  21. stale commented on Oct 18, 2021

    @stale

    This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no activity occurs in the next 5 days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions