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

Images missing in Release Notes on vscode.dev in Safari #143030

Closed
alexdima opened this issue Feb 14, 2022 · 6 comments
Closed

Images missing in Release Notes on vscode.dev in Safari #143030

alexdima opened this issue Feb 14, 2022 · 6 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug candidate Issue identified as probable candidate for fixing in the next release safari Issues running VSCode in Web on Safari verified Verification succeeded web Issues related to running VSCode in the web
Milestone

Comments

@alexdima
Copy link
Member

alexdima commented Feb 14, 2022

(initially reported in #142490 (comment) by @osortega)

  • in Safari
  • open https://vscode.dev
  • Help > Release Notes

image

Appears to be caused by CSP errors:

image

@alexdima alexdima added web Issues related to running VSCode in the web safari Issues running VSCode in Web on Safari labels Feb 14, 2022
@mjbvz mjbvz added this to the March 2022 milestone Feb 14, 2022
@mjbvz mjbvz added the bug Issue identified by VS Code Team member as probable bug label Feb 14, 2022
@mjbvz
Copy link
Contributor

mjbvz commented Feb 14, 2022

Extension pages are also broken. I suspect this is because script are disabled in both of these webviews, however I don't understand why this also ends up breaking other stuff. Markdown previews and image preview (both of which have scripts enabled) also work fine. The CSP errors suggest that safari is ignoring the inner most CSP which explicitly allows all the blocked resources.

Both cases work fine on Chrome and firefox

@mjbvz mjbvz modified the milestones: March 2022, February 2022 Feb 15, 2022
@mjbvz
Copy link
Contributor

mjbvz commented Feb 15, 2022

This is caused by this block of code:

if (!options.allowScripts && isSafari) {

This block was added to work around a different limitation on Safari (https://bugs.webkit.org/show_bug.cgi?id=33604) and removing the if condition causes the iframes never to load.


As part of this investigation, I noticed that the content does sometimes load so it looks like a race condition. After testing, I also determined this happens in Chrome too.

I've opened two bugs to track this:

The fact that two browsers are flakey here suggests were are doing something crazy, but I don't have enough knowledge to say if we're truly going against the specs. Will see if I can workaround this better, even if that means simply adding another timeout for safari loads

@mjbvz mjbvz closed this as completed in e491208 Feb 15, 2022
@rzhao271 rzhao271 added verified Verification succeeded and removed verified Verification succeeded labels Feb 25, 2022
@rzhao271
Copy link
Contributor

The release notes don't load at all for me now.
I get the following error in the console:
Error while parsing the 'sandbox' attribute: 'allow-downloads' is an invalid sandbox flag.

@rzhao271 rzhao271 reopened this Feb 25, 2022
@rzhao271 rzhao271 added insiders-released Patch has been released in VS Code Insiders verification-found Issue verification failed labels Feb 25, 2022
@mjbvz mjbvz modified the milestones: February 2022, March 2022 Feb 28, 2022
@mjbvz mjbvz added the candidate Issue identified as probable candidate for fixing in the next release label Mar 1, 2022
@mjbvz mjbvz closed this as completed in b698d63 Mar 1, 2022
mjbvz added a commit that referenced this issue Mar 1, 2022
@mjbvz mjbvz reopened this Mar 1, 2022
@mjbvz
Copy link
Contributor

mjbvz commented Mar 1, 2022

Fixed in stable and in 1.65 branch by #144133

@mjbvz mjbvz closed this as completed Mar 1, 2022
@rzhao271
Copy link
Contributor

rzhao271 commented Mar 1, 2022

Still seeing a bunch of errors. Not sure if the changes are in, yet. Sent over a log.

@rzhao271 rzhao271 added verified Verification succeeded and removed verification-found Issue verification failed labels Mar 2, 2022
@rzhao271
Copy link
Contributor

rzhao271 commented Mar 2, 2022

Ok it's good now 🎉

@github-actions github-actions bot locked and limited conversation to collaborators Apr 15, 2022
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 candidate Issue identified as probable candidate for fixing in the next release safari Issues running VSCode in Web on Safari verified Verification succeeded web Issues related to running VSCode in the web
Projects
None yet
Development

No branches or pull requests

4 participants
@alexdima @rzhao271 @mjbvz and others