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

vscode.dev can not use Simple Browser. #10023

Closed
aleleba opened this issue Jul 3, 2024 · 8 comments
Closed

vscode.dev can not use Simple Browser. #10023

aleleba opened this issue Jul 3, 2024 · 8 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug upstream Issue identified as 'upstream' component related (exists outside of VS Code Remote)

Comments

@aleleba
Copy link

aleleba commented Jul 3, 2024

vscode.dev can not use Simple Browser.

The problem: when try to navigate inside vscode.dev in Simple Browser, all webpages refuses connection

  • VSCode Version: 1.90.2
  • Local OS Version: 1.90.2
  • Remote OS Version: 1.90.2
  • Remote Extension/Connection Type: Tunnel
  • Logs:

Steps to Reproduce:

  1. Ctrl or Cmd + Shift + P
  2. Search for Simple Browser
  3. Try to navigate and connection refused

Does this issue occur when you try this locally?: No
Does this issue occur when you try this locally and all extensions are disabled?: No

@aleleba
Copy link
Author

aleleba commented Jul 5, 2024

Do someone know if this is the right place to put this issue? 👍🏼 thank you in advance.

@TechnoFairyGirl
Copy link

Do someone know if this is the right place to put this issue? 👍🏼 thank you in advance.

I doubt it. This is for running VSCode on remote machines (e.g. via SSH).

@aleleba
Copy link
Author

aleleba commented Jul 13, 2024

No with SSH, but yes on remote machines, Simple browser is not working in vscode.dev when connecting to a dev tunnel.

@connor4312
Copy link
Member

connor4312 commented Jul 24, 2024

Guessing this has to do with the security policies on vscode.dev (can be repro'd without any remote connection on the vscode.dev homepage)

@aleleba
Copy link
Author

aleleba commented Jul 26, 2024

Guessing this has to do with the security policies on vscode.dev (can be repro'd without any remote connection on the vscode.dev homepage)

Yes, it happened because the security policies on vscode.dev, we can not use simple browser inside vscode.dev only on local it works 👍🏼

@joaomoreno joaomoreno assigned mjbvz and unassigned joaomoreno Dec 12, 2024
@joaomoreno joaomoreno added the bug Issue identified by VS Code Team member as probable bug label Dec 12, 2024
@joaomoreno
Copy link
Member

@mjbvz We should disable Simple Browser in unsupported scenarios (ie serverless web).

@mjbvz
Copy link

mjbvz commented Dec 12, 2024

It should actually work if the page sets these headers:

res.setHeader('Cross-Origin-Resource-Policy', 'cross-origin');
res.setHeader('Cross-Origin-Embedder-Policy', 'require-corp');

The problem is that most servers do not set these. As a workaround for local development, you can make sure your dev server sets them

Afaik there's not a good way to workaround this on our side besides the credentialless attribute, but when I last tested it unfortunately it did seem to break our webviews. I can revisit this at some point. That still won't fix the simple browser completely tho as many public sites like YouTube simple do not allow themselves to be shown in iframes

@mjbvz
Copy link

mjbvz commented Dec 13, 2024

Closing in favor of microsoft/vscode#228522 since it happens in core too

@mjbvz mjbvz closed this as completed Dec 13, 2024
@mjbvz mjbvz added the upstream Issue identified as 'upstream' component related (exists outside of VS Code Remote) label Dec 13, 2024
@vs-code-engineering vs-code-engineering bot locked and limited conversation to collaborators Jan 27, 2025
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 upstream Issue identified as 'upstream' component related (exists outside of VS Code Remote)
Projects
None yet
Development

No branches or pull requests

6 participants