Code-server: [Extensions] Installation is trying to call extensions.coder.com

Created on 23 Nov 2020  路  8Comments  路  Source: cdr/code-server

Hello,

First of all thank you for your work !

I am trying to install extensions with local .vsix files downloaded for Microsoft marketplace since my build servers cannot access internet (company policies).

Since 3.7.2, I cannot install extensions without this error:

#9 28.35 Installing extensions...
#9 28.94 Extension 'eamodio.gitlens-11.0.2.vsix' was successfully installed.
#9 28.95 error vscode getaddrinfo ENOTFOUND extensions.coder.com
#9 28.95 error vscode Error: getaddrinfo ENOTFOUND extensions.coder.com

Here is the install process (via Docker):

RUN yum install -y /tmp/code-server-${CODE_SERVER_VERSION}-amd64.rpm \
    && mkdir -p ${CODE_SERVER_EXTENSIONS_DIRPATH} \
    && chmod -R 755 ${CODE_SERVER_EXTENSIONS_DIRPATH} \
# Install Extensions
    && code-server --extensions-dir ${CODE_SERVER_EXTENSIONS_DIRPATH} --install-extension /tmp/extensions/eamodio.gitlens-11.0.2.vsix 
  • Remote OS: Rhel 7.6
  • Remote Architecture: amd64
  • code-server --version: 3.7.2

It seems that the extensions install process is trying to contact extensions.coder.com which is denied on my servers.
Is it a bug or I'm missing something on the extension's install process ?

Thank in advance for your answers.

Have a good day !

bug needs-investigation

All 8 comments

I'm not sure; apparently even installing extensions locally tries to
ping the extension marketplace. Maybe it's to get metadata or see if
it's the latest version? I've been meaning to look into it but I haven't
had a chance yet.

Okay thank you for your feedback, but before 3.7.2 it does not make the installation failed

before 3.7.2 it does not make the installation failed

Oh interesting! Sounds like it could be a bug with the new version then.

Yes it could, I just verified with the versions 3.5.0, 3.6.2, 3.7.1, and it works with all these ones

With v3.7.3 and v3.7.2, Installing an extension using command code-server --install-extension xyz.vsix leads to the following error:

Installing extensions...
Extension 'xyz' was successfully installed.
error vscode Server returned 500
error vscode Error: Server returned 500
    at Object.t.asJson (/opt/code-server/lib/vscode/out/vs/server/entry.js:373:933)
    at j.queryGallery (/opt/code-server/lib/vscode/out/vs/server/entry.js:393:695)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
    at async j.query (/opt/code-server/lib/vscode/out/vs/server/entry.js:392:642)
    at async j.getExtensions (/opt/code-server/lib/vscode/out/vs/server/entry.js:390:251)
    at async /opt/code-server/lib/vscode/out/vs/server/entry.js:541:148
    at async Promise.all (index 0)
    at async J.getGalleryExtensions (/opt/code-server/lib/vscode/out/vs/server/entry.js:541:117)
    at async Promise.all (index 0)
    at async J.installExtensions (/opt/code-server/lib/vscode/out/vs/server/entry.js:540:13)
    at async J.run (/opt/code-server/lib/vscode/out/vs/server/entry.js:538:205)
    at async /opt/code-server/lib/vscode/out/vs/server/entry.js:545:678
    at async process.<anonymous> (/opt/code-server/lib/vscode/out/vs/server/entry.js:553:669)

This error does not occur with v3.7.1, though.

@benz0li @code-asher I confirm that installing extensions from .vsix in 3.7.3 ends with the above error, despite the Extension xxx was successfully installed msg showing up too

I am having the same issue with 3.7.3.

Downgrading to 3.7.1 and everything is up and running

Installing extensions...
Extension 'lit-plugin-1.2.0.vsix' was successfully installed.
error vscode Server returned 500
error vscode Error: Server returned 500
    at Object.t.asJson (/usr/lib/code-server/lib/vscode/out/vs/server/entry.js:373:933)
    at j.queryGallery (/usr/lib/code-server/lib/vscode/out/vs/server/entry.js:393:695)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
    at async j.query (/usr/lib/code-server/lib/vscode/out/vs/server/entry.js:392:642)
    at async j.getExtensions (/usr/lib/code-server/lib/vscode/out/vs/server/entry.js:390:251)
    at async /usr/lib/code-server/lib/vscode/out/vs/server/entry.js:541:148
    at async Promise.all (index 0)
    at async J.getGalleryExtensions (/usr/lib/code-server/lib/vscode/out/vs/server/entry.js:541:117)
    at async Promise.all (index 0)
    at async J.installExtensions (/usr/lib/code-server/lib/vscode/out/vs/server/entry.js:540:13)
    at async J.run (/usr/lib/code-server/lib/vscode/out/vs/server/entry.js:538:205)
    at async /usr/lib/code-server/lib/vscode/out/vs/server/entry.js:545:678
    at async process.<anonymous> (/usr/lib/code-server/lib/vscode/out/vs/server/entry.js:553:669)
The command '/bin/sh -c code-server --install-extension "/home/coder/vscode_extensions/lit-plugin-1.0.2.vsix"' returned a non-zero code: 1

I'll be looking into this soon. Just as an FYI, it's best to avoid
3.7.1: https://github.com/cdr/code-server/releases/tag/v3.7.2

Was this page helpful?
0 / 5 - 0 ratings

Related issues

sa7mon picture sa7mon  路  3Comments

infogulch picture infogulch  路  3Comments

KSXGitHub picture KSXGitHub  路  3Comments

nol166 picture nol166  路  3Comments

justmao945 picture justmao945  路  3Comments