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?
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?
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.
Any idea?
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.
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.
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.
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>" for some reason my comment looks weird,
<VirtualHost *:80>
ServerName codeYOUR_DOMAIN
ServerAdmin USER@YOUR_DOMAIN
ProxyPreserveHost On
ProxyRequests Off
AllowEncodedSlashes NoDecode
Activity
code-asher commented on Feb 13, 2023
ManuXD32 commented on Mar 29, 2023
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.
Any idea?
code-asher commented on Mar 30, 2023
ManuXD32 commented on Apr 5, 2023
It turned out to be a missconfiguration under the .conf file. GPT4 solved It heh. Thank you so much, anyway.
freaker2112 commented on Apr 11, 2023
what fixed it? I'm having this same issue
ManuXD32 commented on Apr 20, 2023
Try changing your .conf file to look like this: Ps: remember to end the conf file with "</VirtualHost>" for some reason my comment looks weird,
<VirtualHost *:80>
ServerName codeYOUR_DOMAIN
ServerAdmin USER@YOUR_DOMAIN
ProxyPreserveHost On
ProxyRequests Off
AllowEncodedSlashes NoDecode
<Location /> ProxyPass http://localhost:YOUR_PORT/ nocanon ProxyPassReverse http://localhost:YOUR_PORT/ ProxyPassReverseCookieDomain localhost codeYOUR_DOMAIN ProxyPassReverseCookiePath / / </Location> RewriteEngine On RewriteCond %{HTTP:Upgrade} websocket [NC] RewriteCond %{HTTP:Connection} upgrade [NC] RewriteRule ^/?(.*) "ws://localhost:YOUR_PORT/$1" [P,L] ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined</VirtualHost>
code-asher commented on Jul 12, 2024
Closing as stale but feel free to comment if you come back to this.