code-server: [Bug]: extensions pomdtr.excalidraw-editor-3.5.2-universal static resource net::ERR_ABORTED 401

Is there an existing issue for this?

  • I have searched the existing issues

OS/Web Information

  • Web Browser: Chrome Ver-113.0.5672.126
  • Local OS: windows11
  • Remote OS: Centos7.6
  • Remote Architecture: x86_64
  • code-server --version: 4.14.1 5c199629305a0b935b4388b7db549f77eae82b5a with Code 1.79.2

Steps to Reproduce

  1. code-server --install-extension pomdtr.excalidraw-editor
  2. run code-server
  3. create file demo.excalidraw
  4. open file demo.excalidraw
  5. view browser console

Expected

response 200
excalidraw renders normally

Actual

net::ERR_ABORTED 401
excalidraw cannot be rendered

Logs

browser console:

Request URL:
https://vscode-remote+vscode-002emydomain-002etop.vscode-resource.vscode-cdn.net/root/.local/share/code-server/extensions/pomdtr.excalidraw-editor-3.5.2-universal/public/static/js/main.7ef26bea.js
Request Method:
GET
Status Code:
401 (from service worker)
Referrer Policy:
strict-origin-when-cross-origin
Request URL:
https://vscode-remote+vscode-002emydomain-002etop.vscode-resource.vscode-cdn.net/root/.local/share/code-server/extensions/pomdtr.excalidraw-editor-3.5.2-universal/public/static/css/main.11acca1e.css
Request Method:
GET
Status Code:
401 (from service worker)
Referrer Policy:
strict-origin-when-cross-origin

Screenshot/Video

No response

Does this issue happen in VS Code or GitHub Codespaces?

  • I cannot reproduce this in VS Code.
  • I cannot reproduce this in GitHub Codespaces.

Are you accessing code-server over HTTPS?

  • I am using HTTPS.

Notes

No response

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 38 (20 by maintainers)

Most upvoted comments

For restrictive corporate environments typically the folks we work with host their own marketplace on premise using https://github.com/coder/code-marketplace, or the marketplace is proxied or whitelisted, if that helps.

They have to do this even without using web extensions anyway, because extension queries (like searching for extensions) also occur from the browser, last I checked.

the problem is that something is causing the extension to load files directly from openvsx.org

I agree this is dumb, but as mentioned this is just how web extensions work by design as far as I can tell so not much we can do about it, except maybe file an issue with VS Code.

You should see similar requests on the web versions of VS Code like vscode.dev and Codespaces, but not with the desktop version as it does not use web extensions.

This is controlled by the resourceUrlTemplate property of the extension gallery, which is configurable via the EXTENSIONS_GALLERY environment variable so one workaround would be to omit resourceUrlTemplate which I believe would disable web extensions altogether. But, this might not be ideal because some extensions you might want to be web extensions, like Vim to avoid round trips every time you type a character.

In the meanwhile I don’t have this issue anymore, most probably subsequent updates fixed it

Closing for now since the problem does not seem to be in code-server, but please feel free to continue commenting, and we can reopen if we discover anything.

ah I see what you mean. Maybe I should try to serve VS Code via code serve-web. Then this should not work too. If so then clone code directly and bisect.

https - I used caddy. And I upgraded from 4.13.0 to 4.14.1, I just replaced all the files in the project’s root directory. Some files like cache or extension package may not have been replaced. I’m not sure if those are the reasons, but I’ll do the test again sometime.