Extensions are not activated properly in VSCode app

In OOD, I installed VS Code interactive app and code-server works fine. But when I try to install ms-python extension to use python debugger, the extension is not activated and stuck after printing “Activating Extension”.
image

When I launch code-server without using ood and just using bash, the extension is activated and runs well without any problem. It only happens when I launch code-server with OOD interactive app.

Here’s the submit script I used to launch codeserver. The code is based on GitHub - OSC/bc_osc_codeserver: BETA - Batch Connect - OSC Code Server

#!/usr/bin/bash -l
<%

# Set our working directory.
working_dir = Pathname.new(context.working_dir)

code_server_version   = context.version

# Ensure that code-server always starts up in either a user defined directory or the home directory.
if ! working_dir.exist?
    working_dir = Pathname.new(ENV['HOME'])
elsif working_dir.file?
    working_dir = working_dir.parent
end
%>

CODE_SERVER_DATAROOT="$HOME/.local/share/code-server"
mkdir -p "$CODE_SERVER_DATAROOT/extensions"

# Expose the password to the server.
export PASSWORD="$password"

# Print compute node.
echo "$(date): Running on compute node ${compute_node}:$port"
#
# Start Code Server.
#
echo "$(date): Started code-server"
code-server \
    --auth="none" \
    --bind-addr="0.0.0.0:${port}" \
    --disable-telemetry
    --user-data-dir="$CODE_SERVER_DATAROOT" \
    --log debug \
    "<%= working_dir.to_s %>"

System spec
OS: Ubuntu 20.04
code-server version: 4.10.1 (latest)
extension: ms-python 2023.4.0 (default version in extension marketplace)
Python: 3.8
OOD version: 2.0.29

I have an issue too trying to load the jupyter module that it depends on.

Here’s how you can look at the logs:
Open the navigation menu (the hamburger/3 lines in the top left corner)
Go to View
Go to Command Palette ...

And you’ll get this drop down menu, in which you need to find Developoer: Open Log File... and choose Remote Extension Host.

This will at least give you the error log for why this is failing.

Hello Jeff,
Here’s the remote extension host log.
There is an error but I’m not sure it is relevant to the activation issue or not.

2023-03-14 00:12:50.082 [info] Extension host with pid 1966856 started
2023-03-14 00:12:50.082 [error] Error: EACCES: permission denied, open '/tmp/vscode-ipc'
2023-03-14 00:12:50.090 [info] Lock '/home/deepcluster/.local/share/code-server/User/workspaceStorage/f4c04e5/vscode.lock': Lock acquired.
2023-03-14 00:12:50.180 [info] ExtensionService#_doActivateExtension vscode.git-base, startup: true, activationEvent: '*', root cause: vscode.git
2023-03-14 00:12:50.220 [info] ExtensionService#_doActivateExtension vscode.git, startup: true, activationEvent: '*'
2023-03-14 00:12:50.220 [info] ExtensionService#_doActivateExtension vscode.github, startup: true, activationEvent: '*'
2023-03-14 00:12:50.396 [info] ExtensionService#_doActivateExtension vscode.debug-auto-launch, startup: false, activationEvent: 'onStartupFinished'
2023-03-14 00:12:50.396 [info] ExtensionService#_doActivateExtension vscode.emmet, startup: false, activationEvent: 'onStartupFinished'
2023-03-14 00:12:50.397 [info] ExtensionService#_doActivateExtension vscode.merge-conflict, startup: false, activationEvent: 'onStartupFinished'
2023-03-14 00:12:50.397 [info] Eager extensions activated
2023-03-14 00:12:52.226 [warning] [Decorations] CAPPING events from decorations provider vscode.git 8189
2023-03-14 00:12:52.928 [debug] ProxyResolver#getCaCertificates count 128
2023-03-14 00:12:52.929 [debug] ProxyResolver#resolveProxy unconfigured https://mobile.events.data.microsoft.com/OneCollector/1.0?cors=true&content-type=application/x-json-stream DIRECT 
2023-03-14 00:12:53.269 [warning] [Decorations] CAPPING events from decorations provider vscode.git 8189
2023-03-14 00:13:38.590 [debug] ProxyResolver#resolveProxy unconfigured https://mobile.events.data.microsoft.com/OneCollector/1.0?cors=true&content-type=application/x-json-stream DIRECT 
2023-03-14 00:14:39.823 [info] ExtensionService#_doActivateExtension vscode.debug-server-ready, startup: false, activationEvent: 'onDebugResolve'
2023-03-14 00:14:47.004 [info] ExtensionService#_doActivateExtension ms-python.python, startup: false, activationEvent: 'onLanguage:python', root cause: ms-python.isort
2023-03-14 00:14:47.004 [info] ExtensionService#_doActivateExtension ms-toolsai.jupyter, startup: false, activationEvent: 'onLanguage:python'
2023-03-14 00:14:47.556 [debug] ProxyResolver#resolveProxy unconfigured https://default.exp-tas.com/vscode/ab DIRECT 
2023-03-14 00:14:47.556 [debug] ProxyResolver#resolveProxy unconfigured https://default.exp-tas.com/vscode/ab DIRECT 
2023-03-14 00:14:47.878 [info] ExtensionService#_doActivateExtension ms-toolsai.jupyter-renderers, startup: false, activationEvent: 'api', root cause: ms-toolsai.jupyter
2023-03-14 00:14:48.107 [info] ExtensionService#_doActivateExtension ms-python.isort, startup: false, activationEvent: 'onLanguage:python'
2023-03-14 00:14:49.480 [debug] ProxyResolver#resolveProxy unconfigured https://mobile.events.data.microsoft.com/OneCollector/1.0?cors=true&content-type=application/x-json-stream DIRECT 
2023-03-14 00:14:49.977 [debug] ProxyResolver#resolveProxy unconfigured https://mobile.events.data.microsoft.com/OneCollector/1.0?cors=true&content-type=application/x-json-stream DIRECT 
2023-03-14 00:14:49.990 [debug] ProxyResolver#resolveProxy unconfigured https://mobile.events.data.microsoft.com/OneCollector/1.0?cors=true&content-type=application/x-json-stream DIRECT 
2023-03-14 00:44:47.534 [debug] ProxyResolver#resolveProxy unconfigured https://default.exp-tas.com/vscode/ab DIRECT 
2023-03-14 00:44:47.547 [debug] ProxyResolver#resolveProxy unconfigured https://default.exp-tas.com/vscode/ab DIRECT 
2023-03-14 01:14:47.536 [debug] ProxyResolver#resolveProxy unconfigured https://default.exp-tas.com/vscode/ab DIRECT 
2023-03-14 01:14:47.550 [debug] ProxyResolver#resolveProxy unconfigured https://default.exp-tas.com/vscode/ab DIRECT 
2023-03-14 01:44:47.536 [debug] ProxyResolver#resolveProxy unconfigured https://default.exp-tas.com/vscode/ab DIRECT 
2023-03-14 01:44:47.550 [debug] ProxyResolver#resolveProxy unconfigured https://default.exp-tas.com/vscode/ab DIRECT 
2023-03-14 02:14:47.535 [debug] ProxyResolver#resolveProxy unconfigured https://default.exp-tas.com/vscode/ab DIRECT 
2023-03-14 02:14:47.551 [debug] ProxyResolver#resolveProxy unconfigured https://default.exp-tas.com/vscode/ab DIRECT 
1 Like

Yea I also think that error is not relevant given the next line does obtain a lock.

Is there anything relevant in your output tab (the bottom bar next to your terminal)?

Also quickly googling around this seems to be a rather common issue. There are some hacks around your settings.json file, but IDK what to enable/try through this forum. I’d suggest you also googling this and you’ll get several results to investigate.

code-server python extension stuck loading

@jeff.ohrstrom

I tried again and again to find out the reason of the issue.

Recently, I found out that remote extension works fine when I access to code-server directly via worker_node_ip:port instead connecting with OOD dashboard session card.

It seems like accessing to python language server behind reverse proxy of ood rnode interactive app is not working well.

The local address automatically produced is

http://login_ip:9050/rnode/HOST/PORT/proxy/forwarded_port

I expect this url works just the way the following url does.

http://HOST:PORT/proxy/forwarded_port

Thanks for looking into it more! Yes that would seem to be an issue.

I would wonder if there’s another way to boot the language server. For example the ruby extension I use uses stdio to communicate. So I’m wondering if there’s a similar setting for python such that the remove vscode instance (on your compute node) can talk to the language server (also on the compute node) through some other mechanism other than http.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.