coder / code-server

VS Code in the browser
https://coder.com
MIT License
68.48k stars 5.61k forks source link

[Bug]: CodeServer stops working after upgrading to MacOs Sonoma 14.0 #6473

Closed vandolphreyes closed 4 months ago

vandolphreyes commented 1 year ago

Is there an existing issue for this?

OS/Web Information

Steps to Reproduce

CodeServer just stops working after installing the latest MacOs Sonoma. I'm pretty sure it's something to do with my macOS because code server in all our projects are still working I n MacOsVentura and Windows OS.

After inputting the code server password, it just goes white and console error shows .

ERR [remote-connection][Management ][42eba…][initial][WebSocket(52.201.175.188:8080)] the handshake timed out. Error: log.ts:441 ERR Error: Time limit reached at u.i (remoteAgentConnection.ts:148:20) at u.h (remoteAgentConnection.ts:144:28) at o.value (remoteAgentConnection.ts:126:86) at u.w (event.ts:1107:13) at u.fire (event.ts:1138:9) at P.cancel (cancellation.ts:69:19) at E.cancel (cancellation.ts:124:16) at o.value (remoteAgentConnection.ts:99:41) at u.w (event.ts:1107:13) at u.fire (event.ts:1138:9)

 ERR Cannot register remote filesystem provider. Error while fetching remote environment. Time limit reached

log.ts:441 ERR CodeExpectedError: ENOPRO: No file system provider found for resource 'vscode-remote:/root/.local/share/code-server/User' at s.j (http://52.201.175.188:8080/stable-abd2f3db4bdb28f9e95536dfa84d8479f1eb312d/static/out/vs/workbench/workbench.web.main.js:630:11014) at async s.W (http://52.201.175.188:8080/stable-abd2f3db4bdb28f9e95536dfa84d8479f1eb312d/static/out/vs/workbench/workbench.web.main.js:630:21621) at async http://52.201.175.188:8080/stable-abd2f3db4bdb28f9e95536dfa84d8479f1eb312d/static/out/vs/workbench/workbench.web.main.js:630:21516

Expected

It show not show any error at the console

Actual

Instead its showing errors

Logs

ERR [remote-connection][Management ][42eba…][initial][WebSocket(52.201.175.188:8080)] the handshake timed out. Error: log.ts:441 ERR Error: Time limit reached at u.i (remoteAgentConnection.ts:148:20) at u.h (remoteAgentConnection.ts:144:28) at o.value (remoteAgentConnection.ts:126:86) at u.w (event.ts:1107:13) at u.fire (event.ts:1138:9) at P.cancel (cancellation.ts:69:19) at E.cancel (cancellation.ts:124:16) at o.value (remoteAgentConnection.ts:99:41) at u.w (event.ts:1107:13) at u.fire (event.ts:1138:9)

 ERR Cannot register remote filesystem provider. Error while fetching remote environment. Time limit reached

log.ts:441 ERR CodeExpectedError: ENOPRO: No file system provider found for resource 'vscode-remote:/root/.local/share/code-server/User' at s.j (http://52.201.175.188:8080/stable-abd2f3db4bdb28f9e95536dfa84d8479f1eb312d/static/out/vs/workbench/workbench.web.main.js:630:11014) at async s.W (http://52.201.175.188:8080/stable-abd2f3db4bdb28f9e95536dfa84d8479f1eb312d/static/out/vs/workbench/workbench.web.main.js:630:21621) at async http://52.201.175.188:8080/stable-abd2f3db4bdb28f9e95536dfa84d8479f1eb312d/static/out/vs/workbench/workbench.web.main.js:630:21516

Screenshot/Video

No response

Does this issue happen in VS Code or GitHub Codespaces?

Are you accessing code-server over HTTPS?

Notes

I'm using sure why I am using HTTPS. * is required.

I've been using only http ever since.

code-asher commented 1 year ago

We should probably rename that checkbox in the bug template, HTTPS is not required but rather a secure context is. So localhost for example would be fine. Without a secure context certain browser features are disabled, and people will report them as bugs even though they are not, which is why we have the checkbox.

As for your bug, it sounds unlikely that this would be caused be an insecure context, but I suppose I would not rule it out entirely as sometimes browsers can block web sockets in insecure contexts (I have never seen a timeout though). Does your browser treat this address as secure?

Do you have logs from code-server's stdout as well? I think I see only browser logs here.

If I understand correctly, code-server is running on a remote macOS system and you access it via an IP address? Is it something you can reproduce by running code-server locally?

vandolphreyes commented 1 year ago

Thank you for your response @code-asher

Ah yes, apologies forgot the add it.

when running anywhere in my macOs Sonoma, safari, chrome, firefox and even private modes. (fake IP) http://12.231.135.138:8080/login?folder=/home/project_name/public_html&to=

This popups and I'm getting this.

[23:55:26] Error: invalid code lengths set
    at Zlib.zlibOnError [as onerror] (node:zlib:189:17) {
  errno: -3,
  code: 'Z_DATA_ERROR'
}
Error: invalid code lengths set
    at Zlib.zlibOnError [as onerror] (node:zlib:189:17) {
  errno: -3,
  code: 'Z_DATA_ERROR'
}
[23:55:37] Error: invalid code lengths set
    at Zlib.zlibOnError [as onerror] (node:zlib:189:17) {
  errno: -3,
  code: 'Z_DATA_ERROR'
}
File not found: /usr/lib/code-server/lib/vscode/extensions/git-base/dist/browser/extension.js
File not found: /usr/lib/code-server/lib/vscode/extensions/merge-conflict/dist/browser/mergeConflictMain.js
Error: invalid code lengths set
    at Zlib.zlibOnError [as onerror] (node:zlib:189:17) {
  errno: -3,
  code: 'Z_DATA_ERROR'
}

Basically we used codeserver for very long time already and the teams used MacOs Ventura and older and other guys used windows.

After I saw the update for Sonoma few days back, I decided to install it. But right after, I can't work on codeserver anymore. I confirmed my the other teams that code-server is still working on their side and not issue at all. I tried reinstall my MacOs Sonoma but still the same.

I want to reinstall it and enable HTTPS but I can't as the other teams is still using the codeserver, I don't want to interrupt them. Besides, I want to solve the issue anyways as we have multiple server with codeserver and I can't reinstall them all.

Thank you

code-asher commented 1 year ago

Interesting, thank you for the additional information. I am not sure what could cause that...since you reported it works in Codespaces it does suggest this is a code-server issue, but all the zlib usage VS Code so I am not sure where the problem would be. I will see if I can track down a macOS machine with Sonoma to test.

vandolphreyes commented 1 year ago

Thank you!

Also I tried installing code-server in HTTPs but the issue is still the same.

Hoping for a solution soon as few on the team is stuck now. Thank you

vandolphreyes commented 1 year ago

@code-asher just letting you know code-server are now back running into our Sonoma Machines, not sure what happen but it works now and we haven't updated anything in code-server.

Thank you

code-asher commented 1 year ago

Great news, as long as it does not mysteriously come back! :laughing:

LeoBlackCat commented 8 months ago

Hey, I have the same issue with the latest version of code-server (4.22.0 with Code 1.87.0, also tried previous versions) installed on Ubuntu 20.04.4 LTS server with the latest macOS Sonoma 14.3.1. Surprisingly it works when I use my iPhone as a client! Tried SSH port forwarding access and also unsecured HTTP with password auth, no difference. It seems to be that the problem is with websocket compression related to last macOS?

File not found: /usr/lib/code-server/lib/vscode/out/vsda_bg.wasm
Error: invalid stored block lengths
    at Zlib.zlibOnError [as onerror] (node:zlib:189:17) {
  errno: -3,
  code: 'Z_DATA_ERROR'
}
[06:02:04] Error: invalid stored block lengths
    at Zlib.zlibOnError [as onerror] (node:zlib:189:17) {
  errno: -3,
  code: 'Z_DATA_ERROR'
}
File not found: /usr/lib/code-server/lib/vscode/out/vsda.js
Error: invalid code lengths set
    at Zlib.zlibOnError [as onerror] (node:zlib:189:17) {
  errno: -3,
  code: 'Z_DATA_ERROR'
}
[06:02:14] Error: invalid code lengths set
    at Zlib.zlibOnError [as onerror] (node:zlib:189:17) {
  errno: -3,
  code: 'Z_DATA_ERROR'
}
code-asher commented 8 months ago

Interesting, is it only through Safari or any browser? Do you see similar issues with GitHub Codespaces?

code-asher commented 4 months ago

Closing as stale but feel free to comment if you come back to this.