Skip to content
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

[Bug report] C++ extension not works on my x64 server #3924

Closed
HuJK opened this issue Aug 8, 2021 · 9 comments
Closed

[Bug report] C++ extension not works on my x64 server #3924

HuJK opened this issue Aug 8, 2021 · 9 comments
Labels
needs-investigation This issue needs to be further investigated stale This issue has not had activity in a while and will be closed

Comments

@HuJK
Copy link

HuJK commented Aug 8, 2021

OS/Web Information

  • Web Browser: Chrome
  • Local OS: Windows 10
  • Remote OS: Ubuntu 20.04
  • Remote Architecture: x86_64
  • code-server --version: 3.11.1

Steps to Reproduce

  1. Create a clean environment: https://github.com/HuJK-TestRepo/code-server-bug-reproduce
git clone https://github.com/HuJK-TestRepo/code-server-bug-reproduce
cd code-server-bug-reproduce
docker build -t code-server-bug-reproduce .
docker run --rm -it -p 45654:45654 code-server-bug-reproduce
  1. goto ip:45654
  2. install C++ extension
  3. open folder /root
  4. open main.cpp

Expected

C++ extension runs normally

Actual

C++ extension not working as expected with error: This Linux arm64 version of the extension is incompatible with your OS. Please download and install the "cpptools-linux.vsix" version of the extension.

Logs

[2021-08-08T07:59:44.047Z] info  Wrote default config file to ~/.config/code-server/config.yaml
[2021-08-08T07:59:44.383Z] info  code-server 3.11.1 c680aae973d83583e4a73dc0c422f44021f0140e
[2021-08-08T07:59:44.384Z] info  Using user-data-dir ~/.local/share/code-server
[2021-08-08T07:59:44.393Z] info  Using config file ~/.config/code-server/config.yaml
[2021-08-08T07:59:44.393Z] info  HTTP server listening on http://0.0.0.0:45654 
[2021-08-08T07:59:44.393Z] info    - Authentication is disabled 
[2021-08-08T07:59:44.393Z] info    - Not serving HTTPS 
[2021-08-08T08:00:02.146Z] debug forking vs code...
[2021-08-08T08:00:02.445Z] debug setting up vs code...
[2021-08-08T08:00:02.448Z] debug vscode got message from code-server {"type":"init"}
[2021-08-08T08:00:03.097Z] debug vscode got message from code-server {"type":"socket"}
[2021-08-08T08:00:03.101Z] debug protocol Initiating handshake... {"token":"ac08c10c-7b38-4d8c-b887-35b5c2d51942"}
[2021-08-08T08:00:03.111Z] debug protocol Handshake completed {"token":"ac08c10c-7b38-4d8c-b887-35b5c2d51942"}
[2021-08-08T08:00:03.112Z] debug management Connecting... {"token":"ac08c10c-7b38-4d8c-b887-35b5c2d51942"}
[2021-08-08T08:00:03.113Z] debug vscode 1 active management connection(s)
[2021-08-08T08:00:03.472Z] debug Making request {"uri":"https://api.github.com/repos/cdr/code-server/releases/latest"}
[2021-08-08T08:00:03.498Z] debug vscode got message from code-server {"type":"socket"}
[2021-08-08T08:00:03.498Z] debug protocol Initiating handshake... {"token":"8055ab76-f6e1-43a8-a8fb-51594642c73d"}
[2021-08-08T08:00:03.618Z] debug protocol Handshake completed {"token":"8055ab76-f6e1-43a8-a8fb-51594642c73d"}
[2021-08-08T08:00:03.619Z] debug exthost Connecting... {"token":"8055ab76-f6e1-43a8-a8fb-51594642c73d"}
[2021-08-08T08:00:03.619Z] debug exthost Getting NLS configuration... {"token":"8055ab76-f6e1-43a8-a8fb-51594642c73d"}
[2021-08-08T08:00:03.620Z] debug vscode 1 active exthost connection(s)
[2021-08-08T08:00:03.620Z] debug exthost Spawning extension host... {"token":"8055ab76-f6e1-43a8-a8fb-51594642c73d"}
[2021-08-08T08:00:03.642Z] debug exthost Waiting for handshake... {"token":"8055ab76-f6e1-43a8-a8fb-51594642c73d"}
[2021-08-08T08:00:03.922Z] debug got latest version {"latest":"3.11.1"}
[2021-08-08T08:00:03.923Z] debug comparing versions {"current":"3.11.1","latest":"3.11.1"}
[2021-08-08T08:00:04.004Z] debug exthost Handshake completed {"token":"8055ab76-f6e1-43a8-a8fb-51594642c73d"}
[2021-08-08T08:00:04.004Z] debug exthost Sending socket {"token":"8055ab76-f6e1-43a8-a8fb-51594642c73d"}
 INFO Installing extension: ms-vscode.cpptools
 INFO Downloaded extension: ms-vscode.cpptools /root/.local/share/code-server/CachedExtensionVSIXs/ms-vscode.cpptools-1.5.1
 INFO Extracted extension to /root/.local/share/code-server/extensions/.a2093314-522e-4391-a722-35ea915bd216: ms-vscode.cpptools
 INFO Renamed to /root/.local/share/code-server/extensions/ms-vscode.cpptools-1.5.1
 INFO Installation completed. ms-vscode.cpptools
 INFO Extensions installed successfully: ms-vscode.cpptools
[2021-08-08T08:00:20.200Z] debug management Disposing... {"token":"ac08c10c-7b38-4d8c-b887-35b5c2d51942"}
[2021-08-08T08:00:20.202Z] debug management Closed {"token":"ac08c10c-7b38-4d8c-b887-35b5c2d51942"}
[2021-08-08T08:00:20.221Z] debug setting up vs code...
[2021-08-08T08:00:20.222Z] debug vscode got message from code-server {"type":"init"}
[2021-08-08T08:00:20.244Z] debug exthost Got disconnected message {"token":"8055ab76-f6e1-43a8-a8fb-51594642c73d"}
[2021-08-08T08:00:20.244Z] debug exthost Disconnected {"token":"8055ab76-f6e1-43a8-a8fb-51594642c73d"}
[2021-08-08T08:00:20.599Z] debug vscode got message from code-server {"type":"socket"}
[2021-08-08T08:00:20.601Z] debug protocol Initiating handshake... {"token":"1e1849a1-f95e-4a78-9e37-5d90b2fff7f3"}
[2021-08-08T08:00:20.648Z] debug protocol Handshake completed {"token":"1e1849a1-f95e-4a78-9e37-5d90b2fff7f3"}
[2021-08-08T08:00:20.648Z] debug management Connecting... {"token":"1e1849a1-f95e-4a78-9e37-5d90b2fff7f3"}
[2021-08-08T08:00:20.649Z] debug vscode 1 active management connection(s)
[2021-08-08T08:00:20.957Z] debug got latest version {"latest":"3.11.1"}
[2021-08-08T08:00:20.958Z] debug comparing versions {"current":"3.11.1","latest":"3.11.1"}
[2021-08-08T08:00:21.001Z] debug vscode got message from code-server {"type":"socket"}
[2021-08-08T08:00:21.002Z] debug protocol Initiating handshake... {"token":"b4a8a4d8-eb49-4290-bf64-9f120c6a7606"}
[2021-08-08T08:00:21.242Z] debug exthost Exited {"code":0,"token":"8055ab76-f6e1-43a8-a8fb-51594642c73d"}
[2021-08-08T08:00:21.242Z] debug exthost Disposing... {"token":"8055ab76-f6e1-43a8-a8fb-51594642c73d"}
[2021-08-08T08:00:21.242Z] debug exthost Closed {"token":"8055ab76-f6e1-43a8-a8fb-51594642c73d"}
[2021-08-08T08:00:21.243Z] debug protocol Handshake completed {"token":"b4a8a4d8-eb49-4290-bf64-9f120c6a7606"}
[2021-08-08T08:00:21.243Z] debug exthost Connecting... {"token":"b4a8a4d8-eb49-4290-bf64-9f120c6a7606"}
[2021-08-08T08:00:21.244Z] debug exthost Getting NLS configuration... {"token":"b4a8a4d8-eb49-4290-bf64-9f120c6a7606"}
[2021-08-08T08:00:21.244Z] debug vscode 1 active exthost connection(s)
[2021-08-08T08:00:21.244Z] debug exthost Spawning extension host... {"token":"b4a8a4d8-eb49-4290-bf64-9f120c6a7606"}
[2021-08-08T08:00:21.253Z] debug exthost Waiting for handshake... {"token":"b4a8a4d8-eb49-4290-bf64-9f120c6a7606"}
[2021-08-08T08:00:21.606Z] debug exthost Handshake completed {"token":"b4a8a4d8-eb49-4290-bf64-9f120c6a7606"}
[2021-08-08T08:00:21.607Z] debug exthost Sending socket {"token":"b4a8a4d8-eb49-4290-bf64-9f120c6a7606"}

Screenshot

image

Notes

This issue can be reproduced in VS Code: Not sure

@HuJK HuJK changed the title Code-server install arm64 extension on my x86_64 machine Code-server install arm64 version of C++ extension on my x64 machine Aug 8, 2021
@HuJK HuJK changed the title Code-server install arm64 version of C++ extension on my x64 machine C++ extension not works on my x64 server Aug 8, 2021
@HuJK HuJK changed the title C++ extension not works on my x64 server [Bug report] C++ extension not works on my x64 server Aug 8, 2021
@goddade
Copy link

goddade commented Aug 9, 2021

same problem.

@hyoputer
Copy link

I recommend you refer to #2120. A rather temporary fix is to manually download the right version of the vsix file from the cpptools releases page and install it from there.

@jsjoeio jsjoeio added the needs-investigation This issue needs to be further investigated label Aug 10, 2021
@HuJK
Copy link
Author

HuJK commented Aug 10, 2021

At the moment our plan is to switch to Open VSX which will deprecate our
marketplace.
Originally posted by @code-asher in #2120 (comment)

Oh, The real problem is the runtime license of vscode-cpptools are not fully open sourced mentioned here: open-vsx/publish-extensions#250

So this C++ extension will still not available after this upgrade😢.
But this is Microsoft's problem, there are nothing we can do... Or can we?

@jsjoeio
Copy link
Contributor

jsjoeio commented Aug 10, 2021

It restricts usage to Microsoft products. We accept only open source licenses in this publishing repository.

I don't think so sadly 😢 cc @code-asher

@code-asher
Copy link
Member

code-asher commented Aug 12, 2021 via email

@vipwp
Copy link

vipwp commented Sep 16, 2021

@HuJK You can download cpptools-linux.vsix from https://github.com/microsoft/vscode-cpptools/releases, and than use "install from vsix". It works for me.

@HuJK
Copy link
Author

HuJK commented Sep 17, 2021

The problem is the extension is free to distribute, but not open source. And open-vsx accepts open source extensions only.

I think there is four solution.

  1. Use the marketplace hosted by Microsoft directly.
    • Disadvantage: not sure it is legal or not.
  2. Download vsix and install manually.
    • Disadvantage: can't auto upgrade.
  3. Create another registry provides it. Just like nonfree distros in debian, allow users to choose
    • Disadvantage: host and maintain registries costs money.
  4. Convince open-vsx add a contrib , nonfree divisions which allows extensions such as this extension.
    • Disadvantage: eclipse foundation may not accept our suggestion.

@jsjoeio
Copy link
Contributor

jsjoeio commented Sep 17, 2021

Use the marketplace hosted by Microsoft directly.

We can't do this for legal reasons 😢 Against their TOS.

Create another registry provides it. Just like nonfree distros in debian, allow users to choose

code-server currently has a private closed-source extension marketplace but we're trying to move away from that since it's too much time + effort to maintain and Open VSX is better anyway.

Convince open-vsx add a contrib , nonfree divisions which allows extensions such as this extension.

Hey, if you start the discussion, I'm happy to chime in and say it would help code-server.

Download vsix and install manually.

This is our best solution for now :(

@stale
Copy link

stale bot commented Mar 16, 2022

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.

@stale stale bot added the stale This issue has not had activity in a while and will be closed label Mar 16, 2022
@stale stale bot closed this as completed Mar 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-investigation This issue needs to be further investigated stale This issue has not had activity in a while and will be closed
Projects
None yet
Development

No branches or pull requests

6 participants