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

failed to run on chrome browser with 'yarn web' #84198

Closed
camelsiu opened this issue Nov 8, 2019 · 6 comments
Closed

failed to run on chrome browser with 'yarn web' #84198

camelsiu opened this issue Nov 8, 2019 · 6 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug verified Verification succeeded web Issues related to running VSCode in the web
Milestone

Comments

@camelsiu
Copy link

camelsiu commented Nov 8, 2019

git clone latest project code, and run command 'yarn' then 'yarn watch' and then 'yarn web', so the process starts and I can access it on chrome with url 'http://xxx.xxx.xxx.xx:8080'.

But then meets some problems:

  1. terminal prints this logs:
    yarn run v1.17.3
    $ node scripts/code-web.js
    Web UI available at http://localhost:8080
    Error: ENOENT: no such file or directory, stat '/ms_vscode/vscode-1.40.0/vscode/remote/web/node_modules/vscode-textmate/release/main.js.map'
    Error: ENOENT: no such file or directory, stat '/ms_vscode/vscode-1.40.0/vscode/remote/web/node_modules/onigasm-umd/release/OnigString.js.map'

  2. Press F12 on chrome to see details
    extHostExtensionActivator.ts:365 Activating extension vscode.vscode-api-tests failed: Failed to fetch

extensionResourceLoaderService.ts:29 GET http://localhost:8080/static-extension/theme-defaults/themes/dark_plus.json net::ERR_CONNECTION_REFUSED

webWorkerFileSystemProvider.ts:21 GET http://localhost:8080/static-extension/theme-seti/icons/vs-seti-icon-theme.json net::ERR_CONNECTION_REFUSED

Is there any suggestion to solve the problems?

@eagleoflqj
Copy link

You need to run scripts/code.sh before yarn web.

@camelsiu
Copy link
Author

camelsiu commented Nov 8, 2019

You need to run scripts/code.sh before yarn web.

when I run 'scripts/code.sh', there's some problems:

yarn run v1.17.3
$ node build/lib/electron
Done in 0.38s.
[14:58:21] Syncronizing built-in extensions...
[14:58:21] You can manage built-in extensions with the --builtin flag
[14:58:21] [marketplace] ms-vscode.node-debug@1.40.1
[14:58:21] [marketplace] ms-vscode.node-debug2@1.39.3
[14:58:21] [marketplace] ms-vscode.references-view@0.0.33
.build/electron/code-oss: /lib64/libdbus-1.so.3: no version information available (required by .build/electron/code-oss)
[19487:1108/145821.662324:FATAL:atom_main_delegate.cc(210)] Running as root without --no-sandbox is not supported. See https://crbug.com/638180.

my environment is a linux server

@lifanxi
Copy link

lifanxi commented Nov 8, 2019

I have the same issue here.

The root cause is the web is trying to get "static-extension/vscode-api-tests/out/extension.js" file from "localhost", but I'm using the web UI in remote browser.

I can workaround the issue by modifying the "scripts/code-web.js" like this:

diff --git a/scripts/code-web.js b/scripts/code-web.js
index 27d538dc1c..b8fcc77dc0 100755
--- a/scripts/code-web.js
+++ b/scripts/code-web.js
@@ -125,7 +125,7 @@ async function handleRoot(req, res) {
        mapExtensionFolderToExtensionPackageJSON.forEach((packageJSON, extensionFolder) => {
                staticExtensions.push({
                        packageJSON,
-                       extensionLocation: { scheme: 'http', authority: `localhost:${PORT}`, path: `/static-extension/${extensionFolder}` }
+                       extensionLocation: { scheme: 'http', authority: `<real ip>:${PORT}`, path: `/static-extension/${extensionFolder}` }
                });
        });

@bpasero bpasero closed this as completed in 60387fd Nov 8, 2019
@bpasero bpasero added bug Issue identified by VS Code Team member as probable bug web Issues related to running VSCode in the web labels Nov 8, 2019
@bpasero bpasero added this to the November 2019 milestone Nov 8, 2019
@bpasero
Copy link
Member

bpasero commented Nov 8, 2019

I added the following command line arguments to control this:

  • --host
  • --port
  • --scheme

Please let me know how that goes, e.g. yarn web --host 192.168.0.1

Thanks for testing this!

@eagleoflqj
Copy link

I added the following command line arguments to control this:

  • --host
  • --port
  • --scheme

Please let me know how that goes, e.g. yarn web --host 192.168.0.1

Thanks for testing this!

After git pull(commit 434662c) and assigning --host, the 3 resources mentioned at #84202 are successfully loaded.
But still get
log.ts:196
ERR No file system provider found for vscode-log:/20191108T154051/window.log: ENOPRO: No file system provider found for vscode-log:/20191108T154051/window.log
and
ERR No file system provider found for vscode-log:/20191108T154051/userDataSync.log: ENOPRO: No file system provider found for vscode-log:/20191108T154051/userDataSync.log
in chrome console.

@bpasero
Copy link
Member

bpasero commented Nov 9, 2019

Yeah those errors are OK and can be ignored. Reported already as #82567

@connor4312 connor4312 added the verified Verification succeeded label Dec 5, 2019
@vscodebot vscodebot bot locked and limited conversation to collaborators Dec 23, 2019
lemanschik pushed a commit to code-oss-dev/code that referenced this issue Nov 25, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug verified Verification succeeded web Issues related to running VSCode in the web
Projects
None yet
Development

No branches or pull requests

5 participants