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

Markdown preview not working #296

Closed
nmarcopo opened this issue Mar 19, 2019 · 6 comments · Fixed by #472
Closed

Markdown preview not working #296

nmarcopo opened this issue Mar 19, 2019 · 6 comments · Fixed by #472
Assignees
Labels
bug Something isn't working
Milestone

Comments

@nmarcopo
Copy link

nmarcopo commented Mar 19, 2019

  • code-server version: 1.31.1-100, also tested on 1.32.0-310
  • OS Version: Chrome OS

Description

When attempting to view an in-VSCode markdown preview, the following error appears:

command 'markdown.showPreview' not found

Steps to Reproduce

  1. Open a Markdown (.md) file
  2. Use the keyboard shortcut Ctrl-Shift-V to attempt to show Markdown preview
  3. Error appears in the lower right corner of the screen
@nmarcopo nmarcopo added the bug Something isn't working label Mar 19, 2019
@kylecarbs
Copy link
Member

Will fix!

@ViRb3
Copy link

ViRb3 commented Mar 11, 2020

Markdown preview does not seem to work on latest release (2.1698-vsc1.41.1). There are no errors, but the preview window is empty.

@ViRb3
Copy link

ViRb3 commented Mar 11, 2020

@code-asher

@ViRb3
Copy link

ViRb3 commented Mar 11, 2020

Seems to be an IFRAME security issue. By opening the browser debugging tools,

On Firefox:

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://v1.extapi.coder.com/extensionquery. (Reason: CORS header 'Access-Control-Allow-Origin' missing).
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://v1.extapi.coder.com/extensionquery. (Reason: CORS request did not succeed).
Load denied by X-Frame-Options: “DENY” from “https://<redacted>.com/webview/index.html?id=<redacted>”, site does not permit any framing. Attempted to load into “https://<redacted>.com/?folder=vscode-remote%3A%2F%2Fcode-server%3A8080%2F<redacted>”.

On Chrome:

Refused to display 'https://<redacted>.com/webview/index.html?id=<redacted>' in a frame because it set 'X-Frame-Options' to 'deny'.

@nhooyr
Copy link
Contributor

nhooyr commented Mar 11, 2020

Opened #1409 for you @ViRb3

@ViRb3
Copy link

ViRb3 commented Mar 12, 2020

Apologies, the problem was in an inherited nginx config:

# XSS
add_header X-Frame-Options DENY;
add_header X-Content-Type-Options nosniff;
add_header X-XSS-Protection "1; mode=block";

Everything works after I cleared those headers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants