Open
Labels
bugSomething isn't workingSomething isn't workingtriageThis issue needs to be triaged by a maintainerThis issue needs to be triaged by a maintainer
Description
Is there an existing issue for this?
- I have searched the existing issues
OS/Web Information
- Web Browser: Chrome
- Local OS: Debian testing
- Remote OS: Debian testing
- Remote Architecture: amd64
code-server --version: 4.92.2 de65bfc with Code 1.92.2
Steps to Reproduce
- Open code-server
- Open an existing workspace
- Open a file from CLI (code-server -r ...)
Expected
code-server opens the specified file in one of the open windows.
Actual
Some cases it works, mostly with fresh sessions, then after a while it breaks and I get only a error Unexpected status code: 500. I just realised that restarting the code-server instance and reloading the client window fixes the problem.
Logs
As an intermittent issue I need to work a bit on the logs, I set verbose now.Screenshot/Video
No response
Does this bug reproduce in native VS Code?
I did not test native VS Code
Does this bug reproduce in GitHub Codespaces?
I did not test GitHub Codespaces
Are you accessing code-server over a secure context?
- I am using a secure context.
Notes
No response
Reacted by Roko Kovač
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingtriageThis issue needs to be triaged by a maintainerThis issue needs to be triaged by a maintainer
Activity
kova98 commentedon Oct 26, 2024
Have you resolved this? I have the same issue, nothing in logs either (verbose mode).
code-asher commentedon Oct 29, 2024
In the integrated terminal, VS Code usually provides its own
code-serverbinary. Is that the one being ran, or is it the one we ship? What doeswhich code-servershow?Either way, it makes a POST request against the VS Code socket stored in the
VSCODE_IPC_HOOK_CLIenvironment variable. I am not sure why this would error though, unless the socket somehow went away?krisek commentedon Oct 29, 2024
Nope, still occurs from time to time.
I always use separate terminal window,
/usr/bin/code-serveris used.This is interesting as
VSCODE_IPC_HOOK_CLIis not defined in the terminal outside code-server, while it is there in the built in terminal.And here comes fun:
ie. it opens with
VSCODE_IPC_HOOK_CLIset. Interestingly there are 36 sockets in /run/user in my case, I simply chosen the newest.🤔 I can accept this as a solution, I just need to add to my rc the above and we are good.
code-asher commentedon Oct 29, 2024
Ahhhh I see, yup if you use it outside of the integrated terminal and there is no
VSCODE_IPC_HOOK_CLIvariable set, then it will instead use our own socket which defaults tocode-server-ipc.sockin the user data directory (by default~/.local/share/code-server).There could definitely be a bug here. Or maybe if there was a second code-server instance spun up, it would take over that socket, and then if closed it would no longer be handling it, and there is no way for the older instance to take over again. Just one way this might happen, at least. We might need logic to gracefully handle multiple code-server instances, if this is what is happening.
Setting
VSCODE_IPC_HOOK_CLIseems like a reasonable workaround.