Skip to content

[Bug]: Code highlighting working abnormally in 4.5.0 #5343

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
4 tasks done
RisaKirisu opened this issue Jul 15, 2022 · 7 comments
Closed
4 tasks done

[Bug]: Code highlighting working abnormally in 4.5.0 #5343

RisaKirisu opened this issue Jul 15, 2022 · 7 comments
Labels
bug Something isn't working triage This issue needs to be triaged by a maintainer

Comments

@RisaKirisu
Copy link

RisaKirisu commented Jul 15, 2022

Is there an existing issue for this?

  • I have searched the existing issues

OS/Web Information

  • Web Browser: Chrome, Samsung Internet
  • Local OS: Arch Linux, Android
  • Remote OS: Arch Linux
  • Remote Architecture: amd64
  • code-server --version: 4.5.0

Steps to Reproduce

  1. open code-server
  2. open a code file

Expected

Code highlighting should work.

Actual

It's not working as expected

Logs

No response

Screenshot/Video

In VS Code:
image

In code-server:
image

Does this issue happen in VS Code or GitHub Codespaces?

  • I cannot reproduce this in VS Code.
  • I cannot reproduce this in GitHub Codespaces.

Are you accessing code-server over HTTPS?

  • I am using HTTPS.

Notes

  • Color theme for VS code and code-server is the same in the screenshot.
  • Restarting and a clean reinstall didn't fix the problem.
  • Downgraded to 4.4.0 and everything works fine now.

No response

@consideRatio
Copy link

I've also observed this issue from running code-server within a docker container based on ubuntu:22.04. code-server 4.4.0 worked fine without this issue, but it has been observed in 4.5.0.

I've installed code-server in a docker image defined here: https://github.com/pangeo-data/jupyter-earth/blob/master/hub.jupytearth.org-image/Dockerfile. It is based on ubuntu:22.04.

@consideRatio
Copy link

@RisaKirisu when you visit your code server, are you using a path like /code or such in the url, or is it straight up /? There is a fix (#5332) related to a failure affecting users that visits code-server via a path like /code.

I was curious if both you and me were users accessing code-server via a /prefix in the url like http://localhost/code or https://example.com/code compared to http://localhost or https://example.com/.

@jsjoeio
Copy link
Contributor

jsjoeio commented Jul 18, 2022

This should be fixed in 4.5.1

image

@RisaKirisu
Copy link
Author

@RisaKirisu when you visit your code server, are you using a path like /code or such in the url, or is it straight up /? There is a fix (#5332) related to a failure affecting users that visits code-server via a path like /code.

I was curious if both you and me were users accessing code-server via a /prefix in the url like http://localhost/code or https://example.com/code compared to http://localhost or https://example.com/.

Yes. In my setup I access my code-server by 'https://mydomain.xxx/vsc/'. I don't know if this is the cause tho.

@jsjoeio
Copy link
Contributor

jsjoeio commented Jul 18, 2022

@RisaKirisu I think so. I believe the syntax highlighting happens thanks to a node module which isn't being loaded because it is assuming the root path. 4.5.1 should fix this

@jsjoeio
Copy link
Contributor

jsjoeio commented Jul 18, 2022

For the curious, this issue should be fixed via #5332 when a new release comes out.

@consideRatio
Copy link

Wieee thanks @RisaKirisu and @jsjoeio!!!

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

3 participants