Code-server: [v2] Got blank screen with local browser

Created on 14 Aug 2019  Â·  7Comments  Â·  Source: cdr/code-server


  • code-server version: 2.preview.4-vsc1.37.0 (binary)
  • OS Version: Vagrant ubuntu/bionic64 (18.04LTS)
  • Host OS: Windows 10 Pro 1903
  • Host browser: Google Chrome

Description

When I run code-server on Ubuntu, I got a blank screen on Windows browser.
The command was ./code-server /home/vagrant/workspace

Steps to Reproduce

  1. Run ./code-server <any directory>
  2. Open its IP 192.168.33.10:8080
  3. Get a blank screen
bug

All 7 comments

try ./code-server -p 8080

Still blank screen.

Could you check the browser console and the code-server console for any messages (errors, etc.) that could help?

code-server listens on localhost by default which won't be
accessible outside the Ubuntu VM. Adding something like --host 0.0.0.0 might fix it.

Same issue as OP for me for the same version of code-server. Dockerfile_devel works when I'm not using docker toolbox, but when using docker toolbox, I'm having the same issue.

The command I ran: docker run -p 192.168.99.100:8445:8080 -v ${PWD}:/src/fmriprep fmriprep_devel:latest

The console error message:

Unchecked runtime.lastError: The message port closed before a response was received.

resourceServiceWorkerClient.ts:27 Uncaught TypeError: Cannot read property 'register' of undefined
    at new ServiceWorkerStarter (resourceServiceWorkerClient.ts:27)
    at resourceServiceWorkerClient.ts:19
    at Function.Module._invokeFactory (loader.js:996)
    at Module.complete (loader.js:1006)
    at ModuleManager._onModuleComplete (loader.js:1623)
    at ModuleManager._resolve (loader.js:1583)
    at ModuleManager.defineModule (loader.js:1234)
    at DefineFunc (loader.js:1673)
    at resourceServiceWorkerClient.ts:4
    at fake:1
ServiceWorkerStarter @ resourceServiceWorkerClient.ts:27
(anonymous) @ resourceServiceWorkerClient.ts:19
Module._invokeFactory @ loader.js:996
Module.complete @ loader.js:1006
ModuleManager._onModuleComplete @ loader.js:1623
ModuleManager._resolve @ loader.js:1583
ModuleManager.defineModule @ loader.js:1234
DefineFunc @ loader.js:1673
(anonymous) @ resourceServiceWorkerClient.ts:4
(anonymous) @ fake:1

We'll see if that's the same error the other person is getting too.

Thank you for replying.

--host 0.0.0.0 didn't work.

And console says:

â–¼30 Refused to load the font '<URL>' because it violates the following Content Security Policy directive: "font-src 'self' blob: vscode-remote:".

and

Uncaught TypeError: Cannot read property 'register' of undefined
    at new ServiceWorkerStarter (resourceServiceWorkerClient.ts:27)
    at resourceServiceWorkerClient.ts:19
    at Function.Module._invokeFactory (loader.js:996)
    at Module.complete (loader.js:1006)
    at ModuleManager._onModuleComplete (loader.js:1623)
    at ModuleManager._resolve (loader.js:1583)
    at ModuleManager.defineModule (loader.js:1234)
    at DefineFunc (loader.js:1673)
    at resourceServiceWorkerClient.ts:4
    at fake:1

Closing this as a duplicate in favor of #901 and #909 (as it's tidier).

Was this page helpful?
0 / 5 - 0 ratings

Related issues

rcarmo picture rcarmo  Â·  3Comments

KSXGitHub picture KSXGitHub  Â·  3Comments

tecosaur picture tecosaur  Â·  3Comments

lshamis picture lshamis  Â·  3Comments

Arsaev picture Arsaev  Â·  3Comments