Error while fetching extensions. Server returned 503
Is there an existing issue for this?
- [X] I have searched the existing issues
OS/Web Information
- Web Browser: Chrome
- Local OS: Mac Os
- Remote OS: Ubunut
- Remote Architecture: x64
code-server --version: 4.3.0 09bc30027a7fbba170f907a527eaa9f7219fe739 with Code 1.65.2
Steps to Reproduce
- open code-server
- Search any extension
Expected
It should search the extension
Actual
But getting error Error while fetching extensions. Server returned 503
Logs
No response
Screenshot/Video
Does this issue happen in VS Code?
- [X] I cannot reproduce this in VS Code.
Are you accessing code-server over HTTPS?
- [X] I am using HTTPS.
Notes
The issue is happening because the new code-server version sending requests to https://open-vsx.org/vscode/gallery/extensionquery but the old version which is working fine is sending requests to https://extensions.coder.com/api/extensionquery that's why I am getting error.
ERROR CURL
curl 'https://open-vsx.org/vscode/gallery/extensionquery' \
-H 'Accept: application/json;api-version=3.0-preview.1' \
-H 'Content-Type: application/json' \
--data-raw '{"filters":[{"criteria":[{"filterType":10,"value":"golan"},{"filterType":8,"value":"Microsoft.VisualStudio.Code"},{"filterType":12,"value":"4096"}],"pageNumber":1,"pageSize":50,"sortBy":0,"sortOrder":0}],"assetTypes":[],"flags":950}' \
--compressed
WORKING CURL
curl 'https://extensions.coder.com/api/extensionquery' \
-H 'accept: application/json;api-version=3.0-preview.1' \
-H 'content-type: application/json' \
--data-raw '{"filters":[{"criteria":[{"filterType":8,"value":"Microsoft.VisualStudio.Code"},{"filterType":10,"value":"gol"},{"filterType":12,"value":"4096"}],"pageNumber":1,"pageSize":50,"sortBy":0,"sortOrder":0}],"assetTypes":[],"flags":950}' \
--compressed
I have same problem :-(

I think this problem source is https://open-vsx.org/ not available now.
Meeeee Tooooo!! T_T
On the xavier ...
Was it down temporarily? It's working for me

Yes, https://open-vsx.org was down today which caused the issue. The issue seems to be resolved now. So closing the ticket.
It's happening now, again...
It's happening now, again...
Error
Request failed: GET https://open-vsx.org/user (Service Unavailable)

Error Request failed: GET https://open-vsx.org/user (Service Unavailable)
OK.... I can install the extensions from VSIX: https://www.alphr.com/vs-code-how-to-install-extensions/
This is happening again for me. It seems like vsx server is quite unreliable.
To address this, I changed the default in the settings General from:
https://open-vsx.org/vscode/gallery
to
https://marketplace.visualstudio.com/_apis/public/gallery
...and from https://open-vsx.org/vscode/item to https://marketplace.visualstudio.com/items
This is happening again for me. It seems like vsx server is quite unreliable.
To address this, I changed the default in the settings
Generalfrom: https://open-vsx.org/vscode/gallery to https://marketplace.visualstudio.com/_apis/public/gallery...and from https://open-vsx.org/vscode/item to https://marketplace.visualstudio.com/items
Its works for me, dont forget restart your editor
This is happening again for me. It seems like vsx server is quite unreliable.
To address this, I changed the default in the settings
Generalfrom: https://open-vsx.org/vscode/gallery to https://marketplace.visualstudio.com/_apis/public/gallery...and from https://open-vsx.org/vscode/item to https://marketplace.visualstudio.com/items
It works!
This is happening again for me. It seems like vsx server is quite unreliable.
To address this, I changed the default in the settings
Generalfrom: https://open-vsx.org/vscode/gallery to https://marketplace.visualstudio.com/_apis/public/gallery...and from https://open-vsx.org/vscode/item to https://marketplace.visualstudio.com/items
How exactly can I change the settings?
This is happening again for me. It seems like vsx server is quite unreliable.
To address this, I changed the default in the settings
Generalfrom: https://open-vsx.org/vscode/gallery to https://marketplace.visualstudio.com/_apis/public/gallery...and from https://open-vsx.org/vscode/item to https://marketplace.visualstudio.com/items
How exactly can I change the settings?
The fix is to add
"extensionsGallery": { "serviceUrl": "https://marketplace.visualstudio.com/_apis/public/gallery",
"itemUrl": "https://marketplace.visualstudio.com/items" }
to /usr/lib/code-server/lib/vscode/product.json or any alternative location of product.json
if you're using the docker container, you ought to be able to set it via env var. EXTENSIONS_GALLERY='{"serviceUrl": "https://extensions.coder.com/api"}'
didn't work for me, so I'm overriding the entrypoint, which did work.
#!/bin/bash
set -e
PRODUCT_JSON="/app/code-server/lib/vscode/product.json"
if [ -f "$PRODUCT_JSON" ]; then
# only insert once
if ! grep -q '"extensionsGallery"' "$PRODUCT_JSON"; then
# insert right after the opening `{`
sed -i '1s|{|{\
\ "extensionsGallery": {\
\ "serviceUrl": "https://marketplace.visualstudio.com/_apis/public/gallery",\
\ "itemUrl": "https://marketplace.visualstudio.com/items"\
\ },|' "$PRODUCT_JSON"
echo "✓ injected extensionsGallery into product.json"
fi
else
echo "⚠️ product.json not found at $PRODUCT_JSON"
fi
# Continue with the default container startup
exec /init
in docker-compose.yml
services:
codeserver:
image: linuxserver/code-server:latest
user: "${UID:-0}:${GID:-0}"
environment:
PUID: 0 # linuxserver/codeserver
PGID: 0 # linuxserver/codeserver
TZ: Europe/Brussels
...
entrypoint: ["/bin/bash", "/config/entrypoint.sh"]
if you're using the docker container, you ought to be able to set it via env var. EXTENSIONS_GALLERY='{"serviceUrl": "https://extensions.coder.com/api"}'
didn't work for me, so I'm overriding the entrypoint, which did work.
#!/bin/bash set -e
PRODUCT_JSON="/app/code-server/lib/vscode/product.json"
if [ -f "$PRODUCT_JSON" ]; then
only insert once
if ! grep -q '"extensionsGallery"' "$PRODUCT_JSON"; then # insert right after the opening
{sed -i '1s|{|{
\ "extensionsGallery": {
\ "serviceUrl": "https://marketplace.visualstudio.com/_apis/public/gallery",
\ "itemUrl": "https://marketplace.visualstudio.com/items"
\ },|' "$PRODUCT_JSON" echo "✓ injected extensionsGallery into product.json" fi else echo "⚠️ product.json not found at $PRODUCT_JSON" fiContinue with the default container startup
exec /init in docker-compose.yml
services: codeserver: image: linuxserver/code-server:latest user: "${UID:-0}:${GID:-0}" environment: PUID: 0 # linuxserver/codeserver PGID: 0 # linuxserver/codeserver TZ: Europe/Brussels ... entrypoint: ["/bin/bash", "/config/entrypoint.sh"]
if you remove the single quotes form around the json, it works, however you can't install anything because they aren't signed by the extension marketplace