Skip to content

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

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

Closed
JinGangRed opened this issue Mar 19, 2019 · 35 comments
Closed

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

JinGangRed opened this issue Mar 19, 2019 · 35 comments
Labels
bug Something isn't working

Comments

@JinGangRed
Copy link

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 JinGangRed added the bug Something isn't working label Mar 19, 2019
@EvgeniyMakhmudov
Copy link

EvgeniyMakhmudov commented Mar 19, 2019

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

@kylecarbs
Copy link
Member

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

@davefinster
Copy link

davefinster commented Mar 19, 2019

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

@JinGangRed
Copy link
Author

@kylecarbs The version of chrome is Version 70.0.3538.77

@JinGangRed
Copy link
Author

JinGangRed commented Mar 20, 2019

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

@lifubang
Copy link

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

@kylecarbs
Copy link
Member

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

@JinGangRed
Copy link
Author

@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.

@mfmayer
Copy link

mfmayer commented Mar 21, 2019

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

@hjalmarlucius
Copy link

hjalmarlucius commented Mar 21, 2019

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.

@monomadic
Copy link

monomadic commented Mar 24, 2019

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?

@Boggin
Copy link

Boggin commented Mar 25, 2019

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.

@cybersorcerer
Copy link

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.

@nol166
Copy link
Contributor

nol166 commented Apr 9, 2019

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.

@JinGangRed
Copy link
Author

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

@AALMA
Copy link

AALMA commented Jun 17, 2019

Also experiencing this issue from iPad Pro

@deansheather
Copy link
Member

@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.

@stammy
Copy link

stammy commented Jun 20, 2019

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)

@rmchale
Copy link

rmchale commented Jun 21, 2019

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.

@brotherko
Copy link

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

@deansheather
Copy link
Member

If you're using iPad and seeing a black screen with HTTP authentication through a reverse proxy (not code-server's built-in login screen), this is caused by a webkit bug. The browser won't send the HTTP password with the request to connect to the websocket.

@NGarate
Copy link

NGarate commented Jul 2, 2019

I think this issue #89 is the same.
And it's not related with code-server, it's an old WebKit browser bug Bug 80362

@stammy
Copy link

stammy commented Jul 2, 2019

Just updated to iPadOS beta 3 - same issue

@deansheather
Copy link
Member

The OP was using Chrome, so I won't close this issue. If you're having issues with iPad/Safari, please discuss or 👍 in #89.

@rmchale
Copy link

rmchale commented Jul 3, 2019

For iPad I fixed it with a cert from lets-encrypt.

@muammar
Copy link

muammar commented Jul 26, 2019

For iPad I fixed it with a cert from lets-encrypt.

Would you mind publishing a post on how to do it?

@NGarate
Copy link

NGarate commented Jul 26, 2019

For iPad I fixed it with a cert from lets-encrypt.

Which version of iOS or iPadOS are you using?
Are you using HTTP Basic access authentication?

@muammar
Copy link

muammar commented Jul 26, 2019

For iPad I fixed it with a cert from lets-encrypt.

Which version of iOS or iPadOS are you using?
Are you using HTTP Basic access authentication?

Beta 13.0. I think this is the latest version as I installed it 3 days ago.

@noodlemind
Copy link

I am having the same issue (blank black screen) trying to access it from the iPad Browsers (Safari and Chrome).
When I try to access is from Windows Desktop (Chrome) it seems to work but doesn't load any of the icons (There was an error on my VPS that says favicon not found).

I was not able to follow the comments along probably. Does this have any fix ?

@andreeastrattner
Copy link

I have the same issue - I can connect and it works great on mac - chrome but on ipad os 13.1 safari I get the following 500 error and a black screen.

Screenshot 2019-08-30 at 2 04 03 PM

@Shadowist
Copy link

Weird. I updated to the most recent build of iPad OS 13.1 and ran into the blank page issue on Safari and other App Store browsers (chrome, Firefox, etc). Linux desktop is a virtual machine inside a Synology NAS. I used the self-signed cert from the quick setup documentation.

I got around it by exporting my Let’s Encrypt cert and key from my Synology and slotted in directly to the code-server app (no need to convert formats or anything...pem direct) like another user did. Suddenly it worked.

@ccssmnn
Copy link

ccssmnn commented Sep 25, 2019

Weird. I updated to the most recent build of iPad OS 13.1 and ran into the blank page issue on Safari and other App Store browsers (chrome, Firefox, etc). Linux desktop is a virtual machine inside a Synology NAS. I used the self-signed cert from the quick setup documentation.

I got around it by exporting my Let’s Encrypt cert and key from my Synology and slotted in directly to the code-server app (no need to convert formats or anything...pem direct) like another user did. Suddenly it worked.

Stable non-beta version still has this issue. Could you publish a post describing how you solved it?

@nphase
Copy link

nphase commented Oct 15, 2019

Have the same issue on ipad pro 11". tried both chrome and safari

@sr229
Copy link
Contributor

sr229 commented Oct 15, 2019

Hey all, it seems that this has been outdated for a long time ago, and this seems to only affect v1 so I suggest to use v2. iPad users please upgrade your devices to iPadOS since it has been reported to have better compatibility with apps like code-server.

@sr229 sr229 closed this as completed Oct 15, 2019
@ckalpit
Copy link

ckalpit commented Oct 23, 2019

I had a similar issue.
I found a workaround wiz while starting your code-server pass -H as an argument that will allow HTTP connections and then you open your server with HTTP protocol.
For me, it is working now on both chrome and safari (However I had to clear cache for that size/IP in chrome)

But the only downside to this is that your connection will not be secure (HTTP).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests