Skip to content

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

Closed

Description

@RisaKirisu

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

Activity

  1. added
    bugSomething isn't working
    triageThis issue needs to be triaged by a maintainer
    on Jul 15, 2022
  2. consideRatio commented on Jul 18, 2022

    @consideRatio

    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.

  3. consideRatio commented on Jul 18, 2022

    @consideRatio

    @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/.

  4. jsjoeio commented on Jul 18, 2022

    @jsjoeio
    Contributor

    This should be fixed in 4.5.1

    image

  5. RisaKirisu commented on Jul 18, 2022

    @RisaKirisu
    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.

  6. jsjoeio commented on Jul 18, 2022

    @jsjoeio
    Contributor

    @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

  7. jsjoeio commented on Jul 18, 2022

    @jsjoeio
    Contributor

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

  8. consideRatio commented on Jul 18, 2022

    @consideRatio

    Wieee thanks @RisaKirisu and @jsjoeio!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingtriageThis issue needs to be triaged by a maintainer

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions