Skip to content

Installing extensions from vsix tries to query marketplace #2355

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Leletir opened this issue Nov 23, 2020 · 17 comments
Closed

Installing extensions from vsix tries to query marketplace #2355

Leletir opened this issue Nov 23, 2020 · 17 comments
Labels
bug Something isn't working upstream Needs to be fixed upstream
Milestone

Comments

@Leletir
Copy link

Leletir commented Nov 23, 2020

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 !

@code-asher
Copy link
Member

code-asher commented Nov 23, 2020 via email

@code-asher code-asher added bug Something isn't working needs-investigation labels Nov 23, 2020
@Leletir
Copy link
Author

Leletir commented Nov 23, 2020

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

@code-asher
Copy link
Member

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.

@Leletir
Copy link
Author

Leletir commented Nov 23, 2020

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

@benz0li
Copy link
Contributor

benz0li commented Nov 25, 2020

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.

@ppkwiatkowski
Copy link

@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

@Stradivario
Copy link

Stradivario commented Nov 30, 2020

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

@code-asher
Copy link
Member

code-asher commented Nov 30, 2020 via email

@benz0li
Copy link
Contributor

benz0li commented Dec 2, 2020

Workaround for error vscode Server returned 500:

code-server --install-extension xyz.vsix || true

You can also use the standard bash ignore error || true, which is nice if you are in the middle of a chain:

https://stackoverflow.com/a/53520372

@code-asher code-asher added upstream Needs to be fixed upstream and removed needs-investigation labels Dec 2, 2020
@code-asher
Copy link
Member

Seems it's fixed upstream, just need to wait for the next release so we can pull it in: microsoft/vscode#110574

@code-asher code-asher changed the title [Extensions] Installation is trying to call extensions.coder.com Installing extensions from vsix tries to query marketplace Dec 2, 2020
@code-asher code-asher added this to the v3.7.5 milestone Dec 2, 2020
@code-asher code-asher added the blocked This issue cannot proceed due to external factors label Dec 2, 2020
@nhooyr nhooyr removed the blocked This issue cannot proceed due to external factors label Dec 8, 2020
@nhooyr nhooyr removed this from the v3.7.5 milestone Dec 8, 2020
@snirbenyosef
Copy link

any news on that ? does 3.7.4 works with extensions ?

@Leletir
Copy link
Author

Leletir commented Dec 9, 2020

Not yet, but the bug is resolved in VSCode

code-asher added a commit that referenced this issue Dec 14, 2020
Mostly just hash and line updates, but also:

- A new doStore was added, needed to update to return a promise.
- GoHomeContributor was removed. It's probably registered in some other
  way now.
- The about dialog content moved to another file.
- createTrustedScriptURL was removed, trustedTypesPolicy was added
- Remove added logLevel, we've always had that.

Fixes #2355.
@code-asher code-asher added this to the v3.7.5 milestone Dec 15, 2020
code-asher added a commit that referenced this issue Dec 15, 2020
Mostly just hash and line updates, but also:

- The maximum Node version was increased but since we're following the
  VS Code allowed version range now to prevent bugs, remove the
  comments code there instead of updating it.
- A new doStore was added, needed to update to return a promise.
- GoHomeContributor was removed. It's probably registered in some other
  way now.
- The about dialog content moved to another file.
- createTrustedScriptURL was removed, trustedTypesPolicy was added
- Remove added logLevel, we've always had that.

Fixes #2355.
@code-asher code-asher modified the milestones: v3.7.5, v3.7.6 Dec 17, 2020
@meitalpa
Copy link

was this fixed? does 3.7.4 works with extensions?

@code-asher
Copy link
Member

code-asher commented Jan 4, 2021 via email

@nhooyr nhooyr modified the milestones: v3.8.1, v3.8.2 Feb 1, 2021
@jsjoeio jsjoeio modified the milestones: v3.9.0, v3.9.1 Feb 12, 2021
@jc16180
Copy link

jc16180 commented Feb 17, 2021

Did this get fixed by the latest release?

@Leletir
Copy link
Author

Leletir commented Feb 17, 2021

Hello, I've tested in 3.9.0 and the issue it's resolved !
Thanks !

@code-asher
Copy link
Member

Ah yup should be resolved now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working upstream Needs to be fixed upstream
Projects
None yet
Development

No branches or pull requests

10 participants