Skip to content

VS code's inbuilt simple browser fails to load #3845

Closed

Description

@jsjoeio

OS/Web Information

  • Web Browser: Brave
  • Local OS: macOS
  • Remote OS: macOS
  • Remote Architecture: N/A
  • code-server --version: 3.11

Steps to Reproduce

  1. Open Command Palette (Ctrl/Cmd + shift + p / F1)
  2. Type Simple Browser
  3. Select Simple Browser(show)
  4. Type any url
  5. (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

image

Notes

This issue can be reproduced in VS Code: Sort of?

It isn't working in my local version of VS Code (blank screen)

image

I'm getting this weird "Focus Lock" error at the bottom.

Originally reported by @Blakeinstein in #3844

Activity

  1. added this to the On Deck milestone on Jul 23, 2021
  2. Blakeinstein commented on Jul 23, 2021

    @Blakeinstein

    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?)

  3. jsjoeio commented on Jul 23, 2021

    @jsjoeio
    ContributorAuthor

    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.

    Whoops! lol thank you for clarifying.

    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?)

    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.

  4. Blakeinstein commented on Jul 23, 2021

    @Blakeinstein

    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.

    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?

  5. jsjoeio commented on Jul 23, 2021

    @jsjoeio
    ContributorAuthor

    Hmm...good point about Heroku.

    If possible, can we have any webview components be served as iframes instead?

    Great question. I'm not sure 🤔 @code-asher might know though

  6. Blakeinstein commented on Jul 24, 2021

    @Blakeinstein

    I totally missed the notes section, but some pages may not load in the vscode webview. Try something simple like https://xkcd.com instead

  7. code-asher commented on Jul 26, 2021

    @code-asher
    Member
  8. stale commented on Jan 22, 2022

    @stale

    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.

  9. jonasdev commented on May 9, 2022

    @jonasdev

    Any solutions running CRA projects?

  10. jsjoeio commented on May 9, 2022

    @jsjoeio
    ContributorAuthor
  11. willmil11 commented on Oct 17, 2023

    @willmil11

    What vscode theme are you using ? Looks so cool :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions