-
Notifications
You must be signed in to change notification settings - Fork 29.9k
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
Connection to terminal's pty host process is becoming unresponsive #130320
Comments
@xianghongai that issue should be fixed already. |
I got this earlier all the time and then I deleted everything and now I get it when I try to download python extension back. Tried older versions of both python and vscode and vscode insiders but cant find a fix. |
I confirm this error "The connection to the terminal's pty host process is unresponsive, the terminals may stop working." since I've updated my Windows 7 installation to latest version. I used to have a very old Windows 7 x64 from 2014 without any updates installed - all versions of VSCode up to 1.67 were running with absolutely no problems related to the terminal. Then, after I updated Windows 7 to latest available as of June 2022, the same VSCode I had installed started to throw this error, with the terminal (Command Prompt / CMD) disconnecting frequently (perhaps every 10-20 minutes or so). I've even disabled the ConPTY to fall back to Winpty, but the exact same issue occurs, it doesn't help at all. I hope this report helps the devs in finding out the underlying cause of the error and perhaps a fix.... |
@meganrogge I'm trying to find a solution to this annoying issue. Can you point me in the right direction, please? |
@meganrogge I have the exact same issue with the latest VSCode 1.68. Is there something I can tryor do? Could you point me in the right direction so we can solve this? |
@lorand-horvath you should update windows, Windows 7 was EOL in 2020 https://www.microsoft.com/en-us/windows/windows-7-end-of-life-support-information#:~:text=After%2010%20years%2C%20support%20for,ended%20on%20January%2014%2C%202020. Also you never got to use conpty as it's only in the later versions of Windows 10. |
@meganrogge @Tyriar I'm still getting this error, but since last Friday June 24th (I'm using Insiders) the terminal recovers after about 1-2 minutes, which is very interesting. I'm not sure what has changed (for the better!), but after about a minute the connection to the terminal is restored automatically and I can continue working in it, without losing any previous information. Before June 24 the terminal never recovered or restored connection and I had to kill it and open another instance and start all over again. The restored connection notification is being logged to the devtools console as
Is there some kind of timeout involved here? I've read about a 10 second timeout, but I'm not sure where I can access and hopefully increase the value of? I've noticed this error occurs mostly if the terminal and/or VSCode itself is not being focused on for several minutes and I think it may be related to the occlusion tracker kicking in (just a thought). |
Here are the timeouts related to the pty host heartbeat/responsiveness: vscode/src/vs/platform/terminal/common/terminal.ts Lines 368 to 390 in f6786c8
You cannot customize them currently, if there's no communication between the 2 processes in 10+ seconds then there is something very wrong, allowing configuration here wouldn't be a great workaround. |
@Tyriar That's interesting! Any reason why there's no communication between the app and the terminal processes for more than 10 seconds when VSCode is not focused on? In the latest Insiders from today I've noticed that the connection loss ONLY occurs if I'm not focused on/working in VSCode. So if I work in another program (let's say Postman or a browser) and have VSCode open on my other screen with its terminal open with a Node.js app running in it, it will lose connection after a while (it takes quite a while, maybe 10-20 minutes). Is there any chance to debug/fix this? The possibility of customizing the pty host heartbeat parameters (even if hidden, for dev purposes only) would certainly help! I have a feeling that waiting just a bit more (i.e. 12-15 instead of 10 seconds) before notifying would maintain the connection without issues for long periods of time, even if VSCode is not actively being focused on. Alternatively, do you know of any other, more general setting in VSCode (perhaps Electron-related) that would turn off the delay in inter-process communication? I recon there must be some kind of delay or slumber mode kicking in when the window gets un-focused. I'm thinking of something like starting VSCode with the native occlusion flag disabled, i.e. Edit: I see there's another parameter |
@Tyriar I've been investigating by increasing the Do you think this is a proper way of testing? I'm not sure how to go about otherwise... |
This is unbelievably frustrating... After a clean install of latest Insiders the warning pops up without even starting the terminal in the first place! I have no extensions installed, nothing. It's clean as possible. What is going on? Anyone else struggling with this? |
Having this same issue in macOS as of today. Per @meganrogge recommendation on #156668, I set |
Thanks for your patience @drenze-athene it's hard for us to investigate this kind of issue when we cannot reproduce it. Did you start seeing it after a specific version of VS Code? You could try reverting to an older one |
I understand, not a problem. Right now I'm on 1.69.2, just upgraded from a 1.5x.x release a few days ago (1.57.x, I think). I was experiencing it then, which is why I upgraded. My issue with knowing what version I'm using is that I'm in an Enterprise environment and upgrades are centrally managed, so I don't usually upgrade myself unless I'm experiencing a specific issue, such as this. AFAIK I'm the only one in our environment who is experiencing this issue right now, so I'm checking to see what version others are using and may downgrade, if appropriate. |
In my case, this appears to be an unrelated issue, which causes the same symptoms in VSCode. Our Service Desk fixed another issue for me this morning, which caused general slowness, and this issue appears to be resolved as well. |
Thanks, Megan. I'm travelling and don't have time for playing with Insiders ATM. Will wait for next release and use separate tunnel for the time being. |
Thank you. Will the fixes be implemented in the near future? |
@DeleteMetaInf please see above at #130320 (comment) |
I am on Red Hat Linux Enterprise. Same issue on 1.79.2. I solved with downgrade method (1.78.2) |
I also have this problem,it 's so hard for me.I'dont kown why.extensive or use python programm? |
Hey! Sorry I unpinned the issue by accident |
Would like to add that I was having this problem with v 1.79.2 on Fedora Linux with Gnome desktop. I installed the insiders edition v1.80.0 and I no longer have this issue for what it's worth. I would get "The connection to the terminal's pty host process is unresponsive" and after about 2 minutes, the terminal would finally show up. Comes up instantly in 1.80.0 |
This message comes up on 1.79.2 startup but disappears after a short while. |
Why is this closed, the problem still exists. |
It's fixed in 1.80+ so I guess there's no reason to keep it open. |
Sorry about the hassle all, this is fixed in v1.80.0 which we're targeting to release Thursday the 6th ~11am PST |
Issue Type: Bug
After updating to latest VSCode stable (1.59) I started encountering an error when running tasks (The connection to the terminal's pty host process is unresponsive, the terminals may stop working.). This used to work fine on 1.58.2 and I confirmed that it is broken on latest insider build too (1.60.0)
I have a bunch of VSCode tasks for 'orchestrating' local docker setup, so I can run some commands to run builds and generate TypeScript clients directly from the UI. When I run tasks without any "dependsOn" tasks they run fine. If one task depends on single other task, it also runs fine. I have problems when single task have multiple entries in "dependsOn" section - it usually works fine for the first time after I open VSCode but then the issue happens and I have to fully restart VSCode to make it work again.
VS Code version: Code - Insiders 1.60.0-insider (49af1cb, 2021-08-06T06:41:50.275Z)
OS version: Windows_NT x64 10.0.19042
Restricted Mode: No
System Info
gpu_compositing: enabled
multiple_raster_threads: enabled_on
oop_rasterization: enabled
opengl: enabled_on
rasterization: enabled
skia_renderer: enabled_on
video_decode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
Extensions (1)
A/B Experiments
Tasks hierarchy
The text was updated successfully, but these errors were encountered: