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

Does not work on codespaces #538

Closed
mwisnicki opened this issue Aug 8, 2023 · 4 comments
Closed

Does not work on codespaces #538

mwisnicki opened this issue Aug 8, 2023 · 4 comments
Labels
info-needed Issue requires more information from poster

Comments

@mwisnicki
Copy link

Fails with following CSP error in console:

index.html?id=ecf3f705-5c6f-44be-808c-c32ae4e6ca53&origin=dc695ab0-0436-4d25-9221-918d6c757d15&swVersion=4&extensionId=ms-vscode.live-server&platform=browser&vscode-resource-base-authority=vscode-resource.vscode-cdn.net&parentOrigin=https%3A%2F%2Fdidactic-space-xylophone-4jx4gjj727rw5.github.dev&remoteAuthority=codespaces%2Bdidactic-space-xylophone-4jx4gjj727rw5:999

Refused to frame 'https://github.dev/' because it violates the following Content Security Policy directive: "frame-src https://didactic-space-xylophone-4jx4gjj727rw5-3000.app.github.dev".
@andreamah
Copy link
Contributor

Did you try the steps in the FAQ?

Q. I'm trying to use Live Preview in Codespaces and the embedded preview isn't working.

A. Currently, you will need to manually navigate to the links host the forwarded port content before it works

In the area of the editor where the integrated terminal usually is, navigate to Ports and open the local addresses (usually at ports 3000 and 3001) in the browser. You can do this by using CTRL+Click on the URLs in the Ports menu.

Allow the browser to perform the necessary redirects, then close the windows. Re-open the preview window and it should work now.

@andreamah andreamah added the info-needed Issue requires more information from poster label Aug 8, 2023
@andreamah
Copy link
Contributor

I think this was a duplicate of #546

@mwisnicki
Copy link
Author

I switched to latest prerelease and had to follow the steps from FAQ mentioned above to get this working.
@andreamah is this expected?

Also live reload does not work with simple static html files.

@andreamah
Copy link
Contributor

Yes, this is expected. The full functionality is tracked in #111.

To get the full functionality, click on the forwarded port link for both 3000 and 3001. 3001 will say 'update required', but this is expected since it is a websocket port.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
info-needed Issue requires more information from poster
Projects
None yet
Development

No branches or pull requests

2 participants