You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When trying to access code-server through the proxy It is unable to load any of the extensions and checking the log shows the results below.
This does not happen when I try to access it from my ubuntu laptop, it only fails on Windows.
I have just updated to 3.7.4, the same bug occurs, I am somewhat inclined to believe this is because of windows firewall but it uses standard ports so I have become more confused. Looking into the issue I am seeing a few new errors pop up.
On ubuntu the sourcemap is also not found but the ExtensionHost loads and shows the entire output of plugins being initialized. It seems to be failing on this block of code
this._proxy=this._extensionHost.start()!.then((protocol)=>{this._hasStarted=true;return{value: this._createExtensionHostCustomers(protocol)};},(err)=>{console.error('Error received from starting extension host');console.error(err);returnnull;});
_extensionHost appears to be implementing interface IExtensionHost. I am guessing that the method .start() of this interface is was originally platform specific VSCode code that code-server is yet to replace or has accidentally allowed to use.
Hopefully this provides some kind of help on how this issue can be fixed.
After a few times of it failing to login and retrying the logs are
[2020-12-04T00:06:17.802Z] debug forking vs code...
[2020-12-04T00:06:18.095Z] debug setting up vs code...
debug vscode got message from code-server {"type":"init"}
debug vscode got message from code-server {"type":"socket"}
debug vscode New connection {"token":"this is something"}
[2020-12-04T00:06:22.735Z] debug got latest version {"latest":"3.7.4"}
[2020-12-04T00:06:22.737Z] debug comparing versions {"current":"3.7.4","latest":"3.7.4"}
debug vscode got message from code-server {"type":"socket"}
debug vscode New connection {"token":"this is different than the last"}
debug vscode got message from code-server {"type":"socket"}
debug vscode got message from code-server {"type":"socket"}
debug vscode got message from code-server {"type":"socket"}
debug vscode got message from code-server {"type":"socket"}
Hmm, in that case it might be the proxy that is the issue if connecting
directly works. What proxy are you using? If you post the config we can
take a look and see if anything looks amiss.
Although you mentioned it worked from another laptop; is that one also
going through the proxy?
I'm not entirely sure what's going on in that case since I haven't been
able to replicate yet. Would you be able to post the full browser log?
It might also be helpful to look at the network tab and see if any of
the requests are failing.
My server is debian bullseye, I just upgraded to latest code-server version, from the version I installed a month ago. My client is Windows XP, latest Firefox. When I open the page, I get an error message dialog telling me that it was unable to connect and I need to reload the page. Does not help thou. No idea if this issue is related.
Should I post more information here or create a new issue?
New information, I have tried it on a computer that is not mine with the same install of windows and the issue was resolved, it is weird that it happens even after a reinstall though.
It was on a different network, I originally suspected windows firewall but it was the same version of windows, theirs was not a fresh install though. It works on other operating systems on my network.
I've been able to reproduce this issue. I have code-server running in the cloud, accessed via private IP over a WireGuard connection.
My local subnet is 10.2.0.0/16 and my remote private subnet is 10.3.0.0/16. Hosting cloud-server within the local 10.2.X.X subnet works fine, accessing via 10.3.X.X with default Windows Firewall (connection set to Private) results in the reconnect error.
I can reproduce the issue by turning off the Windows Firewall and loading code-server. The connection comes up right away and extensions start running. Note: after this initial connection code-server will continue to work for some time after re-enabling the firewall. I believe this is due to connection state tracking.
I turned on logging and didn't see any related DROP messages. I'm continuing to look into the issue. Ideally I'd like to find a solution that doesn't involve modifying the firewall for each client.
Yes, the Windows Firewall as most is stateful so it memorizes outgoing connections for a while to let replies in. Maybe there is a message from the server to the client after a too long delay. Maybe more frequent pings from the client to the server could fix the issue. But I am just roughly guessing, I am not an expert in sockets and firewalls at all. 😉
I've got it working without modifying the Windows Firewall.
I'm not sure the exact issue, but I'll share my findings and the fix here in hopes it sheds light or helps someone else.
I ran Wireshark to see what was going on when loading code-server in the browser. One thing that stood out to me were the repeated ICMP Redirects. These caused by having a static route directing traffic to my remote subnet 10.3.0.0/16.
To avoid the redirect I added a static route to my machine that bypassed my router. To my surprise code-server made connection and extensions fired up. It worked.
So two things: 1) it appears as if Windows Firewall ignores the redirects by default and doesn't modify the local route table; 2) code-server wasn't liking the redirect or going through the router for the extension host connection.
I modified my DHCP server to hand out static routes using the DHCP option "121" and providing the hex encoded string of routes. It's working fine now.
I'll also note that I use many other services (web, ssh, routing, etc...) on the 10.3.X.X network and haven't experienced any issues up until this code-server bug.
Activity
JSH32 commentedon Dec 2, 2020
I have tested this on all browsers including Firefox. The same issue occurs only specifically on windows.
JSH32 commentedon Dec 3, 2020
I have just updated to 3.7.4, the same bug occurs, I am somewhat inclined to believe this is because of windows firewall but it uses standard ports so I have become more confused. Looking into the issue I am seeing a few new errors pop up.

On ubuntu the sourcemap is also not found but the ExtensionHost loads and shows the entire output of plugins being initialized. It seems to be failing on this block of code
_extensionHostappears to be implementing interfaceIExtensionHost. I am guessing that the method.start()of this interface is was originally platform specific VSCode code that code-server is yet to replace or has accidentally allowed to use.Hopefully this provides some kind of help on how this issue can be fixed.
code-asher commentedon Dec 3, 2020
The source map is a bug; I'll be fixing that soon but it shouldn't cause any issues.
I tried using Chrome+Windows accessing 3.7.3 running on a Linux host but everything connected and I'm able to use it normally (all done locally).
Could you run with
--log debugthen post the browser logs and code-server's stdout?JSH32 commentedon Dec 4, 2020
After a few times of it failing to login and retrying the logs are
JSH32 commentedon Dec 4, 2020
I have also tested not using the coder proxy. It loads perfectly when directly connecting.
code-asher commentedon Dec 4, 2020
code-asher commentedon Dec 4, 2020
Oh I misread, you're using the coder cloud proxy with
--link?code-asher commentedon Dec 4, 2020
I tried out
--linkand accessed from a Windows machine (with Chrome) but haven't been able to replicate the problem yet.JSH32 commentedon Dec 4, 2020
I used
--linkyescode-asher commentedon Dec 7, 2020
L3P3 commentedon Dec 8, 2020
My server is debian bullseye, I just upgraded to latest code-server version, from the version I installed a month ago. My client is Windows XP, latest Firefox. When I open the page, I get an error message dialog telling me that it was unable to connect and I need to reload the page. Does not help thou. No idea if this issue is related.
Should I post more information here or create a new issue?
7 remaining items
L3P3 commentedon Dec 8, 2020
It also works when I open the page from Firefox running in Windows. Maybe I misunderstood the issue here.
JSH32 commentedon Dec 12, 2020
How would I submit my browser log, it is still happening even though I have reinstalled windows. Exactly the screenshot above.
code-asher commentedon Dec 14, 2020
JSH32 commentedon Dec 14, 2020
New information, I have tried it on a computer that is not mine with the same install of windows and the issue was resolved, it is weird that it happens even after a reinstall though.
code-asher commentedon Dec 15, 2020
JSH32 commentedon Dec 15, 2020
It was on a different network, I originally suspected windows firewall but it was the same version of windows, theirs was not a fresh install though. It works on other operating systems on my network.
shayne commentedon Jun 29, 2021
I've been able to reproduce this issue. I have code-server running in the cloud, accessed via private IP over a WireGuard connection.
My local subnet is 10.2.0.0/16 and my remote private subnet is 10.3.0.0/16. Hosting cloud-server within the local 10.2.X.X subnet works fine, accessing via 10.3.X.X with default Windows Firewall (connection set to Private) results in the reconnect error.
I can reproduce the issue by turning off the Windows Firewall and loading code-server. The connection comes up right away and extensions start running. Note: after this initial connection code-server will continue to work for some time after re-enabling the firewall. I believe this is due to connection state tracking.
I turned on logging and didn't see any related DROP messages. I'm continuing to look into the issue. Ideally I'd like to find a solution that doesn't involve modifying the firewall for each client.
Ideas?
L3P3 commentedon Jun 29, 2021
Yes, the Windows Firewall as most is stateful so it memorizes outgoing connections for a while to let replies in. Maybe there is a message from the server to the client after a too long delay. Maybe more frequent pings from the client to the server could fix the issue. But I am just roughly guessing, I am not an expert in sockets and firewalls at all. 😉
jsjoeio commentedon Jun 29, 2021
I haven't used Windows in a long time so not the expert here but maybe @code-asher has some ideas
shayne commentedon Jun 29, 2021
I've got it working without modifying the Windows Firewall.
I'm not sure the exact issue, but I'll share my findings and the fix here in hopes it sheds light or helps someone else.
I ran Wireshark to see what was going on when loading code-server in the browser. One thing that stood out to me were the repeated ICMP Redirects. These caused by having a static route directing traffic to my remote subnet 10.3.0.0/16.
To avoid the redirect I added a static route to my machine that bypassed my router. To my surprise code-server made connection and extensions fired up. It worked.
So two things: 1) it appears as if Windows Firewall ignores the redirects by default and doesn't modify the local route table; 2) code-server wasn't liking the redirect or going through the router for the extension host connection.
I modified my DHCP server to hand out static routes using the DHCP option "121" and providing the hex encoded string of routes. It's working fine now.
I'll also note that I use many other services (web, ssh, routing, etc...) on the 10.3.X.X network and haven't experienced any issues up until this code-server bug.
code-asher commentedon Jun 30, 2021
stale commentedon Dec 27, 2021
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no activity occurs in the next 5 days.