code-server icon indicating copy to clipboard operation
code-server copied to clipboard

Couldn't open the code-server, just opening with a black window

Open JinGangRed opened this issue 7 years ago • 35 comments

Open the code-server in the browser, and it opening with a black window. There is nothing. I find the localStorage also has nothing.

Description

I open the code-server in the browser, and it opening with a black window. There is nothing. I find the localStorage also has nothing. I have changed some browser, such as chrome and IE. It doesn't affect.

JinGangRed avatar Mar 19 '19 09:03 JinGangRed

I found the similar situation. In log i find this

ERROR SHARED stderr {"data":"Uncaught Exception: Error: ENOENT: no such file or directory, open '/root/.local/share/code-server/Backups/workspaces.json'\n\nError: ENOENT: no such file or directory, open '/root/.local/share/code-server/Backups/workspaces.json'\n at Timeout.setTimeout [as _onTimeout] (eval at exports.requireModule (/usr/local/bin/code-server:468:27625), :56921:31)\n at ontimeout (timers.js:498:11)\n at tryOnTimeout (timers.js:323:5)\n at Timer.listOnTimeout (timers.js:290:5)\n"}

In browser there is 404 on request http://host:8443/__webpack_hmr

Run on last available docker image

EvgeniyMakhmudov avatar Mar 19 '19 14:03 EvgeniyMakhmudov

That error shouldn't matter. What version of chrome are you using @JinGangRed ?

kylecarbs avatar Mar 19 '19 15:03 kylecarbs

I've struck this as well. From memory I've always seem the 404 on webpack_hmr, but I've noticed this in the JS console now:

 INFO  Loading IDE
webpack-internal:///./packages/logger/out/main.js:1  INFO  Starting socket [1/5]...
/__webpack_hmr:1 Failed to load resource: the server responded with a status of 404 ()
webpack-internal:///./packages/logger/out/main.js:1  INFO  Connected to socket
webpack-internal:///./packages/logger/out/main.js:1  INFO  Start workbench
webpack-internal:///./packages/logger/out/main.js:1  ERROR  Failed "Start workbench" duration=759ms
main.js?f92d:1 duration (i): iexpected: 1000ms: 1553012780091__proto__: Object
main.js?f92d:1 error (Error): Error: [UriError]: Scheme contains illegal characters.
    at _validateUri (uri.ts?336c:38)
    at _URI.URI (uri.ts?336c:175)
    at new _URI (uri.ts?336c:391)
    at Function.URI.revive (uri.ts?336c:367)
    at Object.reviveWorkspaceIdentifier (workspaces.ts?067d:38)
    at CodeRendererMain.reviveUris (main.ts?bd53:89)
    at CodeRendererMain.init (main.ts?bd53:70)
    at new CodeRendererMain (main.ts?bd53:61)
    at main (main.ts?bd53:331)
    at Workbench.eval (workbench.ts?f527:192)
webpack-internal:///./packages/logger/out/main.js:1  ERROR  [UriError]: Scheme contains illegal characters.

And just realized my comment dupes #275

davefinster avatar Mar 19 '19 16:03 davefinster

@kylecarbs The version of chrome is Version 70.0.3538.77

JinGangRed avatar Mar 20 '19 07:03 JinGangRed

There is nothing in the Local Storage and session storage. So the #275 issue couldn't fix my issue

JinGangRed avatar Mar 20 '19 07:03 JinGangRed

The same problem: (version 1.32.0-310) 3654e6cedee2a1819d80fd6db2ff99d

lifubang avatar Mar 20 '19 10:03 lifubang

@JinGangRed could you try updating chrome? I'm not certain what API we'd be using that could cause the issue.

kylecarbs avatar Mar 20 '19 14:03 kylecarbs

@kylecarbs Thanks for your replay. I can load it before on this version of chrome. Now I couldn't open it, not only opening on the chrome, but the Firefox on another machine. I think the container of mine is down. This issue has occur, when I created a workspace before. Then I remove the Local Storage and reopen it. It works. But this time, there are nothing in the Local Storage, I have tried clean it. But it doesn't work. I think it will be better if we create a web admin UI to manage the container.

JinGangRed avatar Mar 21 '19 01:03 JinGangRed

Same happened to me after adding a folder to the workspace. Black screen after that, even if I restart code-server.

mfmayer avatar Mar 21 '19 06:03 mfmayer

I have the same issue - occurs immediately once I load my usual workspace. This workspace contains three folders - initially with relative paths but it did not work if I changed it to absolute paths either.

EDIT: I looked around the ~/.local/shared/code-server folder and removed everything related to workspaces. Then it worked again - but only after deleting cookies. Breaks once I import a workspace.

hjalmarlucius avatar Mar 21 '19 11:03 hjalmarlucius

Also getting this black screen error; occurs on latest firefox, chrome, brave and safari, whenever I add a folder. Happens using the hosted version (coder.com) - This seems like a pretty critical bug to me as it makes the app completely unusable with no way of opening files at all.

Console gives these errors: image

Another weird thing: clicking 'open folder' and selecting a directory, gives the error "error: file is a directory".... huh?

monomadic avatar Mar 24 '19 13:03 monomadic

I get this when in an office where the firewall blocks websockets.

It's pretty clear from the console that this is the issue in my case as it is retrying and failing to connect to the sockets. I have run separate scripts to demonstrate that the firewall is indeed blocking websockets.

That's not something that can be fixed so perhaps a getting started document could list some pre-requisites for the application.

Boggin avatar Mar 25 '19 10:03 Boggin

Same here, code-server is running on Ubuntu 18.04. When i connect from my macbook pro using either safari or chrome it works. On my ipad pro it just shows a black browser window after login. I tried safari, chrome and firefox neither works. I just downloaded the latest version and tested, same thing. If you need any kind of help, documentation of the problem let me know i will do my best to get it for you.

cybersorcerer avatar Apr 09 '19 16:04 cybersorcerer

There was an old bug that would show that error if you set a custom workspace. Try going into localstorage and delete the workspace property.

nol166 avatar Apr 09 '19 17:04 nol166

@nol166 yes. I have delete the workspace property once,and it works. However, there were nothing in the localstorage now.

JinGangRed avatar Apr 10 '19 05:04 JinGangRed

Also experiencing this issue from iPad Pro

AALMA avatar Jun 17 '19 01:06 AALMA

@AALMA Apparently only the new iPad OS works well with code-server. The current iOS either doesn't load code-server or lots of keyboard commands don't work correctly.

deansheather avatar Jun 17 '19 10:06 deansheather

Experiencing this myself on iPadOS Beta 2 in Safari. Just a blank/black screen. I don't run code-server with auth, but I do use an ngrok.io tunnel to provide my basic auth and https. Don't have any issues using ngrok on the same server for hosting other sites so don't think it's related to that?

I am hosting on AWS lightsail for what it's worth. I have tried enabling/disabling various Safari for iPadOS features/experimental features thinking that code-server may rely on certain browser functionality but no dice, even with everything enabled (there's a list of like 20 in settings)

stammy avatar Jun 20 '19 18:06 stammy

I am seeing the same black screen on iPadOS Beta 2 on iPad pro 1 1 in Chome/Safari. I have auth w/no tunnel.

rmchale avatar Jun 21 '19 21:06 rmchale

I am seeing the same black screen on iPadOS Beta 2 on iPad pro 1 1 in Chome/Safari. I have auth w/no tunnel.

Same issue. Btw I used to deploy on DO using docker and works perfectly

brotherko avatar Jul 01 '19 21:07 brotherko