Skip to content

Markdown preview not working #296

Closed

Description

@nmarcopo
  • 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

Activity

  1. kylecarbs commented on Mar 19, 2019

    @kylecarbs
    Member

    Will fix!

  2. added this to the April 2019 milestone on Apr 8, 2019
  3. self-assigned this
    on Apr 8, 2019
  4. ViRb3 commented on Mar 11, 2020

    @ViRb3

    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.

  5. ViRb3 commented on Mar 11, 2020

    @ViRb3
  6. ViRb3 commented on Mar 11, 2020

    @ViRb3

    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'.
    
  7. nhooyr commented on Mar 11, 2020

    @nhooyr
    Contributor

    Opened #1409 for you @ViRb3

  8. ViRb3 commented on Mar 12, 2020

    @ViRb3

    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

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions