Skip to content

Various Files Reporting 404 #3328

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

Closed
TolleyLikesRice opened this issue May 9, 2021 · 11 comments
Closed

Various Files Reporting 404 #3328

TolleyLikesRice opened this issue May 9, 2021 · 11 comments
Milestone

Comments

@TolleyLikesRice
Copy link

OS/Web Information

  • Web Browser: Chrome
  • Local OS: Windows 10
  • Remote OS: Ubuntu Server 20.04
  • Remote Architecture: x64
  • code-server --version: 3.9.3 fe2dc2d

Steps to Reproduce

  1. Install Code-Server
  2. Having it working for a while
  3. Try to connect one day, enter password, blank screen.

Expected

Perfectly Functional Server

Actual

Blank Screen

Log + Info

The server is behind an nginx proxy. The server used to be functional, when I go to one of the URLs reported as a 404, I receive: {"error":"ENOENT: no such file or directory, open '/usr/lib/code-server/lib/vscode/out/vs/base/common/lifecycle.js'"}. I have checked the folder it is looking for, and it indeed does not contain those files. Issue #1640 seems to have a similar issue, yet was fixed with an update.

Browser Log: (domain cropped off)
image

@TolleyLikesRice
Copy link
Author

Also forgot to note that I have tried the steps in #1836

@jsjoeio jsjoeio added the needs-investigation This issue needs to be further investigated label May 10, 2021
@jsjoeio jsjoeio added this to the Backlog milestone May 10, 2021
@code-asher
Copy link
Member

Is there some kind of timeout or error in the network tab for workbench.web.api.js?

In my experience this happens because the main bundle fails to download so VS Code tries to request the individual files instead but we only ship the bundle, not the individual sources.

It should get cached though so theoretically if you've successfully loaded once it should keep working unless the cache was cleared.

This might have something to do with how we load the workbench in vscode.html. It deviates slightly from how VS Code does it in production so we should take a look at that.

@code-asher
Copy link
Member

#2286 (comment) may also be relevant.

@TolleyLikesRice
Copy link
Author

image

workbench.web.api.js is found.

also, I believe that these issues started around the same time I started using openresty (nginx fork/mod), although I'm not 100% sure. But that doesn't really make sense since all data is being passed back through a proxy pass.

@TolleyLikesRice
Copy link
Author

Oh, or not, http2_protocol_error is causing workbench.web.api.js to not load, Chrome just decided in it's infinite wisdom to not highlight that. Gonna look deeper into my NGINX config

@TolleyLikesRice
Copy link
Author

Okay, so Firefox handles it fine, and doing some further research shows that Chrome will fail a file load if the headers don't match what it receives. (e.g Content-Size). Now, I have no idea what headers could cause this, any ideas?

Firefox:
image

Chrome:
image

These are both specifically on the URL https://DOMAIN/static/fe2dc2deb08e378069891b622bb62ad1d261d1b1/usr/lib/code-server/lib/vscode/out/vs/workbench/workbench.web.api.js Firefox shows multiple requests to workbench.web.api.js, but I assume this is due to it getting further in the loading process.

@TolleyLikesRice
Copy link
Author

Also, doing full reloads (no cache) for these.

@TolleyLikesRice
Copy link
Author

And, now firefox is broken after the no-cache reload, didn't notice since the grey background still appeared, and most of my screen was allocated to devtools

@code-asher
Copy link
Member

Do you have any idea if this happens when you access code-server directly without a reverse proxy?

It might also help to check the proxy logs to see if it says anything about that request.

I wonder if you try to open workbench.web.api.js directly in a new tab if it works? I'm not sure what this would tell us though.

As for headers I don't think we send content-size and the others don't look like they should cause any issues but I'm not sure.

@MxD-js
Copy link

MxD-js commented May 19, 2021

Hmm. I cannot say that I am getting the same thing. I am also using Nginx as reverse proxy w/ HTTP/2 enabled. Mainly using reverseproxy for the ssl part. My setup is exactly like yours. On a dedicated ubuntu VM 20.04.

@TolleyLikesRice
Copy link
Author

Sorry for the late response, but I can confirm it's something funky with the proxy. Directly accessing the server works fine. I'll close this since it's something on my system.

@code-asher code-asher removed the needs-investigation This issue needs to be further investigated label Jul 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants