Repository navigation
VS code's inbuilt simple browser fails to load #3845
Copy link
Copy link
Closed
Labels
bugSomething isn't workingSomething isn't working
Milestone
Description
OS/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 #3844
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working


Activity
Blakeinstein commentedon Jul 23, 2021
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?)
jsjoeio commentedon Jul 23, 2021
Whoops! lol thank you for clarifying.
Interesting...when you said webview it made me think of this upstream issue we've been seeing reports about in the latest release. I wonder if they could be related.
Blakeinstein commentedon Jul 23, 2021
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?
jsjoeio commentedon Jul 23, 2021
Hmm...good point about Heroku.
Great question. I'm not sure 🤔 @code-asher might know though
Blakeinstein commentedon Jul 24, 2021
I totally missed the notes section, but some pages may not load in the vscode webview. Try something simple like https://xkcd.com instead
code-asher commentedon Jul 26, 2021
stale commentedon Jan 22, 2022
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no activity occurs in the next 5 days.
jonasdev commentedon May 9, 2022
Any solutions running CRA projects?
jsjoeio commentedon May 9, 2022
@jonasdev does this help? https://coder.com/docs/code-server/latest/guide#proxying-to-create-a-react-app
willmil11 commentedon Oct 17, 2023
What vscode theme are you using ? Looks so cool :)