Skip to content

Cannot change color theme on prelease version 4.0.0 #4642

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
lethargosapatheia opened this issue Dec 16, 2021 · 8 comments
Closed

Cannot change color theme on prelease version 4.0.0 #4642

lethargosapatheia opened this issue Dec 16, 2021 · 8 comments
Milestone

Comments

@lethargosapatheia
Copy link

lethargosapatheia commented Dec 16, 2021

OS/Web Information

  • Web Browser: Firefox 95.0 and Chrome 96.0.4664.110
  • Local OS: Mac OS Monterey 12.1
  • Remote OS: Ubuntu 20.04.3
  • Remote Architecture: amd64
  • code-server --version: 4.0.0

Steps to Reproduce

  1. Upgraded from 3.12.0 to 4.0.0 by installing the deb package with apt install.
  2. Going to Manage - Color Theme - Select a random color theme.

Expected

Color theme should change.

Actual

Changing the color theme is simply ignored.

Logs

Logs from journalctl:

Dec 16 22:16:04 example code-server[2311357]: [22:16:04] [Theme Service] Attempting to find user's active theme: Default Dark+
Dec 16 22:16:04 example code-server[2311357]: [22:16:04] [10.220.117.24][d0f9198c][ManagementConnection] The client has disconnected gracefully, so the connection will be disposed.
Dec 16 22:16:04 example code-server[2311357]: [22:16:04] [10.220.117.24][2b7a30be][ExtensionHostConnection] <2312085> Extension Host Process exited with code: 0, signal: null.
Dec 16 22:16:05 example code-server[2311357]: [22:16:05] [Theme Service] Attempting to find user's active theme: Default Dark+
Dec 16 22:16:05 example code-server[2311357]: [2021-12-16T20:16:05.910Z] debug got latest version {"latest":"3.12.0"}
Dec 16 22:16:05 example code-server[2311357]: [2021-12-16T20:16:05.911Z] debug comparing versions {"current":"4.0.0","latest":"3.12.0"}
Dec 16 22:16:06 example code-server[2311357]: [22:16:06] [10.220.117.24][b13d9645][ManagementConnection] New connection established.
Dec 16 22:16:06 example code-server[2311357]: [22:16:06] [10.220.117.24][7c9edf0f][ExtensionHostConnection] New connection established.
Dec 16 22:16:06 example code-server[2311357]: [22:16:06] [10.220.117.24][7c9edf0f][ExtensionHostConnection] <2317041> Launched Extension Host Process.
Dec 16 22:16:21 example code-server[2311357]: [2021-12-16T20:16:21.104Z] debug 2 active connections

More relevant info from dev tools in chrome where I get failed (network tab):

fetch("https://example.com:80/vscode-remote-resource?path=%2Fusr%2Flib%2Fcode-server%2Fvendor%2Fmodules%2Fcode-oss-dev%2Fextensions%2Ftheme-defaults%2Fthemes%2Fdark_plus.json&tkn=0000", {
  "headers": {
    "sec-ch-ua": "\" Not A;Brand\";v=\"99\", \"Chromium\";v=\"96\", \"Google Chrome\";v=\"96\"",
    "sec-ch-ua-mobile": "?0",
    "sec-ch-ua-platform": "\"macOS\"",
    "Referer": "https://example.com/",
    "Referrer-Policy": "strict-origin-when-cross-origin"
  },
  "body": null,
  "method": "GET"
});

In the console:

https://example.com:80/vscode-remote-resource?path=%2Fusr%2Flib%2Fcode-server%2Fvendor%2Fmodules%2Fcode-oss-dev%2Fextensions%2Ftheme-defaults%2Fthemes%2Fdark_plus.json&tkn=0000 net::ERR_SSL_PROTOCOL_ERROR extensionResourceLoaderService.ts:46

Screenshot

Accessing several random color themes:
failed_color_theme

Notes

As far as I can see this seems to be a classical issue with trying to access https on port 80. I'm not sure what has changed in this version (I'm guessing a hardcoded port (80), because vscode itself is not configured for https, as I'm accessing it through a reverse proxy - nginx-controller in kubernetes).
Downgrading to 3.12.0 works instantly.

I should also mention that port_in_redirect is off (default behaviour for nginx controller).

@lethargosapatheia lethargosapatheia changed the title Cannot color theme on prelease version 4.0.0 Cannot change color theme on prelease version 4.0.0 Dec 16, 2021
@jsjoeio jsjoeio added the needs-investigation This issue needs to be further investigated label Dec 16, 2021
@jsjoeio jsjoeio added this to the 4.0.0 milestone Dec 16, 2021
@lethargosapatheia
Copy link
Author

I'm also adding here the logs from ~/.local/share/code-server/coder-logs:

[22:11:21] Extension host agent started.
[22:11:21] [Theme Service] Scanning for theme extension...
[22:11:21] [Theme Service] theme-abyss
[22:11:21] [Theme Service] theme-defaults
[22:11:21] [Theme Service] theme-kimbie-dark
[22:11:21] [Theme Service] theme-monokai
[22:11:21] [Theme Service] theme-monokai-dimmed
[22:11:21] [Theme Service] theme-quietlight
[22:11:21] [Theme Service] theme-red
[22:11:21] [Theme Service] theme-solarized-dark
[22:11:21] [Theme Service] theme-solarized-light
[22:11:21] [Theme Service] theme-tomorrow-night-blue
[22:11:26] [Theme Service] Attempting to find user's active theme: Default Dark+
[22:11:27] [Theme Service] Attempting to find user's active theme: Default Dark+
[2021-12-16T20:11:27.430Z] debug got latest version {"latest":"3.12.0"}
[2021-12-16T20:11:27.431Z] debug comparing versions {"current":"4.0.0","latest":"3.12.0"}
[22:11:27] [10.220.117.24][fad92d84][ManagementConnection] New connection established.
[22:11:27] [10.220.117.24][7b388dba][ExtensionHostConnection] New connection established.
[22:11:27] [10.220.117.24][7b388dba][ExtensionHostConnection] <2311593> Launched Extension Host Process.
[2021-12-16T20:11:40.026Z] debug redirecting from / to ./login
[22:11:40] [10.220.117.24][fad92d84][ManagementConnection] The client has disconnected gracefully, so the connection will be disposed.
[22:11:40] [10.220.117.24][7b388dba][ExtensionHostConnection] <2311593> Extension Host Process exited with code: 0, signal: null.
[2021-12-16T20:11:50.582Z] debug got cookie doman {"host":"vincentiuiacob-work.ejobs.ro"}
[2021-12-16T20:11:50.584Z] debug redirecting from /login to ./
[22:11:50] [Theme Service] Attempting to find user's active theme: Default Dark+
[22:11:51] [Theme Service] Attempting to find user's active theme: Default Dark+
[22:11:51] [10.220.117.24][d0f9198c][ManagementConnection] New connection established.
[2021-12-16T20:11:51.404Z] debug got latest version {"latest":"3.12.0"}
[2021-12-16T20:11:51.404Z] debug comparing versions {"current":"4.0.0","latest":"3.12.0"}
[22:11:51] [10.220.117.24][2b7a30be][ExtensionHostConnection] New connection established.
[22:11:51] [10.220.117.24][2b7a30be][ExtensionHostConnection] <2312085> Launched Extension Host Process.
[22:11:56] [Theme Service] Attempting to find user's active theme: Default Dark+
[2021-12-16T20:12:21.091Z] debug 7 active connections
[2021-12-16T20:13:21.094Z] debug 2 active connections
[2021-12-16T20:14:21.097Z] debug 2 active connections
[2021-12-16T20:15:21.100Z] debug 2 active connections
[22:16:04] [Theme Service] Attempting to find user's active theme: Default Dark+
[22:16:04] [10.220.117.24][d0f9198c][ManagementConnection] The client has disconnected gracefully, so the connection will be disposed.
[22:16:04] [10.220.117.24][2b7a30be][ExtensionHostConnection] <2312085> Extension Host Process exited with code: 0, signal: null.
[22:16:05] [Theme Service] Attempting to find user's active theme: Default Dark+
[2021-12-16T20:16:05.910Z] debug got latest version {"latest":"3.12.0"}
[2021-12-16T20:16:05.911Z] debug comparing versions {"current":"4.0.0","latest":"3.12.0"}
[22:16:06] [10.220.117.24][b13d9645][ManagementConnection] New connection established.
[22:16:06] [10.220.117.24][7c9edf0f][ExtensionHostConnection] New connection established.
[22:16:06] [10.220.117.24][7c9edf0f][ExtensionHostConnection] <2317041> Launched Extension Host Process.
[2021-12-16T20:16:21.104Z] debug 2 active connections
[2021-12-16T20:17:21.108Z] debug 2 active connections
[2021-12-16T20:18:21.111Z] debug 2 active connections
[2021-12-16T20:19:21.114Z] debug 2 active connections
[2021-12-16T20:20:21.117Z] debug 2 active connections
[2021-12-16T20:21:21.120Z] debug 2 active connections
[2021-12-16T20:22:21.123Z] debug 2 active connections
[2021-12-16T20:23:21.126Z] debug 2 active connections
[2021-12-16T20:24:21.130Z] debug 2 active connections
[2021-12-16T20:25:21.135Z] debug 2 active connections
[2021-12-16T20:26:21.137Z] debug 2 active connections
[2021-12-16T20:27:21.141Z] debug 2 active connections
[2021-12-16T20:28:21.144Z] debug 2 active connections
[2021-12-16T20:29:21.148Z] debug 2 active connections
[2021-12-16T20:30:21.151Z] debug 2 active connections
[2021-12-16T20:31:21.154Z] debug 2 active connections
[2021-12-16T20:32:21.156Z] debug 2 active connections
[2021-12-16T20:33:21.158Z] debug 2 active connections
[2021-12-16T20:34:21.161Z] debug 2 active connections
[2021-12-16T20:35:21.164Z] debug 2 active connections
[2021-12-16T20:36:21.166Z] debug 2 active connections
[2021-12-16T20:37:21.169Z] debug 2 active connections
[22:37:48] [Theme Service] Attempting to find user's active theme: Default Dark+
[2021-12-16T20:37:50.235Z] debug got latest version {"latest":"3.12.0"}
[2021-12-16T20:37:50.236Z] debug comparing versions {"current":"4.0.0","latest":"3.12.0"}
[22:37:50] [10.220.117.24][d1c6e527][ManagementConnection] New connection established.
[22:37:50] [10.220.117.24][d7d29575][ExtensionHostConnection] New connection established.
[22:37:50] [10.220.117.24][d7d29575][ExtensionHostConnection] <2342237> Launched Extension Host Process.
[2021-12-16T20:38:21.171Z] debug 4 active connections
[2021-12-16T20:39:21.174Z] debug 4 active connections
[2021-12-16T20:40:21.177Z] debug 4 active connections
[2021-12-16T20:41:21.181Z] debug 4 active connections
[2021-12-16T20:42:21.183Z] debug 4 active connections
[2021-12-16T20:43:21.186Z] debug 4 active connections
[2021-12-16T20:44:21.189Z] debug 4 active connections
[2021-12-16T20:45:21.193Z] debug 4 active connections
[2021-12-16T20:46:21.195Z] debug 4 active connections
[22:47:08] [10.220.117.24][b13d9645][ManagementConnection] The client has disconnected gracefully, so the connection will be disposed.
[22:47:08] [10.220.117.24][7c9edf0f][ExtensionHostConnection] <2317041> Extension Host Process exited with code: 0, signal: null.
[2021-12-16T20:47:21.198Z] debug 2 active connections

@jsjoeio
Copy link
Contributor

jsjoeio commented Dec 17, 2021

Hmm... when I do it from the Command Palette, it appears to work.

Video

Screen.Recording.2021-12-16.at.5.03.20.PM.mov

Going to Manage

Where is this exactly? I may have hidden it. Do you mind posting a screenshot or video?

@jsjoeio jsjoeio modified the milestones: 4.0.0, 4.0.1 Dec 17, 2021
@lethargosapatheia
Copy link
Author

lethargosapatheia commented Dec 17, 2021

color_test_code_server.mov

To be honest I'm not sure exactly how you do it directly from the dropmenu in the bar. I doesn't work for me that way.


I've just tested the app directly and it works - so without the reverse proxy (which was of course always a possibility given existence of the port in the url).

Now the difference is (when accesing it over the proxy) that on the lower left-hand side of the screen where the fqdn is displayed, I see the port also (:80), whereas with version 3.12.0 the port is not displayed. This is confirmed by the dev tools (network tab, console.)
So this was changed in the new version, which I would think is not right, because it wouldn't accomodate a proxy very well. But correc me if I'm wrong.

As I said, I'm not enabling https on the code-server level, I'm providing this with the proxy. I'm guessing there must be a way of solving this with nginx, although, as I previously said, port_in_redirect is off ("Enables or disables specifying the port in absolute redirects issued by nginx. "), but in any case, I wouldn't expect port 80 to be added there explicitly even over https connections.

P.S. In my case code-server listens on port 8888, so I'm not even sure where it gets port 80 at all - that's why I'm inclined to believe the port is more or less hardcoded there.
More or less meaning that if I access the app directly over the ip on port 8888, the port in the app changes also to 8888.
So only with https there seems to be an exception.

@benz0li
Copy link
Contributor

benz0li commented Dec 17, 2021

Related to #4608. This should be resolved with the next iteration of the 4.0.0 milestone.

@jsjoeio
Copy link
Contributor

jsjoeio commented Dec 17, 2021

@lethargosapatheia thank you for the detailed explanation and the video! As @benz0li said (thank you!), this should be fixed in the next version.

@jsjoeio
Copy link
Contributor

jsjoeio commented Dec 17, 2021

Is it okay if we close this?

@jsjoeio jsjoeio modified the milestones: 4.0.1, 4.0.0 Dec 17, 2021
@lethargosapatheia
Copy link
Author

If this question if direct to me, yes, sure! I'm glad I could contribute a little bit :)

@jsjoeio jsjoeio closed this as completed Dec 17, 2021
@jsjoeio
Copy link
Contributor

jsjoeio commented Dec 17, 2021

Yes! (sorry should have @'ed you to be clear :) ) Thanks for helping test 4.0.0 and make sure it's solid for release!

@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