Skip to content
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

code-server not accessible without SSL (v4.97.2) #7219

Open
1 of 2 tasks
jatcod3r opened this issue Feb 21, 2025 · 9 comments
Open
1 of 2 tasks

code-server not accessible without SSL (v4.97.2) #7219

jatcod3r opened this issue Feb 21, 2025 · 9 comments
Labels
bug Something isn't working triage This issue needs to be triaged by a maintainer

Comments

@jatcod3r
Copy link

jatcod3r commented Feb 21, 2025

Is there an existing issue for this?

  • I have searched the existing issues

OS/Web Information

  • Web Browser: Firefox
  • Local OS: MacOS
  • Remote OS: Ubuntu 24.04.1 LTS (codercom/enterprise-base:ubuntu)
  • Remote Architecture: x86_64
  • code-server --version: v4.97.2

Steps to Reproduce

  1. Install v4.97.2 of code-server
  2. Open code-server
  3. Page returns white screen
Image

Expected

In the previous version (v4.96.4), code-server was accessible without SSL. Opening code-server over the browser shows the editor. Also, "/tmp/code-server.log" shows that a connection is successfully established:

coder@coder-b529651c-eeea-437b-a9b1-c195fe7a211b-7ddb5b85cd-95vqq:~$ cat /tmp/code-server.log 
[2025-02-21T07:40:30.030Z] info  code-server 4.96.4 b7ef8f9bd70cb5b342fa8ec8a0086bad676d8124
[2025-02-21T07:40:30.033Z] info  Using user-data-dir /home/coder/.local/share/code-server
[2025-02-21T07:40:30.053Z] info  Using config file /home/coder/.config/code-server/config.yaml
[2025-02-21T07:40:30.054Z] info  HTTP server listening on http://127.0.0.1:13337/
[2025-02-21T07:40:30.054Z] info    - Authentication is disabled
[2025-02-21T07:40:30.055Z] info    - Not serving HTTPS
[2025-02-21T07:40:30.055Z] info  Using proxy URI in PORTS tab: http://{{port}}--main--lime-catfish-48--admin.coder.****.****
[2025-02-21T07:40:30.056Z] info  Session server listening on /home/coder/.local/share/code-server/code-server-ipc.sock
[07:40:44] 




[07:40:44] Extension host agent started.
File not found: /tmp/code-server/lib/code-server-4.96.4/lib/vscode/node_modules/vsda/rust/web/vsda.js
File not found: /tmp/code-server/lib/code-server-4.96.4/lib/vscode/node_modules/vsda/rust/web/vsda_bg.wasm
[07:40:46] [127.0.0.1][b7e741db][ManagementConnection] New connection established.
[07:40:50] [127.0.0.1][52a2edd4][ExtensionHostConnection] New connection established.
[07:40:50] [127.0.0.1][52a2edd4][ExtensionHostConnection] <217> Launched Extension Host Process.
[07:40:56] [127.0.0.1][b7e741db][ManagementConnection] The client has disconnected gracefully, so the connection will be disposed.
[07:40:56] [127.0.0.1][52a2edd4][ExtensionHostConnection] <217> Extension Host Process exited with code: 0, signal: null.
File not found: /tmp/code-server/lib/code-server-4.96.4/lib/vscode/node_modules/vsda/rust/web/vsda_bg.wasm
File not found: /tmp/code-server/lib/code-server-4.96.4/lib/vscode/node_modules/vsda/rust/web/vsda.js
[07:40:57] [127.0.0.1][5631166c][ManagementConnection] New connection established.
[07:40:59] [127.0.0.1][7e28b3dc][ExtensionHostConnection] New connection established.
[07:40:59] [127.0.0.1][7e28b3dc][ExtensionHostConnection] <272> Launched Extension Host Process.
[07:41:10] [127.0.0.1][5631166c][ManagementConnection] The client has disconnected gracefully, so the connection will be disposed.
[07:41:10] [127.0.0.1][7e28b3dc][ExtensionHostConnection] <272> Extension Host Process exited with code: 0, signal: null

Actual

v4.97.2 doesn't load the page./tmp/code-server.log doesn't show any connection going through even though the connection to the browser seems successful via console inspection on the browser logs:

coder@coder-b529651c-eeea-437b-a9b1-c195fe7a211b-795465c99f-4g5zl:~$ cat /tmp/code-server.log 
[2025-02-21T07:43:44.630Z] info  code-server 4.97.2 34b8d2ed69811c3315a465f01492e9448c9254aa
[2025-02-21T07:43:44.634Z] info  Using user-data-dir /home/coder/.local/share/code-server
[2025-02-21T07:43:44.652Z] info  Using config file /home/coder/.config/code-server/config.yaml
[2025-02-21T07:43:44.653Z] info  HTTP server listening on http://127.0.0.1:13337/
[2025-02-21T07:43:44.653Z] info    - Authentication is disabled
[2025-02-21T07:43:44.653Z] info    - Not serving HTTPS
[2025-02-21T07:43:44.654Z] info  Using proxy URI in PORTS tab: http://{{port}}--main--lime-catfish-48--admin.coder.****.****
[2025-02-21T07:43:44.654Z] info  Session server listening on /home/coder/.local/share/code-server/code-server-ipc.sock
Image

Logs

v4.96.4 logs

coder@coder-b529651c-eeea-437b-a9b1-c195fe7a211b-7ddb5b85cd-95vqq:~$ cat /tmp/code-server.log 
[2025-02-21T07:40:30.030Z] info  code-server 4.96.4 b7ef8f9bd70cb5b342fa8ec8a0086bad676d8124
[2025-02-21T07:40:30.033Z] info  Using user-data-dir /home/coder/.local/share/code-server
[2025-02-21T07:40:30.053Z] info  Using config file /home/coder/.config/code-server/config.yaml
[2025-02-21T07:40:30.054Z] info  HTTP server listening on http://127.0.0.1:13337/
[2025-02-21T07:40:30.054Z] info    - Authentication is disabled
[2025-02-21T07:40:30.055Z] info    - Not serving HTTPS
[2025-02-21T07:40:30.055Z] info  Using proxy URI in PORTS tab: http://{{port}}--main--lime-catfish-48--admin.coder.****.****
[2025-02-21T07:40:30.056Z] info  Session server listening on /home/coder/.local/share/code-server/code-server-ipc.sock
[07:40:44] 




[07:40:44] Extension host agent started.
File not found: /tmp/code-server/lib/code-server-4.96.4/lib/vscode/node_modules/vsda/rust/web/vsda.js
File not found: /tmp/code-server/lib/code-server-4.96.4/lib/vscode/node_modules/vsda/rust/web/vsda_bg.wasm
[07:40:46] [127.0.0.1][b7e741db][ManagementConnection] New connection established.
[07:40:50] [127.0.0.1][52a2edd4][ExtensionHostConnection] New connection established.
[07:40:50] [127.0.0.1][52a2edd4][ExtensionHostConnection] <217> Launched Extension Host Process.
[07:40:56] [127.0.0.1][b7e741db][ManagementConnection] The client has disconnected gracefully, so the connection will be disposed.
[07:40:56] [127.0.0.1][52a2edd4][ExtensionHostConnection] <217> Extension Host Process exited with code: 0, signal: null.
File not found: /tmp/code-server/lib/code-server-4.96.4/lib/vscode/node_modules/vsda/rust/web/vsda_bg.wasm
File not found: /tmp/code-server/lib/code-server-4.96.4/lib/vscode/node_modules/vsda/rust/web/vsda.js
[07:40:57] [127.0.0.1][5631166c][ManagementConnection] New connection established.
[07:40:59] [127.0.0.1][7e28b3dc][ExtensionHostConnection] New connection established.
[07:40:59] [127.0.0.1][7e28b3dc][ExtensionHostConnection] <272> Launched Extension Host Process.
[07:41:10] [127.0.0.1][5631166c][ManagementConnection] The client has disconnected gracefully, so the connection will be disposed.
[07:41:10] [127.0.0.1][7e28b3dc][ExtensionHostConnection] <272> Extension Host Process exited with code: 0, signal: null


v4.97.2 logs

coder@coder-b529651c-eeea-437b-a9b1-c195fe7a211b-795465c99f-4g5zl:~$ cat /tmp/code-server.log 
[2025-02-21T07:43:44.630Z] info  code-server 4.97.2 34b8d2ed69811c3315a465f01492e9448c9254aa
[2025-02-21T07:43:44.634Z] info  Using user-data-dir /home/coder/.local/share/code-server
[2025-02-21T07:43:44.652Z] info  Using config file /home/coder/.config/code-server/config.yaml
[2025-02-21T07:43:44.653Z] info  HTTP server listening on http://127.0.0.1:13337/
[2025-02-21T07:43:44.653Z] info    - Authentication is disabled
[2025-02-21T07:43:44.653Z] info    - Not serving HTTPS
[2025-02-21T07:43:44.654Z] info  Using proxy URI in PORTS tab: http://{{port}}--main--lime-catfish-48--admin.coder.****.****
[2025-02-21T07:43:44.654Z] info  Session server listening on /home/coder/.local/share/code-server/code-server-ipc.sock

Screenshot/Video

No response

Does this bug reproduce in native VS Code?

I did not test native VS Code

Does this bug reproduce in GitHub Codespaces?

I did not test GitHub Codespaces

Are you accessing code-server over a secure context?

  • I am using a secure context.

Notes

code-server is being accessed securely in the browser through the Coder platform. This isn't a big issue for me, but I'm curious if being able to access it behind HTTP (not HTTPS) is expected? I do have TLS setup already, but was confused if this is expected behavior or not since accessing this in prior versions was fine even though it's suggested to have TLS enabled.

Otherwise, if this isn't expected, do you guys think its a problem with the Coder platform?

@jatcod3r jatcod3r added bug Something isn't working triage This issue needs to be triaged by a maintainer labels Feb 21, 2025
@SkizoKid
Copy link

i got same bug too

@edasque
Copy link

edasque commented Feb 21, 2025

Same. Reverting to 4.96.4 fixed it for me.

@benz0li
Copy link
Contributor

benz0li commented Feb 22, 2025

  1. For localhost/127.0.0.1 HTTP is sufficient
  2. For anything else you need TLS encryption

#7217 (comment)

@benz0li
Copy link
Contributor

benz0li commented Feb 22, 2025

Service workers (Using Service Workers - Web APIs | MDN) require code-server to be served via HTTPS to work properly.

Cross reference:

@Kidsunbo
Copy link

Kidsunbo commented Feb 24, 2025

Service workers (Using Service Workers - Web APIs | MDN) require code-server to be served via HTTPS to work properly.

Cross reference:

But why 4.96.4 doesn't require https? Is the requirement related to VSCode or code-server?

@benz0li
Copy link
Contributor

benz0li commented Feb 24, 2025

@OliverwengFiltered
Copy link

I access code-server via an ip address, so it can't be TLS encrypted, any solution to this besides downgrading to 4.96.4 ?

@benz0li
Copy link
Contributor

benz0li commented Feb 24, 2025

I access code-server via an ip address, so it can't be TLS encrypted, any solution to this besides downgrading to 4.96.4 ?

@OliverwengFiltered No. Wait for the next release. This has been fixed upstream.

Cross reference:

@benz0li
Copy link
Contributor

benz0li commented Feb 25, 2025

@jatcod3r Duplicate of #7212.

Please close.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triage This issue needs to be triaged by a maintainer
Projects
None yet
Development

No branches or pull requests

6 participants