VS code's inbuilt simple browser fails to load
See original GitHub issueOS/Web Information
- Web Browser: Brave
- Local OS: macOS
- Remote OS: macOS
- Remote Architecture: N/A
code-server --version
: 3.11
Steps to Reproduce
- Open Command Palette (Ctrl/Cmd + shift + p / F1)
- Type Simple Browser
- Select Simple Browser(show)
- Type any url
- (optional) check browser console for errors
Expected
A new tab in the Workspace should load with the site loaded.
Actual
Nothing loads.
Logs
I don’t believe these logs are related but posting regardless.
[Service Worker] registration: Failed to register a ServiceWorker for scope ('http://localhost:8080/') with script ('http://localhost:8080/static/4e8cd09ef0412dfc7b148b7639a692e20e4fd6dd/usr/local/Cellar/code-server/3.11.0/libexec/dist/serviceWorker.js'): A bad HTTP response code (404) was received when fetching the script. TypeError: Failed to register a ServiceWorker for scope ('http://localhost:8080/') with script ('http://localhost:8080/static/4e8cd09ef0412dfc7b148b7639a692e20e4fd6dd/usr/local/Cellar/code-server/3.11.0/libexec/dist/serviceWorker.js'): A bad HTTP response code (404) was received when fetching the script.
ERR Unable to write to Folder Settings because no resource is provided.: Error: Unable to write to Folder Settings because no resource is provided.
at b.reject (http://localhost:8080/static/4e8cd09ef0412dfc7b148b7639a692e20e4fd6dd/usr/local/Cellar/code-server/3.11.0/libexec/lib/vscode/out/vs/workbench/workbench.web.api.js:2403:15316)
at b.resolveAndValidate (http://localhost:8080/static/4e8cd09ef0412dfc7b148b7639a692e20e4fd6dd/usr/local/Cellar/code-server/3.11.0/libexec/lib/vscode/out/vs/workbench/workbench.web.api.js:2403:19500)
at b.doWriteConfiguration (http://localhost:8080/static/4e8cd09ef0412dfc7b148b7639a692e20e4fd6dd/usr/local/Cellar/code-server/3.11.0/libexec/lib/vscode/out/vs/workbench/workbench.web.api.js:2403:12506)
at Object.factory (http://localhost:8080/static/4e8cd09ef0412dfc7b148b7639a692e20e4fd6dd/usr/local/Cellar/code-server/3.11.0/libexec/lib/vscode/out/vs/workbench/workbench.web.api.js:2403:12282)
at y.consume (http://localhost:8080/static/4e8cd09ef0412dfc7b148b7639a692e20e4fd6dd/usr/local/Cellar/code-server/3.11.0/libexec/lib/vscode/out/vs/workbench/workbench.web.api.js:68:15342)
at http://localhost:8080/static/4e8cd09ef0412dfc7b148b7639a692e20e4fd6dd/usr/local/Cellar/code-server/3.11.0/libexec/lib/vscode/out/vs/workbench/workbench.web.api.js:68:15157
at new Promise (<anonymous>)
at y.queue (http://localhost:8080/static/4e8cd09ef0412dfc7b148b7639a692e20e4fd6dd/usr/local/Cellar/code-server/3.11.0/libexec/lib/vscode/out/vs/workbench/workbench.web.api.js:68:15081)
at b.writeConfiguration (http://localhost:8080/static/4e8cd09ef0412dfc7b148b7639a692e20e4fd6dd/usr/local/Cellar/code-server/3.11.0/libexec/lib/vscode/out/vs/workbench/workbench.web.api.js:2403:12267)
at y.writeConfigurationValue (http://localhost:8080/static/4e8cd09ef0412dfc7b148b7639a692e20e4fd6dd/usr/local/Cellar/code-server/3.11.0/libexec/lib/vscode/out/vs/workbench/workbench.web.api.js:2403:41475)
log.ts:296
ERR Cannot read property 'replace' of undefined: TypeError: Cannot read property 'replace' of undefined
at Object.a [as mnemonicMenuLabel] (http://localhost:8080/static/4e8cd09ef0412dfc7b148b7639a692e20e4fd6dd/usr/local/Cellar/code-server/3.11.0/libexec/lib/vscode/out/vs/workbench/workbench.web.api.js:75:37234)
at F.<anonymous> (http://localhost:8080/static/4e8cd09ef0412dfc7b148b7639a692e20e4fd6dd/usr/local/Cellar/code-server/3.11.0/libexec/lib/vscode/out/vs/workbench/workbench.web.api.js:1921:3884)
at n.fire (http://localhost:8080/static/4e8cd09ef0412dfc7b148b7639a692e20e4fd6dd/usr/local/Cellar/code-server/3.11.0/libexec/lib/vscode/out/vs/workbench/workbench.web.api.js:60:1855)
at A.runner (http://localhost:8080/static/4e8cd09ef0412dfc7b148b7639a692e20e4fd6dd/usr/local/Cellar/code-server/3.11.0/libexec/lib/vscode/out/vs/workbench/workbench.web.api.js:662:6717)
at A.doRun (http://localhost:8080/static/4e8cd09ef0412dfc7b148b7639a692e20e4fd6dd/usr/local/Cellar/code-server/3.11.0/libexec/lib/vscode/out/vs/workbench/workbench.web.api.js:68:17097)
at A.onTimeout (http://localhost:8080/static/4e8cd09ef0412dfc7b148b7639a692e20e4fd6dd/usr/local/Cellar/code-server/3.11.0/libexec/lib/vscode/out/vs/workbench/workbench.web.api.js:68:17063)
Screenshot
Notes
This issue can be reproduced in VS Code: Sort of?
It isn’t working in my local version of VS Code (blank screen)
I’m getting this weird “Focus Lock” error at the bottom.
_Originally reported by @Blakeinstein in https://github.com/cdr/code-server/discussions/3844_
Issue Analytics
- State:
- Created 2 years ago
- Comments:9 (4 by maintainers)
Top Results From Across the Web
VS code's inbuilt simple browser fails to load #3845 - GitHub
Open Command Palette (Ctrl/Cmd + shift + p / F1) · Type Simple Browser · Select Simple Browser(show) · Type any url ·...
Read more >How do I open a browser window in a visual studio code ...
Open vscode; Click ctrl + shift + P; Search Simple Browser Show; enter your localhost URL. Share.
Read more >Simple Browser (built-in) - Open VSX Registry
Open VSX is an Eclipse open-source project and alternative to the Visual Studio Marketplace. It is deployed by the Eclipse Foundation at open-vsx.org....
Read more >Debugging in Visual Studio Code
One of the great things in Visual Studio Code is debugging support. Set breakpoints, step-in, inspect variables and more.
Read more >How to Open in Browser from VS Code - Alphr
Click on the search bar in the Extensions panel and write “open in browser.” Choose an extension and click on “Install.” Reload the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Could be. But since it failed on heroku as well, I dont think its an HTTPS problem? Well I am not totally sure, but I assume its a webview since electron has a webview api and since simple browser doesnt have a requirement on having a browser present in the system. I assumed it would be using webview. I havent seen simple browser being documented properly, Just found it being used in gitpod (try any frontend code template).
Edit: If possible, can we have any webview components be served as iframes instead?
The focus lock is not an error or a bug. Its a feature. It shows when the webview is in focus, as in the keyboard and all inputs are currently being fed to the webview. I got completely different logs however. I will share them soon.
Edit: Worthwhile mention, that I could get some of the elements to load, (Basically the back forward, reload etc buttons without any styling.) Seems like the rest of the files failed to load. (JS and CSS)… I guess since the webview had an index.html + an iframe. the html loads, but any css and js requested by said html isnt loaded at all? (Stuck in CORS, or just plain not found?)