Can't Find certain extensions in CODE-OSS(Open source variant of Visual Studio Code)
Asked Answered
R

5

43

I have been using Code-OSS in manjaro linux for some months now and this is the first time I am encountering this. (After I reinstalled manjaro) When I search for e.g, Java Extension Pack or Intellisense I don't get any result in the extension marketplace. I don't know if it's the problem of my setup or everyone is experiencing this. If you know of a solution please tell me.

Thanks in advance

Rajah answered 21/10, 2020 at 12:40 Comment(1)
Does this answer your question? "No extensions found" when running Visual Studio Code from sourceExcitable
R
7

Thank you @Clay for responding. I saw that post prior to me posting this question. Those bits of json code were already in my product.json file but still I was not able to get the extensions. Then I built the VISUAL STUDIO CODE (visual-studio-code-bin) from AUR and now its working normally as expected. I don't know what's the reason behind this,but that's how I fixed it.

Also if someone is reading this and wanna know about the different variants of VSCode then here is the archWiki page for VSCode.

Rajah answered 29/10, 2020 at 12:18 Comment(3)
Did you figure out why this happened? I have the same issue. And I'd like to stay out of AUR if possible.Deauville
@AbrahamFrancis no I didn't look into it. Why do you want want to stay out of AUR? I am new, so i am just curious.Rajah
Ah nothing. Its just a preference. I figured out Clay's answer did not work for me. I use Arch Linux and in my system, the file to be changed exists somewhere inside /usr/libDeauville
C
58

This can be fixed by adding following to product.json:

"extensionsGallery": {
    "serviceUrl": "https://marketplace.visualstudio.com/_apis/public/gallery",
    "cacheUrl": "https://vscode.blob.core.windows.net/gallery/index",
    "itemUrl": "https://marketplace.visualstudio.com/items"
}

This can also be fixed by copying product.json from an official build (in the .zip archvie, product.json is under /usr/share/code/resources/app/product.json which contains above lines). Depending on your distribution, exact location may vary.

More information: https://github.com/Microsoft/vscode/issues/1557

Commutative answered 26/10, 2020 at 12:58 Comment(6)
in addition, your question is possible duplicate of No extensions found when running Visual Studio Code from source couldnt comment due to insufficent rep.Commutative
This solution worked for me instead. The file was originally pointing to other urls.Jonijonie
I have to do this every time after code - OSS updates, so I created a small python script that automates this.Indicate
Also try looking at /usr/lib/code/product.json.Schliemann
I am having this problem with the Flatpak com.visualstudio.code-oss install. The product.json file looks to be inside the container. Isn't that "immutable"? For those looking the command is: $ flatpak run --command=sh com.visualstudio.code-oss. Which gives you visibility for the '/app/` containt mount point for: /run/user/1000/app/com.visualstudio.code-oss.Ginny
Thank you for this! Have not even considered trying to address this for years until I saw your answer today.Chacma
G
26

As an alternative to manually editing product.json or building whole visual-studio-code-bin from AUR you can use different AUR package - code-marketplace - that patches product.json from Code OSS package (code)

Gladysglagolitic answered 27/11, 2020 at 10:42 Comment(2)
Best answer, worked like a charm!Yours
yes best answer, but after building run sudo /usr/share/code-marketplace/patch.py code-marketplace patch once. close all open windows of oss. restart and it should now be functional. After that my understanding is that it will watch for changes to usr/lib/code/product.json and run this again. That's not really documented I just cloned the aur repo and took a look at the .hook file.Odoric
R
7

Thank you @Clay for responding. I saw that post prior to me posting this question. Those bits of json code were already in my product.json file but still I was not able to get the extensions. Then I built the VISUAL STUDIO CODE (visual-studio-code-bin) from AUR and now its working normally as expected. I don't know what's the reason behind this,but that's how I fixed it.

Also if someone is reading this and wanna know about the different variants of VSCode then here is the archWiki page for VSCode.

Rajah answered 29/10, 2020 at 12:18 Comment(3)
Did you figure out why this happened? I have the same issue. And I'd like to stay out of AUR if possible.Deauville
@AbrahamFrancis no I didn't look into it. Why do you want want to stay out of AUR? I am new, so i am just curious.Rajah
Ah nothing. Its just a preference. I figured out Clay's answer did not work for me. I use Arch Linux and in my system, the file to be changed exists somewhere inside /usr/libDeauville
J
0

For anyone using the lscr.io/linuxserver/code-server docker container like me, the .json is located at /app/code-server/lib/vscode/product.json.

Jopa answered 2/4, 2022 at 3:57 Comment(0)
M
0

I've encountered this using OSS Code on Manjaro as well, trying to install the Azure Resource Manager Tools extension. Not sure if this was an option when this question was posted, but you can download the extension (.vsix) file if possible, then bring up 'quick open' in OSS Code using Ctrl+Shift+P, search for "VSIX" and choose "Extensions: install from VSIX" to locate and install the downloaded .vsix file. After this, the extension was installed and usable in OSS Code, and is also configurable in the extension manager panel.

Mosier answered 19/5, 2022 at 12:17 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.