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 fails to load required CSS and JS on VSCode startup #100879

Closed
JoernBerkefeld opened this issue Jun 23, 2020 · 4 comments
Closed
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug insiders-released Patch has been released in VS Code Insiders verified Verification succeeded webview Webview issues
Milestone

Comments

@JoernBerkefeld
Copy link

JoernBerkefeld commented Jun 23, 2020

  • VSCode Version: 1.46.0
  • OS Version: Windows 10 / Windows_NT x64 10.0.18363

Steps to Reproduce:

  1. Open any .md / markdown file
  2. Open the preview to the side
  3. close the VSCode window
  4. re-open VSCode
    • this should automatically re-open the same previously open workspace/folder
    • the Markdown file and its preview tab should re-open automatically

Expected outcome:
Markdown preview is rendered according to current theme - or to what's setup in markdown.style / markdown.previewStyle.

Actual outcome:
Only inline styles and default browser styles are rendered, leaving the preview looking distorted.
looking at the webview console, I can see 7 errors prefixed with Failed to load resource: net::ERR_UNKNOWN_URL_SCHEME for:

  • pre.js
  • markdown.css
  • highlight.css
  • checkbox.css
  • katex.min.css
  • index.js

image

and this is how my preview then looks like:
image

Workaround:

  1. Close preview
  2. re-open preview

image

Does this issue occur when all extensions are disabled?: Could not test.

@gjsjohnmurray
Copy link
Contributor

Maybe related to #100727

@JoernBerkefeld
Copy link
Author

JoernBerkefeld commented Jun 23, 2020

hi @gjsjohnmurray - yes, i can confirm that i saw the same behavior with CSS loaded via markdown.previewStyles and markdown.styles

@mjbvz mjbvz closed this as completed in 5c11b81 Jun 23, 2020
@mjbvz mjbvz added the bug Issue identified by VS Code Team member as probable bug label Jun 23, 2020
@mjbvz mjbvz modified the milestones: July 2020, June 2020 Jun 23, 2020
@mjbvz mjbvz added the webview Webview issues label Jun 23, 2020
@sweettyler
Copy link

sweettyler commented Jun 24, 2020

@mjbvz I saw this happen with the insider version as early as May 21 and it mysteriously came back to normal on May 25. I don't think the commit 61f796e is the real cause, although the problem may disappear after you revert it back.

@mhutchie
Copy link

@mjbvz I've had reports that this was fixed in the Insiders release 9b620b2, however it is broken again for every user I've checked with in:

Version: 1.47.0-insider (user setup)
Commit: 6c235c7
Date: 2020-06-26T06:20:06.931Z
Electron: 8.3.3
Chrome: 80.0.3987.165
Node.js: 12.13.0
V8: 8.0.426.27-electron.0
OS: Windows_NT x64 10.0.18362

How could this occur?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug insiders-released Patch has been released in VS Code Insiders verified Verification succeeded webview Webview issues
Projects
None yet
Development

No branches or pull requests

7 participants
@jrieken @JoernBerkefeld @mhutchie @gjsjohnmurray @mjbvz @sweettyler and others