Skip to content

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

Closed

Description

@HuJK

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

Activity

  1. 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[/+] on Aug 8, 2021
  2. changed the title [-]Code-server install arm64 version of C++ extension on my x64 machine[/-] [+]C++ extension not works on my x64 server[/+] on Aug 8, 2021
  3. changed the title [-]C++ extension not works on my x64 server[/-] [+][Bug report] C++ extension not works on my x64 server[/+] on Aug 8, 2021
  4. goddade commented on Aug 9, 2021

    @goddade

    same problem.

  5. hyoputer commented on Aug 10, 2021

    @hyoputer

    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.

  6. HuJK commented on Aug 10, 2021

    @HuJK
    Author

    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: EclipseFdn/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?

  7. jsjoeio commented on Aug 10, 2021

    @jsjoeio
    Contributor

    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

  8. code-asher commented on Aug 12, 2021

    @code-asher
    Member
  9. vipwp commented on Sep 16, 2021

    @vipwp

    @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.

  10. HuJK commented on Sep 17, 2021

    @HuJK
    Author

    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.
  11. jsjoeio commented on Sep 17, 2021

    @jsjoeio
    Contributor

    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 :(

  12. stale commented on Mar 16, 2022

    @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

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions