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

fix: live preview not working on chrome v111 #263

Merged
merged 2 commits into from
Mar 10, 2023
Merged

fix: live preview not working on chrome v111 #263

merged 2 commits into from
Mar 10, 2023

Conversation

abose
Copy link
Member

@abose abose commented Mar 10, 2023

Fixes: #262

Reason: Chrome added CORS header for the remote debug port used by live preview. We added the appropriate CORS header for the file:/// URLs used by brackets which is * . This is a less secure implementation than the one phcode.dev uses, but as we will be moving to phcode.dev arch, this is a temporary fix.

This fix ports the browser launch code from its c++/native impl to pure node js based js impl.

  • Tested working in windows with chrome v111
  • Tested Working in mac

@brackets-io
Copy link
Member

Thank You for making this pull request.

@@ -43,6 +43,18 @@ function _cmdLaunch(url) {
open(url);
}

function _launchChromeWithRDP(url, enableRemoteDebugging) {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@brackets-io
Copy link
Member

Thank You for making this pull request.

Copy link
Member

@charlypa charlypa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.
Thanks for contributing to brackets

@abose abose merged commit 797455a into master Mar 10, 2023
@abose abose deleted the chromeFix branch March 10, 2023 17:43
@abose
Copy link
Member Author

abose commented Mar 10, 2023

Testing. in progress.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix for broken Live Preview after latest chrome update
3 participants