Skip to content

PlatformIO error Connection to server got closed. Server will not be restarted #6126

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

Closed
t0maszduda opened this issue Sep 13, 2020 · 18 comments
Closed
Assignees
Labels
bug embedded investigate: repro This issue's repro steps needs to be investigated/confirmed Language Service more info needed The issue report is not actionable in its current state

Comments

@t0maszduda
Copy link

after crash I have "Connection to server got closed. Server will not be restarted"

Zrzut ekranu 2020-09-13 o 09 39 52
Zrzut ekranu 2020-09-13 o 09 41 26
Zrzut ekranu 2020-09-13 o 09 41 36
Zrzut ekranu 2020-09-13 o 09 41 48

@t0maszduda t0maszduda changed the title PlatformIO crash while opening file PlatformIO error Connection to server got closed. Server will not be restarted Sep 13, 2020
@sean-mcmanus sean-mcmanus self-assigned this Sep 14, 2020
@sean-mcmanus
Copy link
Contributor

sean-mcmanus commented Sep 14, 2020

I'm not able to repro. Does it repro with 1.0 still? Can you provide more repro details? Do you have a repro project you can provide?

Your first screenshot appears to show that cpptools crashed before the 1st screenshot. Were there other repro steps leading up to that?

@Veoramid
Copy link

I have the same problem. I am installing the program for the first time. I want to try, but the build of the project does not work.

@t0maszduda
Copy link
Author

I'm not able to repro. I don't remember how did this happen but it was as first time as @Veoramid

@t0maszduda
Copy link
Author

Today I've had one "Connection to server got closed. Server will not be restarted"

@bobbrow
Copy link
Member

bobbrow commented Sep 16, 2020

Just FYI, this is a message that a VS Code dependency of ours prints out when the extension process crashes. The message is incorrect because we manage the restart of the extension instead of letting VS Code do it. The message says "Server will not be restarted" because we tell VS Code not to do it for us and that's what they print out as a result.

Unless you see the message that says "The language server crashed 5 times in the last 3 minutes. It will not be restarted." the extension should be running. Is IntelliSense (e.g. auto-complete, quick info tooltips, etc) working for you, or are you saying that the extension is broken?

@EMHacker-alt
Copy link

I have the same problem. "[Error - 4:01:28 PM] Connection to server got closed. Server will not be restarted." I cannot build project, download or start the serial monitor. Please help !!!

@EMHacker-alt
Copy link

IntelliSense isn't working at all

@Veoramid
Copy link

This is the first time I installed the program. I pressed "next", "next", "next" ...
When it failed, I uninstalled the program and installed it again. Again it didn't work out.
Then I noticed that C ++ was missing. After that, I installed the earliest version 0.22 - the program worked for me and I launched platformio for esp8266.
I tried updating C ++ but nothing worked. Is it because I removed Phyton?

@sean-mcmanus
Copy link
Contributor

sean-mcmanus commented Sep 17, 2020

Is anyone able to attach a debugger to the cpptools process before it crashes to get a call stack? https://github.com/microsoft/vscode-cpptools/wiki/Attaching-debugger-to-cpptools-or-cpptools%E2%80%90srv

Or does anyone have complete repro steps?

@Veoramid
Copy link

It might be interesting:
If I downgrade C / C ++ to 0.25 the error goes away. Since version 0.26 - the error appears
image
image

@sean-mcmanus
Copy link
Contributor

@t0maszduda 0.25.1 is a year old. It's not obvious what change in 0.26.0 could have caused it (without a call stack of the crash).

@t0maszduda
Copy link
Author

@t0maszduda 0.25.1 is a year old. It's not obvious what change in 0.26.0 could have caused it (without a call stack of the crash).

It is for @Veoramid

@t0maszduda t0maszduda reopened this Sep 21, 2020
@sean-mcmanus sean-mcmanus added bug investigate: repro This issue's repro steps needs to be investigated/confirmed Language Service more info needed The issue report is not actionable in its current state labels Sep 22, 2020
@Mingming-Git
Copy link

Just FYI, this is a message that a VS Code dependency of ours prints out when the extension process crashes. The message is incorrect because we manage the restart of the extension instead of letting VS Code do it. The message says "Server will not be restarted" because we tell VS Code not to do it for us and that's what they print out as a result.

Unless you see the message that says "The language server crashed 5 times in the last 3 minutes. It will not be restarted." the extension should be running. Is IntelliSense (e.g. auto-complete, quick info tooltips, etc) working for you, or are you saying that the extension is broken?

I have the message"The language server crashed 5 times in the last 3 minutes. It will not be restarted. source: C/C++(Extension)". Is there anyway can I recover or use cpptools? Try to uninstall and install vscode or uninstall c/c++ extension are not useful.
I only want to recover my vscode envrionment, but It seems like no way, right?

@sean-mcmanus
Copy link
Contributor

@Mingming-Git What version of the C/C++ extension are you using? Are you able to attach a debugger to cpptools before it crashes to get a callstack? Or are you able to provide repro steps that I can follow? I haven't been able to repro this crash yet.

@Mingming-Git
Copy link

@sean-mcmanus I'm sorry, my vscode is offline. I can't transfer the log to here.

I use vscode ssh remote. It can't go to reference during i modify the code. And it just reports the problem when I restart vscode.
Just FYI: My code is git code, so I switch branch frequently. the problem are not exist when I just open local code by vscode.

The vscode version: 1.49.0(stable)
c/c++ intellisense extension: 1.0.0.

I change the c/c++ extension to 1.0.1(stable), now the problem is "The terminal process failed to launch: a native exception occured during launch(forkpty(3) failed)". This problem maybe affected by linux server,(create process limit?) I will check it.

thanks.

@Mingming-Git
Copy link

Mingming-Git commented Oct 30, 2020

@sean-mcmanus I'm sorry, my vscode is offline. I can't transfer the log to here.

I use vscode ssh remote. It can't go to reference during i modify the code. And it just reports the problem when I restart vscode.
Just FYI: My code is git code, so I switch branch frequently. the problem are not exist when I just open local code by vscode.

The vscode version: 1.49.0(stable)
c/c++ intellisense extension: 1.0.0.

I change the c/c++ extension to 1.0.1(stable), now the problem is "The terminal process failed to launch: a native exception occured during launch(forkpty(3) failed)". This problem maybe affected by linux server,(create process limit?) I will check it.

thanks.

@sean-mcmanus I check the linux server and vscode has many same process. The vscode and extensions works normal when I killed all of them.

To all, FYI:
The problem of "Connection to server got closed. Server will not be restarted": maybe you can update the extension to solve it(remember to delete extension in vscode server and user/.vscode).
The problem of "The terminal process failed to launch: a native exception occured during launch(forkpty(3) failed)": maybe you should check the server process and kill them all.

@github-actions
Copy link

Hey @sean-mcmanus, this issue might need further attention.

@t0maszduda, you can help us out by closing this issue if the problem no longer exists, or adding more information.

@t0maszduda
Copy link
Author

There is no problem with PlatformIO and VSCode now. I reinstalled VSCode and it helped.

@github-actions github-actions bot locked and limited conversation to collaborators Apr 18, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug embedded investigate: repro This issue's repro steps needs to be investigated/confirmed Language Service more info needed The issue report is not actionable in its current state
Projects
None yet
Development

No branches or pull requests

7 participants