-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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]: extensions pomdtr.excalidraw-editor-3.5.2-universal static resource net::ERR_ABORTED 401 #6306
Comments
code-server: 4.13.0 2798322 with Code 1.78.2 |
Thanks for the investigation! |
The behavior I am seeing is a bit different.
excalidraw-editor is working for me (I can create demo.excalidraw
and draw shapes) on code-server 4.14.1 if I install via the
command line (I tried both Firefox and Chromium).
Is there anything at all unusual about your setup? I am not sure
where the 401 would be coming from. I enabled password
authentication but that works for me as well. Does this reproduce
for you in an incognito window? Or in another browser?
Interestingly though, if I install via the UI it gets installed as
a browser extension and does not work although I am not seeing 401
errors then either. I do see some 404s and 406s trying to make
requests to open-vsx.org though. But this seems to be a different
issue.
|
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. |
More complete reproduction steps:
Please try the above steps. Hopefully this will make the problem come up again. |
Is the self-signed certificate trusted on your browser? Caddy is supposed to install them for you but in my case I had to add Caddy's CA to Chrome's trust store to even get it to load the site. Once I loaded the site Excalidraw worked for me. I am running this on Ubuntu though. Do you get the same issue without TLS through Caddy? Although I am not sure how a cert issue could cause a 401 so this might not be relevant. What if you load it directly without a reverse proxy? |
Self-signed certificates are trusted.I'm sorry. I missed a step. No reverse proxy: Strangely, static resources for other extensions, such as draw.io, load normally. |
I tested ubuntu. |
|
It only works properly on ubuntu systems !
Interesting! I tried to reproduce with a CentOS Docker image but
it still works for me. Maybe it does not reproduce in Docker?
Here is what I tried:
```
docker run -it -p 8080:8080 centos sh
curl -L https://code-server.dev/install.sh | sh
code-server --install-extension pomdtr.excalidraw-editor
PASSWORD=test code-server --host 0.0.0.0
```
Then I opened a private window (to make sure my cache was clear)
and went to http://localhost:8080/?folder=/root.
`code-server: 4.13.0` doesn't have that problem, 4.13.0 to
4.14.1 are there some security-related changes that caused this
problem?
Very strange. I am not seeing anything that could be affecting
this. I do not believe any changes to authentication were made,
at least.
There was an update to VS Code though. These particular assets
are requested through the service worker so maybe a change was
made there that caused this.
Do you still get the 401 if you use --auth none? Just to see if
the 401 is coming from code-server or somewhere else.
|
So strange, if auth is off then I have no idea where the 401 comes
from.
To double-check, have you already tried in a private/incognito
window to rule out caching issues with the service worker?
I did briefly try to launch a CentOS VM but for some reason I am
having trouble getting the networking to work so for now this is
as far as I can go.
|
Yes, I have tried the private/incognito window. I also tried to clear the cache, the problem still exists. Note: |
Bummer, but thank you for trying.
There were two features added between those versions but I am not
seeing how they could cause this so I think it is likely the
update from Code 1.78.2 to 1.79.2; someone will have to step
through or bisect once they can reproduce.
v4.13.0...v4.14.0
I will try again with the VM but I might not get to it soon. In
the meantime if you think of anything else unique about your setup
or a different way to reproduce please let me know.
|
any news on this issue? I really like excalidraw but currently I've got to switch to my local VSCode as it is not working anymore. Using latest code-server version: code-server: v4.16.1 As a side node the remote installed extension (inside a Coder workspace) does not show up in remote extension panel. |
No updates. I have not had a chance to try the VM again. Are you
also running in a CentOS VM?
|
No we're using coder workspaces. The workspace image is manjaro based. |
can you give me an hint howto compile and run code-server locally? I can try to bisect this one. |
The instructions are described here: https://github.com/coder/code-server/blob/main/docs/CONTRIBUTING.md#development-workflow But if my suspicions about the issue being inside VS Code are true then a bisect will be difficult because we have no good way to bisect individual VS Code commits between each version. |
If the problem is in VS Code then it might make sense to try and reproduce with VS Code alone rather than through code-server, then the bisect should be easier. |
ah I see what you mean. Maybe I should try to serve VS Code via |
Hi @code-asher, yesterday I did a quick test and installed latest code-server v4.17.1. Now I can open excalidraw sheets again. |
Great news! |
Interesting, excalidraw extension works for me only on v4.16.1 and extension version 3.5.1 (on debian testing, verified on two installations, with https). If I upgrade any of the two, excalidraw stops working. Any tricks? |
More debugging shows something weird, when I try to open an excalidraw file the client tries to retrieve two resources from: https://vscode-remote+my-002edomain-003a40000.vscode-resource.vscode-cdn.net/__myhomedir__/.local/share/code-server/extensions/pomdtr.excalidraw-editor-3.6.1-universal/public/static/js/main.75859edd.js which obviously fail... very interesting. |
setting
solves the issue on latest code-server with the latest version of the extension |
Yes, those two resources main.75859edd.js and main.11acca1e.css I tried to go over and change the settings But interesting... |
Yes, i must admit the solution works only if I disable/enable the extension and reload the app once more after opening code-server on client side. |
I am not still not sure what is going on, but I can at least comment on the weird But as to why they 401 in that case...no idea. I am not sure if I have tried with auth on yet so I will have to give it a go. |
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. |
In the meanwhile I don't have this issue anymore, most probably subsequent updates fixed it |
still experiencing this with the latest version of code-server, as well as excalidraw extension. It looks like either the extension (or code-server) is causing the extension to load it's web assets directly from openvsx.org, rather than through the virtual filesystem with the files embedded in the extension. I looked at the code of the extension, and it doesn't look any different from other extensions loading assets (index.html/css for embedded web views), and it doesn't occur when running the excalidraw extension locally/outside of code-server. I believe this is an issue with code server, or whatever code-server is based off, which is providing the wrong base/file URL to the extension, for which it tries to load things. EDIT:
I have found that when the browser version is uninstalled, but it still is installed (on code-server), this seems to work (at least in our case, because the server doesn't have the same corporate firewall restrictions). however, I haven't found a way to tell an extension to only be server-side, if the extension supports browser and server. So the next reload often causes it to break again. |
Yeah I noticed the same thing. I think the only way to make it install on the server is to use Edit: I believe browser extensions pull their files directly from the marketplace, so this is by design even though personally I think they should have downloaded it to the remote and pulled the files off there. Maybe it was done this way to also support vscode.dev which has no backend though. |
Actually I just tried again on code-server 4.91.0 with it installed as a browser extension and it is working as expected. 🤔 |
Even if the extension "works", the problem is that something is causing the extension to load files directly from openvsx.org, rather than from within code-server and the virtual filesystem endpoints. It only becomes a problem if you cannot connect to openvsx.org (or similar). Some more info below. Reproduction steps:
In my case, I am running this test from my personal device, so there are no network issues reaching outbound. This does not work in many corporate environments, however. This is an issue for a few reasons:
code-server info from the above test:
extension version: |
this is the code on the excalidraw extension side that does the loading of the webview content: looking at the official docs, I don't see anything wrong with this: not sure how or where |
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 |
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. |
Is there an existing issue for this?
OS/Web Information
code-server --version
: 4.14.1 5c19962 with Code 1.79.2Steps to Reproduce
Expected
response 200
excalidraw renders normally
Actual
net::ERR_ABORTED 401
excalidraw cannot be rendered
Logs
browser console:
Screenshot/Video
No response
Does this issue happen in VS Code or GitHub Codespaces?
Are you accessing code-server over HTTPS?
Notes
No response
The text was updated successfully, but these errors were encountered: