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/syntax highlighting doesn't work #2695

Closed
bravoalpha79 opened this issue Jan 7, 2021 · 22 comments
Closed

Code/syntax highlighting doesn't work #2695

bravoalpha79 opened this issue Jan 7, 2021 · 22 comments
Labels
editor: theia language meta: stale This issue/PR is stale and will be closed soon type: needs triage We've seen the issue but need to investigate to decide what type of issue it is

Comments

@bravoalpha79
Copy link

Describe the bug

Similar to closed issue #2444:
When the workspace is loaded, the code is displayed as plain white text, with no syntax highlights.

image

Restarting the workspace and logging out/in of Gitpod didn't help.

Steps to reproduce

Affected workspace: https://e2eb8b73-0e99-4f1b-9108-81386ff2ae9a.ws-eu03.gitpod.io/#/workspace/curl-command-line

Expected behavior

Code highlight works.

@csweichel csweichel added editor: theia language type: needs triage We've seen the issue but need to investigate to decide what type of issue it is labels Jan 8, 2021
@bazmac81
Copy link

bazmac81 commented Jan 8, 2021

Please see URL of affected workspace. Code not recognised and ports not being detected.

https://ebcb2d05-9fde-43d7-9b60-bbd0bafc39fc.ws-eu03.gitpod.io/#/workspace/placro

@PaoloAlbanese
Copy link

This workspace is also affected
also reported in #2713
workspace:
bd9c91cd-2953-41f2-b11f-247eba7186df
PaoloAlbanese/cocktails - master

all the code is just black and white
shortcuts like ctrl+/ don't comment outs selection
the ports are not available, they just read:
8080– detecting...
3306– detecting...
33060– detecting...

@PaoloAlbanese
Copy link

Mine on #2713 works now

@mateuszniechwiej
Copy link

I have a similar issue.No syntax highlights on the code.

https://dff35c61-31c4-42af-b5e6-f09cd884a8c0.ws-eu03.gitpod.io/#/workspace/table

image

@inglisj
Copy link

inglisj commented Jan 29, 2021

My workspace too is affected with this.
https://a006f1fe-a38b-4538-b86b-c9636c2c2dba.ws-eu03.gitpod.io/

@guiMendel
Copy link

@mateuszniechwiej
Copy link

Hi ! I've managed to fix this problem by turning off Kaspersky Security Cloud.

@nisarhassan12
Copy link
Contributor

@nisarhassan12
Copy link
Contributor

I just tried stopping and restarting the workspace and it fixed the problem for me.

@HMTRIVEDI
Copy link

I have same problem :https://a37fd37e-2860-454b-8621-2b4eb591d8c8.ws-eu03.gitpod.io/#/workspace/TASKERS
auto closing tags not working

@dpolivaev
Copy link

same here, see screen shot including errors on the console
msedge_2021-02-06_19-27-35

https://gitpod.io/#snapshot/d7417464-cf18-4aba-84fe-543715cc98e1

@Ri-Dearg
Copy link

Ri-Dearg commented Feb 15, 2021

I often have this issue with pretty much any workspace. Sometimes it works, sometimes it does not. There's no consistency as to why. Often, all gitpod theme icons do not load either.

  • I have removed extensions
  • I minimised my dockerfile commands
  • I changed all settings to default.

Still the issue persisted.

However, I turned off Adblock Plus and Ghostery on Chrome, extensions for blocking ads and trackers, and the rate of the issue occurring has gone down quite a lot.
I don't know why they seem to have an impact but they do. Previously I culd only load up a workspace successfully 1/5 attempts, now its the opposite. I fail 1/5 attempts. I recommend people disable their blockers to see if there's any impact.

@akosyakov
Copy link
Member

akosyakov commented Feb 16, 2021

There are timeouts on downloading extensions (quite high though like 5s per an extension). Maybe blockers (or some other software manipulating traffic on your machine) lead to hitting such timeouts.

@dpolivaev
Copy link

I have one computer running windows and one computer running linux sharing the same internet connection.
On my linux machine syntax highlighting works fine in all browsers.
On my windows machine syntax highlighting does not work at all.

@Yannl
Copy link

Yannl commented Apr 16, 2021

Hi, I have the same problem here on all workspaces that I launched for the last 5 days.
Example workspace: https://olive-cattle-s3uc7gc3.ws-eu03.gitpod.io/

Screenshot:
image

@Yannl
Copy link

Yannl commented Apr 19, 2021

In addition to above.

It does work on Android smartphone with Chrome for Android.

It didn't work on windows 10 computer with Firefow or Chrome or Edge. Same
First I disabled all browser extension and updated browsers to latest version. > No change
Then I disabled Kasperky Antivirus > it worked.

Lastly when it it works I still get the above error message: "Access to XMLHttpRequest at 'https://open-vsx.org/vscode/gallery/extensionquery' from origin 'https://olive-cattle-s3uc7gc3.ws-eu03.gitpod.io' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource."

@akosyakov
Copy link
Member

Then I disabled Kasperky Antivirus > it worked.

Could it prohibit some network traffic like wasm files?

Lastly when it it works I still get the above error message: "Access to XMLHttpRequest at 'https://open-vsx.org/vscode/gallery/extensionquery' from origin 'https://olive-cattle-s3uc7gc3.ws-eu03.gitpod.io' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource."

It is unrelated. It is misconfigured Open VSX registry, but we work it around but doing the request on the backend.

@Yannl
Copy link

Yannl commented Apr 19, 2021

@akosyakov
The relevant message in Chrome console may be this one:
Access to fetch at 'https://blobserve.ws-eu03.gitpod.io/eu.gcr.io/gitpod-dev/ide/code:hotfix-2021-04-15.2/__files__/node_modules/vscode-oniguruma/release/onig.wasm' (redirected from 'https://brown-jay-4144tgze.ws-eu03.gitpod.io/node_modules/vscode-oniguruma/release/onig.wasm') from origin 'https://brown-jay-4144tgze.ws-eu03.gitpod.io' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.

I also got this error specific to Kaspersky:

Refused to connect to 'wss://gc.kis.v2.scr.kaspersky-labs.com/[...]%2Fwebview-black-firefly-i66xqqyn.ws-eu03.gitpod.io%2Fout%2Fvs%2Fworkbench%2Fcontrib%2Fwebview%2Fbrowser%2Fpre%2Ffake.html%3Fid%3D7467c924-0f71-4e53-9567-d71b2928ef03&nocache=1618858835990' because it violates the following Content Security Policy directive: "default-src 'unsafe-inline' 'unsafe-eval' data: https: http: blob: https://webview-black-firefly-i66xqqyn.ws-eu03.gitpod.io". Note that 'connect-src' was not explicitly set, so 'default-src' is used as a fallback.

To use Kaspersky with Gitpod, my current workaround: In Kaspersky 2020 > Settings > Networks settings > Traffic processing > Disable : "Inject script into web traffic to interact with web pages."

(source = https://community.kaspersky.com/kaspersky-total-security-14/error-in-local-page-in-firefox-can-t-connect-with-the-server-at-ws-ff-kis-v2-scr-kaspersky-labs-com-etc-2829)

@stale
Copy link

stale bot commented Jul 18, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the meta: stale This issue/PR is stale and will be closed soon label Jul 18, 2021
@stale stale bot closed this as completed Jul 28, 2021
@code2k13
Copy link

I was able to reproduce this issue today with Edge running on Windows 11. Chrome works fine.

@axonasif
Copy link
Member

I was able to reproduce this issue today with Edge running on Windows 11. Chrome works fine.

Hey @code2k13, it's probably due to some extension or browser config of yours on Edge. You might find something interesting on your console logs.

@Harinathlee
Copy link

Disable or uninstall the "Color Identifiers" extension and reload the workspace. It worked for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
editor: theia language meta: stale This issue/PR is stale and will be closed soon type: needs triage We've seen the issue but need to investigate to decide what type of issue it is
Projects
None yet
Development

No branches or pull requests