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]: desktop-only extensions are forced to disable in code-server #5609

Closed
Creling opened this issue Oct 1, 2022 · 7 comments
Closed

[Bug]: desktop-only extensions are forced to disable in code-server #5609

Creling opened this issue Oct 1, 2022 · 7 comments
Labels
waiting-for-info Waiting for more information from submitter

Comments

@Creling
Copy link

Creling commented Oct 1, 2022

Hi,

When I try to enable Remote - SSH, the code-server says This extension is disabled because it is defined to run only in code-server for the Desktop.

I understand that may guys have discuessed it before in #1315. But it is strange that Open Remote - SSH, an open-source alternative for Remote - SSH, is also forced to disable in code-server.

This limitation is known to exists in vscode.dev as their doc describes:

Since VS Code for the Web runs completely within the browser, some experiences will naturally be more constrained when compared to what you can do in the desktop app. For example, the terminal and debugger are not available, which makes sense since you can't compile, run, and debug a Rust or Go application within the browser sandbox.

But I think code-server is somewhat different from vscode.dev since it is not running completely within the browser ?

@Creling Creling added the enhancement Some improvement that isn't a feature label Oct 1, 2022
@Creling Creling changed the title [Bug]: desktop-only extensions are focused to disable in code-server [Bug]: desktop-only extensions are forced to disable in code-server Oct 1, 2022
@jsjoeio
Copy link
Contributor

jsjoeio commented Oct 4, 2022

Sadly, I don't think there is much we can do to support Remote - SSH 😢

But it is strange that Open Remote - SSH, an open-source alternative for Remote - SSH, is also forced to disable in code-server.

Have you tried raising an issue with the extension author?

@jsjoeio jsjoeio added waiting-for-info Waiting for more information from submitter and removed enhancement Some improvement that isn't a feature labels Oct 4, 2022
@Creling
Copy link
Author

Creling commented Oct 5, 2022

Have you tried raising an issue with the extension author?

jeano413 (the author) mentioned a SPECIAL API in an code-server-related issue raised before:

This extension uses a special vscode API to connect the local ui to the remote machine. jeanp413/open-remote-ssh#3

I post a new reply in the issue for more information just now.

@jsjoeio
Copy link
Contributor

jsjoeio commented Oct 5, 2022

Awesome! I'll comment on there.

@liebki
Copy link

liebki commented Nov 13, 2023

Hi, old conversation I know but what you can try (not good practice but if you need an extension):

  1. Open the .vsix
  2. Go in the "extension" folder
  3. Edit the "package.json" file
  4. Search for "extensionKind" and if it only says:
 "extensionKind": [
    "ui"
  ],

then just remove the whole part.

I'm using the newest version and I couldn't install a specific wasm-extension but after removing this part, it was installed flawlessly and I was able to use it.

@liudonghua123
Copy link

liudonghua123 commented Dec 22, 2023

Hi, old conversation I know but what you can try (not good practice but if you need an extension):

  1. Open the .vsix
  2. Go in the "extension" folder
  3. Edit the "package.json" file
  4. Search for "extensionKind" and if it only says:
 "extensionKind": [
    "ui"
  ],

then just remove the whole part.

I'm using the newest version and I couldn't install a specific wasm-extension but after removing this part, it was installed flawlessly and I was able to use it.

Nice hacks, I want to use antfu.browse-lite in github codespace, and I can debug and run this extension in codespace, so this extension should work in codespace. But when I installed the extension, it just shown This extension is disabled because it is defined to run only in code-server for the Desktop. and could not use in codespace.

Remove extensionKind in package.json of vsix file (zip file acturally), then installed from vsix works for me.

For this extension, you have to install and configure chrome.

  1. install chrome
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
sudo apt update
sudo apt install -y ./google-chrome-stable_current_amd64.deb
  1. config extension settings
browse-lite.chromeExecutable: /usr/bin/google-chrome

Then this extension works like a charm.

@liudonghua123
Copy link

liudonghua123 commented Dec 22, 2023

From the docs on https://code.visualstudio.com/api/advanced-topics/remote-extensions#common-problems, I found a more elegant and clean method. Just add the following configurations to json settings. The remote.extensionKind will overwrite the extensionKind in package.json of extension.

Using this method, the extension could auto update without modification.

    "remote.extensionKind": {
        "antfu.browse-lite": [
            "ui",
            "workspace",
        ]
    }

@code-asher
Copy link
Member

Closing since there is nothing we can do on our end. The workspace addition is the right fix!

@code-asher code-asher closed this as not planned Won't fix, can't repro, duplicate, stale Mar 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
waiting-for-info Waiting for more information from submitter
Projects
None yet
Development

No branches or pull requests

5 participants