vscode-vs-browser
vscode-vs-browser copied to clipboard
Doesn't work in WSL Ubuntu
Not sure if this is anything to do with your extension, but it would be nice if someone at least knows a workaround. I am using the Remote extension in VS Code and running my project through WSL2 Ubuntu. I have MS Edge installed on the Ubuntu system but when I open a new VS Browser instance, it's blank. Doesn't give an error or anything. Just a blank window
First, do you use the proxy mode? It is turned off by default and you can't go to localhost web if you turn it on. Second, can you open the Inspect window by clicking the bug icon and taking a screenshot for me? The necessary information should be in there. Maybe your website is blocked by CORS. Please help me check it so I can fix it for you. Thanks!
@Phu1237 Thank you so much for helping me look into this.
do you use the proxy mode? It is turned off by default and you can't go to localhost web if you turn it on.
This is off and I also cannot visit google or any website
can you open the Inspect window by clicking the bug icon and taking a screenshot for me?
@Se7enSquared Sorry for the missing step. Please capture log in the Console
window because the error will show in there like a normal browser.
Step: Open the Inspect window by clicking the bug icon > Console > Taking a screenshot for me
Thanks!
Here's one of the errors
Here's another
Same with google
Thanks! Can you give me the development environment like language, framework, etc?. So that I can make a project on my PC to test and fix it. Because the error shows me that the 127.0.0.1 is access successful but the WebSocket (maybe auto-reload) isn't. Thanks!
I am using Python and Django on WSL Ubuntu Windows 11. I am using the Remote-WSL extension
Realized localhost server is not active in the photos. I have included a new screenshot witht the localhost activated.
Thanks, I will try to fix it on my PC. Maybe the problem is your localhost block iframe options so that the extension can't be accessed.
@Phu1237 I really appreciate your help :) I have to admit I have no idea what my localhost block iframe options are. I should actually try to see if this happens in Windows without using the Remote WSL extension because my first thought was that it's because of using linux in windows
@Phu1237 Well my assumption was wrong! I cannot use the browser in Windows either.
This time, when not running VS Code through remote Ubuntu, it says
chromewebdata/:1 Refused to display 'https://www.google.com/' in a frame because it set 'X-Frame-Options' to 'sameorigin'.
In my very short bit of research I came across this - I'm sure you found it too but just in case, here it is https://stackoverflow.com/questions/6666423/overcoming-display-forbidden-by-x-frame-options#answer-7469997
@Phu1237 OK so I found out that there is also a "Simple browser" extension and I get the same result! So I guess this is not the fault of your extension. I wish I could figure it out.
One more update: VS Browser (and the "simple browser") both work when browsing https://xkcd.com/!
@Se7enSquared I know about the error and I'm working on it (local proxy server). But it is not working correctly yet because my main language isn't nodejs so it will take some time to take effect. You can try the local proxy server, but it may not work as expected. Thank you for using my extension!
@Se7enSquared I know about the error and I'm working on it (local proxy server). But it is not working correctly yet because my main language isn't nodejs so it will take some time to take effect. You can try the local proxy server, but it may not work as expected. Thank you for using my extension!
Thank you.