-
Notifications
You must be signed in to change notification settings - Fork 5.9k
Reinstalled, and now can't load code-server, at all #2286
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
Comments
Strange, is this one of our code-server builds? There shouldn't be any
Typescript files; they get compiled to Javascript (since unfortunately
browsers don't understand Typescript).
```
$ curl -L https://github.com/cdr/code-server/releases/download/v3.6.2/code-server-3.6.2-linux-amd64.tar.gz | tar -xz
$ tree -L 2 code-server-3.6.2-linux-amd64/lib/vscode/out/vs/
├── base
│ ├── browser
│ ├── common
│ ├── node
│ └── worker
├── code
│ ├── browser
│ └── electron-sandbox
├── editor
│ └── standalone
├── loader.js
├── loader.js.map
├── platform
│ ├── extensionManagement
│ └── files
├── server
│ ├── entry.js
│ ├── entry.js.map
│ ├── entry.nls.js
│ ├── entry.nls.js.map
│ ├── fork.js
│ └── fork.js.map
└── workbench
├── browser
├── contrib
├── services
├── workbench.web.api.css
├── workbench.web.api.js
├── workbench.web.api.js.map
├── workbench.web.api.nls.js
└── workbench.web.api.nls.js.map
```
In production builds along with compiling to Javascript we also bundle
the files together so the browser has to make fewer requests which is
why you don't see a 1:1 map of ts files to js files in the output above.
My guess is that main bundle doesn't exist (workbench.web.api.js) and
it's trying to fall back to loading each module individually but those
don't exist either.
|
@code-asher I've done it through the install script, I've done it through git and pulling code-server, but also the vscode repo, and now I've tried it from this tar. It's constantly the same error and no compiling every happens |
And also with the new install, the entire vscode/out folder is completely missing anyways, so of course it'll error, there's something up with how this thing is installed, I don't know changed but it worked beautifully a few months ago. |
In order to even get a temporary solution, I had to do way too much.
And that's it, should no longer receive errors while starting up nor receive 404's while trying to load, use Regards, |
The tar doesn't require compiling; it'll already be compiled. But if the browser is still requesting development files then I think it's probably either because of browser caching (does clearing the cache or using an incognito window help?) or because of a bug in the loader code.
I think the installer is unlikely to be the issue; all it does is pull the release and unpack it for you, which we've both verified has the right files. But it could be a bug in the code itself that is responsible for fetching the right files from disk from the browser. It could be requesting the development files instead of the production ones for some reason. In other issues I've seen users report that when running a prebuilt release the 404s show but the page still loads and works. Was that the case for you when you tried the tar? It's also been reported to happen when |
The same thing happened across completely different machines, apps, browsers, and clearing cache didn't help. Leaving a possible loader issue.
I'm not sure exactly what the issue is, but from what I gathered it was just missing files, but regardless it trying to request these and failing should maybe log something, or describe what the issue could be. Cuz again it's not something I was purposely trying to do, so any user could possibly find this issue
The issue happened with both the tar, and with the install.sh code, both times it did the same thing.
The workbench files were, and a few others, the only files that successfully loaded according to the network tab at least. |
Thanks for your responses. I'll take a look at the loader code and see
if I can find anything.
|
After a fresh restart of my system, the error seems to have gone away. I noticed that sometimes serving static files for my sites got cut in half randomly, restarting NGINX fixed that, but I didn't have time to take a look before restarting so I could be wrong in my thinking the same thing happened to code-server. |
Ahhhhh that could definitely explain this behavior. I'll have to make
some modifications to account for that scenario.
|
|
It might be a cache issue; if so it should fixable by clearing
cache or opening the browser dev tools, going to the network tab,
checking "disable cache", then reloading the page.
If that does not fix it please check the network tab for
`workbench.web.api.js` and see if it downloaded fully.
|
After reinstalling code-server to update, the page loads, but no longer can open the editor.


I've done some deep searching through all the libraries and things involved, and figured out that the browser is requesting a .js file from /lib/vscode/...
However the files in here are .ts. And so in the console you receive a 404 for a lot of files.
Going to the 404 url, and replacing .js with .ts, shows the file properly, however, obviously, this shouldn't be requesting the .js files in the first place.
Below is a screenshot of the networks tab of all these 404's showing up:
And here's a screenshot of the /lib/vscode/out/vs/common/base where the uri.js is supposed to be, and you can see it is instead here in a .ts
Everything in this directory is a .ts except performance.js and it's map.
I can also tell this is the issue but right clicking, opening the 404'd URL in the new tab, and replacing .js with .ts at the end of the file, which then shows the contents of the file properly.
Which also makes me super confused, because I know that code-server has pretty much always used typescript for it's frontend exports, but for some reason it's requesting for a .js file.
There ought to be something that I'm doing wrong, any help is appreciated, and hopefully this opens some insight into some ease-of-use installing fixes causing unexpected issues.
code-server --version
: 3.6.2The text was updated successfully, but these errors were encountered: