-
Notifications
You must be signed in to change notification settings - Fork 5.9k
Cannot reconnect. Please reload the window. #4693
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
Comments
I have the same situation. |
Receiving the same issue here as well, completely fresh install. I've noticed a few things, similar to the above, which makes me believe this is the extension host again. 1, the reconnecting loop happens exactly 3 times.
3, After the 2nd reconnect, before the 3rd, I get the following errors:
|
Additionally, reverting to 3.12.0, I do not exhibit the above behavior. |
It happens to me too. |
Can someone please provide reproduction steps? I'm running 4.0.1 on macOS with Brave and do not see this. |
@jsjoeio for me it was just installing the image, starting it up and loading up the UI. Latest Firefox, Win 10. |
I'm running from source directly on macOS + Brave and can't reproduce this :( @code-asher any ideas? |
For me, this behavior occurs on a fresh install when specifying a cert in config.yaml. Extensions successfully load with (edit: my environment) |
@onepunchdan good catch! I upgraded to 4.0.1 and now none of my extensions loaded and after about 5 seconds I receive the error and same console logs that the OP mentioned. I commented out my cert configs in my config.yaml and reloaded and now it loads fine with all my extensions and no errors (except for the untrusted connection error). @jsjoeio maybe this will be enough info for you to replicate the issue? |
Counter point, I have never touched the
|
I can confirm, |
I was able to downgrade my Ubuntu install which is working fine now. > curl -fsSL https://code-server.dev/install.sh | sh -s -- --version 3.12.0
Ubuntu 20.04.3 LTS
Installing v3.12.0 of the amd64 deb package from GitHub. How do I downgrade my macOS install? Even though I pass the version, it tries to install the latest. > curl -fsSL https://code-server.dev/install.sh | sh -s -- --version 3.12.0
macOS v11.6.2
Installing latest from Homebrew. |
Can confirm same behavior using the
|
This can be replicated & tested on any system (tested on macOS, Windows, and Linux) with the docker command below. Log in with https on port 8080 with the password "temp" and bypass the untrusted cert warning. Just sit back and watch the Console logs and after about 2 minutes you will get the connection error. Even when I pass a valid trusted cert, I still get the reconnection errors. If I remove the docker run --rm --name code-server --entrypoint "/usr/bin/entrypoint.sh" -p 0.0.0.0:8080:8080 -e PASSWORD="temp" codercom/code-server:4.0.1 --bind-addr 0.0.0.0:8080 --auth "password" --cert |
@code-asher any ideas on this? |
@JtMotoX Looks like it installed with Homebrew. AFAIK, Homebrew does not keep track of old formula so you can't downgrade using Homebrew. You should be able to |
If I recall correctly there were some siginficant removals around code
designed to handle the `cert` case so it is possible this is another
case of code removed that should not have been.
|
So the current status of 4.x is that it doesn't work with existing TLS certificates? Given that numerous features (clipboard, webview, etc) only work when loaded from HTTPS this seems like a pretty important issue.. I had trouble getting Chrome to properly take the self-signed certs so instead, I was able to get my session working again by putting code-server on a different HTTP port and then running a Caddy instance in front: $ cat ~/.local/share/code-server/Caddyfile
my-code-server.danopia.net:8080
reverse_proxy localhost:8079
tls cert.pem cert-key.pem This reverse proxy situation seems to work properly without triggering "Cannot reconnect" message |
I thought about doing this with a docker nginx reverse proxy sitting in front of it but it just seemed easier to rollback to 3.x until this issue gets resolved. |
Even with the extensions activated, I try to open the list of accounts and it keeps loading, until several seconds pass and the same error appears. I think the problem is there. |
Still have the same issue with the newly released v4.0.2. |
@JtMotoX thank you for confirming! We'll hopefully get to this soon. |
Hi, I've been working during months w/ 4.0.1 ('ms-python.python', 'redhat.java' and 'kelvin.vscode-sshfs' extensions) deploying many different environments w/o any issues using "curl -fsSL https://code-server.dev/install.sh | sh" and systemctl and the following "$HOME/.config/code-server/config.yaml" file:
after upgrading to 4.0.2 I'm getting the same error "Cannot reconnect. Please reload the window." in the web browser. I started manually Code-Server w/ "code-server --verbose" and this is the log output:
and even I'm trying to rollback now to install Code-Server w/ the old version 4.0.1 in a totally new env and I don't know why now I'm having the same problem too as of 4.0.2 when it wasn't in the past ... it's supposed that the 4.0.1 code has not been modified, isn't it? Thanx again. |
@kexirong thanks for the notes! I'm not 100% what the issue is. We'll need to take a closer look. |
code-server: v4.0.2 Upgraded from 3.11 and now getting the "Cannot reconnect. Please reload window." so often, it's unusable. Re-reading comments, I am using --cert option. Running on an ubuntu box, with deb install and upgrades since 3.9. |
Just to clarify...this is making code-server unusable for everyone right? Is there a certain browser it does work with? I work off of my macOS Chrome and my iPad (Safari) and getting this issue in both places. |
Stick with 3.12.0 until they release 4.0.3 where a patch for this issue is slated |
for me a fresh 4.0.2 (SSL) installation is not working with "$HOME/.config/code-server/config.yaml" file:
in any browser in Windows and MacOS. As a workaround, I disabled SSL in 4.0.2 to use nginx as front-end with "$HOME/.config/code-server/config.yaml" file:
and it's working. |
I'm looking into this now. I was able to reproduce locally and updated the original issue with steps and a screenshot. I need to continue investigating. I'll update this comment with my notes. Notes❌ The generated cert is not the issueIf you put Therefore, I do not believe the generated certificate is the root cause of this issue. ❓ What about the place where code-server tells VS Code about the cert?TODO - investigate Asher gave me some pointers. I'm going to see if we can take a TDD approach to show this is a bug and then fix it. Notes from debug with Asher 2/9It seems that VS Code is getting stuck before sending the socket to the extension host (after calling socket drain). Not sure why, we'll need to investigate tomorrow. Workaroundsuse a tool like
|
Looking forward to it being fixed |
OS/Web Information
code-server --version
: 4.0.1same of #1884
Steps to Reproduce
config.yaml
and add this:code-server
Expected
code-server can be accessed via HTTPS and all expected features work.
Actual
Browser complains about about SSL certificate says "Cannot reconnect"
Screenshot
The text was updated successfully, but these errors were encountered: