code-server
code-server copied to clipboard
[Bug]: Terminal closes immediately after opening it since v4.16.1
Is there an existing issue for this?
- [X] I have searched the existing issues
OS/Web Information
- Web Browser: X
- Local OS:
- Remote OS: Centos7 & Ubuntu
- Remote Architecture: x86-64
-
code-server --version
: anything > 4.16.1
Steps to Reproduce
- open code-server on the web
- Open a folder
- Open a folder again in a new tab seems to help
- Begin using the terminals, run processses etc...
- Suddently, when you try to open a terminal, it'll automatically close. For some reason, trying to open 20 terminals or so at the same time makes it so 2-3 survive.
- killing code-server and opening it again restores functionality
The error that most probably is the culprit: Error [CodeExpectedError]: Could not find pty on pty host
It also occurs with openvscode-server, and I have the same issue with different computes and people, That's the reason I keep using the older v4.16.1 which does not have this issue.
Expected
The terminal opens.
Actual
The terminal is killed
Logs
Error [CodeExpectedError]: Could not find pty on pty host
Screenshot/Video
No response
Does this issue happen in VS Code or GitHub Codespaces?
- [ ] I tested this in native VS Code.
- [ ] This does not happen in native VS Code.
- [ ] I tested this in GitHub Codespaces.
- [ ] This does not happen in GitHub Codespaces.
Are you accessing code-server over a secure context?
- [ ] I am using a secure context.
Notes
No response
In 4.17.0 the minimum glibc version was raised and code-server no longer works in CentOS 7, so that could be why. If you check code-server's logs you might see something about glibc.
Although, you say it does work if you open enough or restart code-server so that must not be it. I am not sure, in that case. Do you have some way for me to reproduce? A Dockerfile maybe? If not, check code-server's output and see if anything shows up there.
Although, you say it does work if you open enough or restart code-server so that must not be it. I am not sure, in that case. Do you have some way for me to reproduce? A Dockerfile maybe? If not, check code-server's output and see if anything shows up there.
The glibc problem was already taken care of by compiling node + some dependencies and no errors related to that are present.
I was wondering if node-pty had a regression, since the error log more plausible is the one I put on the first message... I'll try to create a minimum example
Closing as stale but feel free to comment if you come up with a reproduction.
The issue is not fully resolved. Previously, the terminal would crash on the 5th or 6th instance of the same session. Now, it doesn't seem to crash at all during the first session, regardless of the number of instances. However, it crashes when starting a new (second) session after closing all instances of the first session.
Error:
Aug 02 07:38:25 a b: [07:38:25] Error [CodeExpectedError]: Could not find pty on pty host
Aug 02 07:38:25 a b: at D.U (../code-server/lib/vscode/out/vs/platform/terminal/node/ptyHostMain.js:45:32461)
Aug 02 07:38:25 a b: at D.updateIcon (../code-server/lib/vscode/out/vs/platform/terminal/node/ptyHostMain.js:45:27673)
Aug 02 07:38:25 a b: at j.
Is this on 4.91.1? I experimented by opening six instances (using the +
), closing them all (using the trash icon), then opening a new one (using Terminal > New Terminal) but it seems to work.
This was on the version:
code-server: v4.23.1, Code: 1.88.1
I installed it using conda from the conda-forge channel.
Interesting, possibly this was fixed upstream then. Let me know if it still happens for you with 4.91.1.