question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

code-server v4 unable to load resources (e.g. new theme) -- requesting to port 80?

See original GitHub issue

I’m getting the following error in the console when trying to load a new theme (in a fresh v4 installation):

  GET https://code-server.mydomain.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

  ERR Unable to load vscode-remote://code-server.mydomain.com:80/usr/lib/code-server/vendor/modules/code-oss-dev/extensions/theme-defaults/themes/dark_plus.json: Failed to fetch: Error: Unable to load vscode-remote://code-server.mydomain.com:80/usr/lib/code-server/vendor/modules/code-oss-dev/extensions/theme-defaults/themes/dark_plus.json: Failed to fetch
	at https://code-server.mydomain.com/static/out/vs/workbench/workbench.web.api.js:1926:79062
	at async Z.restoreColorTheme (https://code-server.mydomain.com/static/out/vs/workbench/workbench.web.api.js:1926:79687)

My installation is in this context: https://github.com/cdr/code-server/discussions/4529#discussioncomment-1717543 (just replacing curl install.sh | sh with curl install.sh | sh -s -- --version=4.0.0).

I also have the following ENTRYPOINT (i.e. binding to 8443 rather than 8080):

ENTRYPOINT [ "code-server", "/root/workspace", "--bind-addr", "0.0.0.0:8443" ]

It all seems to fire up just fine with v4… just not able to change theme for a start.

I’m also seeing the following (not really doing anything to prompt it):

  ERR Unable to load and parse grammar for scope source.json.comments from vscode-remote://code-server.mydomain.com:80/usr/lib/code-server/vendor/modules/code-oss-dev/extensions/json/syntaxes/JSONC.tmLanguage.json TypeError: Failed to fetch
	at v.readExtensionResource (extensionResourceLoaderService.ts:46)
	at Object.readFile (abstractTextMateService.ts:246)
	at Object.loadGrammar (TMGrammarFactory.ts:53)
	at e.<anonymous> (main.js:107)
	at main.js:46
	at Object.next (main.js:27)
	at main.js:21
	at new Promise (<anonymous>)
	at i (main.js:17)
	at e._doLoadSingleGrammar (main.js:103)
log.ts:313   ERR No grammar provided for <source.json.comments>: Error: No grammar provided for <source.json.comments>
	at d (https://code-server.mydomain.com/static/node_modules/vscode-textmate/release/main.js:1:3170)
	at e.processQueue (https://code-server.mydomain.com/static/node_modules/vscode-textmate/release/main.js:1:2533)
	at e.<anonymous> (https://code-server.mydomain.com/static/node_modules/vscode-textmate/release/main.js:1:30634)
	at https://code-server.mydomain.com/static/node_modules/vscode-textmate/release/main.js:1:28678
	at Object.next (https://code-server.mydomain.com/static/node_modules/vscode-textmate/release/main.js:1:28783)
	at s (https://code-server.mydomain.com/static/node_modules/vscode-textmate/release/main.js:1:27497)

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
drmrbrewercommented, Jan 6, 2022

Having now tried v4.0.1 I can confirm that this issue appears to be resolved… but you knew that already! Nice work!

3reactions
code-ashercommented, Dec 13, 2021

Thank you for the bug report and the demo! Will try to fix this asap.

Read more comments on GitHub >

github_iconTop Results From Across the Web

code-server v4 unable to load resources (e.g. new theme)
I'm getting the following error in the console when trying to load a new theme (in a fresh v4 installation): GET ...
Read more >
FAQ - code-server v4.8.0 docs - Coder
The default config defines the following behavior: Listen on the loopback IP port 8080; Enable password authorization; Do not use TLS.
Read more >
Error [HPM] Error occurred while trying to proxy request / from ...
First, your developMiddleware setup points to http://localhost:4000 , but your server ( server.js ) by default runs at http://localhost:3000 .
Read more >
User and Workspace Settings - Visual Studio Code
If you try to change a setting (for example turning on Auto Save or selecting a new Color Theme) and you see "Unable...
Read more >
4 Access and Security | RStudio Workbench 1.4.1717-3
If you wish to listen on a different another port you can modify the www-port option. For example: /etc/rstudio/rserver.conf www-port=80.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found