-
Notifications
You must be signed in to change notification settings - Fork 331
Integrated terminal fails with native exception / forkpty(3) failed #4233
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
Hi, I encountered the same problem but suddenly the error was eliminated from nowhere and the terminal can run successfully. It's kind of weird, so I guess the network stability might matter a lot in this case. Also What I did: However, before I did any other further steps, the problem disappeared. So I highly suspect this "forkpty(3) failed" error is closely associated with the internet connection. Just have a try later may help. Good luck :) |
It's something related to that particular machine type. Other "pure" linux machines in the same lab (i.e. network connectivity) work fine - there's something specific to this distribution or setup, but I don't know what other debugging tools (either on the vscode or linux host side) to look at. |
I'm having this same problem, same VSCode version and OS, my remote host is on Ubuntu 18.04. It doesn't seem to have nothing to do with my network connection either. |
I managed to fix it by connecting via SSH to the remote host and manually deleting the ~/.vscode folder, then i set up the connection again on VS Code and it worked fine. |
Steps to reproduce:
@Josersanvil I tried your fix and unfortunately it did not work for me. |
FIX |
I had similar issue while connecting to a linux host via ssh -- in a chroot environment. [forkpty(3)] failed. I found this: https://unix.stackexchange.com/questions/390997/ptys-not-working-in-chroot-under-lxc. The solution for me was to get pty working within the chroot [ref: https://man7.org/linux/man-pages/man7/pty.7.html] - by creating /chroot/dev device files [ref: https://tldp.org/LDP/Linux-Filesystem-Hierarchy/html/dev.html]. This involved recreating /dev/ptmx and /dev/pts/* (refer to actual (non-chroot) /dev folder). Guide: https://www.lifewire.com/linux-system-administrators-guide-2203428. Regarding permissions: https://lwn.net/Articles/684005/ |
This is where that exception comes from: https://github.com/microsoft/node-pty/blob/87990b27a51423efcd6aa55f32a7b02a972201a7/src/unix/pty.cc#L717 I don't think there's anything I can do on my side here, it's either:
|
I have the exact same issue. So far I have tested disabling the TypeScript extension (there were related errors, due to not being able to fork), which didn't help. I even did a clean reinstall of Ubuntu 18.04 Server, with just a user added and ssh configured, nothing else. It also affects more than just VSCode. It renders the server unable to fork at all at times, so i can not use ssh from another terminal to connect to it either. I can easily reproduce the error, can I provide additional information to solve this issue? |
I have been having the same problem on a Linux 4.19.0-14-amd64 #1 SMP Debian 4.19.171-2 (2021-01-30) x86_64 GNU/Linux. Turned out there were wrong /dev/pts permission issues and this was solved by chmoding a+x. Anyways, debugging was tedious for this one as the ERRNO for forkpty wasn't displayed. |
A colleague was able to track this down (finally). On the target machine in question the permissions for
|
I have the exact same problem with VSC Version 1.55.2 and Remote SSH version 0.65.4 when connecting from windows 10 to a virtual Centos 7 (Linux 3.10.0-1127.19.1.el7.x86_64) hosted by GCP, using IdentityFile authentication. |
I'm getting this same error. |
I'm getting this same error. |
1.52.1
Windows 10 Professional
Linux node0_RP1_CPU0 4.8.28-WR9.0.0.20_cgl
SSH
Steps to Reproduce:
The terminal process failed to launch: A native exception occurred during launch (forkpty(3) failed.).
Details:
As far as I can tell, the only impacted component is the terminal. The remote filesystem can be seen, files can be edited, etc. I feel as if there must be something unique about this remote, but I can't find any other meaningful debugging or logging output. Would appreciate thoughts on what else to look at / report...
The text was updated successfully, but these errors were encountered: