-
Notifications
You must be signed in to change notification settings - Fork 5.9k
[Bug]: The workbench failed to connect to the server #6014
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
Does the IP you are connecting to go directly to the Docker
container or is there some kind of proxy in between? Usually 1006
means something is dropping the web socket.
Is this Docker Desktop on Windows or over WSL?
|
I am having the same error, mine is through an apache reverse proxy. I have tried the solutions of other threads, but they just don't work. |
Do you see any warnings or errors in code-server's logs?
If you are using 4.10.1 or later also make sure that the host
header matches the origin header that the browser is sending
otherwise the socket will be blocked for security reasons.
|
It turned out to be a missconfiguration under the .conf file. GPT4 solved It heh. Thank you so much, anyway. |
what fixed it? I'm having this same issue |
Try changing your .conf file to look like this: Ps: remember to end the conf file with " <VirtualHost *:80>
|
Closing as stale but feel free to comment if you come back to this. |
Is there an existing issue for this?
OS/Web Information
code-server --version
: 4.9.1Steps to Reproduce
docker run -d -it --name code-server -p 8080:8080
-v "/home/docker/code-server/config:/home/coder/.config"
-v "/home/docker/code-server:/home/coder/project"
-u "$(id -u):$(id -g)"
-e "DOCKER_USER=$USER"
codercom/code-server:4.9.1
open chrome http://${ip}:8080
find the config.yaml, and enter the password
it shows
The workbench failed to connect to the server (Error: WebSocket close with status code 1006)
and again and agin reload, i can`t use it
Expected
Not show
The workbench failed to connect to the server (Error: WebSocket close with status code 1006)
And use the IDE
Actual
Page shows
The workbench failed to connect to the server (Error: WebSocket close with status code 1006)
Logs
File not found: /usr/lib/code-server/lib/vscode/extensions/git-base/dist/browser/extension.js
File not found: /usr/lib/code-server/lib/vscode/extensions/emmet/dist/browser/emmetBrowserMain.js
File not found: /usr/lib/code-server/lib/vscode/extensions/merge-conflict/dist/browser/mergeConflictMain.js
Screenshot/Video
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: