code-server: Error while fetching extensions. Server returned 503

Is there an existing issue for this?

  • 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

  1. open code-server
  2. 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

Screenshot 2022-04-27 at 11 54 53 AM

Does this issue happen in VS Code?

  • I cannot reproduce this in VS Code.

Are you accessing code-server over HTTPS?

  • 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

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 16 (1 by maintainers)

Most upvoted comments

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

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

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

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

It’s happening now, again…

Yes, https://open-vsx.org was down today which caused the issue. The issue seems to be resolved now. So closing the ticket.