vscode-cpptools icon indicating copy to clipboard operation
vscode-cpptools copied to clipboard

Error: Pending response rejected since connection got disposed

Open tonyjansan opened this issue 2 years ago • 13 comments

Environment

  • OS and Version: MacOS 13.5.1
  • VS Code Version: 1.82.2
  • C/C++ Extension Version: v1.17.5
  • If using SSH remote, specify OS of remote machine: -

Bug Summary and Steps to Reproduce

Bug Summary: Open any C/C++ project, IntelliSense does not work. After a long while, error dialog display 'Error: Pending response rejected since connection got disposed'.

Steps to reproduce:

  1. Open any C/C++ project in VS Code
  2. IntelliSense does not work
  3. See 'Error: Pending response rejected since connection got disposed'

Expected behavior: IntelliSense works fine and don't see any error.

Configuration and Logs

{
    "configurations": [
        {
            "name": "Mac",
            "includePath": [
                "${workspaceFolder}/**"
            ],
            "defines": [],
            "macFrameworkPath": [
                "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks"
            ],
            "compilerPath": "/usr/bin/clang",
            "cStandard": "c17",
            "cppStandard": "c++17",
            "intelliSenseMode": "macos-clang-x64",
            "configurationProvider": "ms-vscode.makefile-tools",
            "compileCommands": "/Users/xxx/projects/mendel-sdk/build/compile_commands.json"
        }
    ],
    "version": 4
}

Other Extensions

No response

Additional context

No response

tonyjansan avatar Sep 21 '23 08:09 tonyjansan

@tonyjansan Could you provide the language server logs (see https://code.visualstudio.com/docs/cpp/enable-logging-cpp#_enable-logging-for-the-language-server). Does this issue also occur for a simple "hello world" project?

Update:

@tonyjansan Could you check the ~/.vscode/extensions folder and look for the extensions folder that includes ms-vscode.cpptools-1.17.5 in its name. From the vscode.cpptools folder, go to the folder bin, verify the executables cpptools and cpptools-srv exitis, and from the terminal type file cpptools to check the architecture?

michelleangela avatar Sep 22 '23 18:09 michelleangela

Have the same problem. It started after update of VS Code done few days ago.

Environment OS and Version: Ubuntu 20.4 VS Code Version: 1.82.2 C/C++ Extension Version: v1.17.5

LOGs: loggingLevel: Debug cpptools version (TypeScript): 1.17.5 cpptools version (native): 1.17.5.0 Autocomplete is enabled. Error squiggles are enabled if all header dependencies are resolved. Hover is enabled. IntelliSense Engine = enabled. LSP: cpptools/didChangeCppProperties (id: 1) LSP: cpptools/queryCompilerDefaults (id: 2) LSP: Message ignored due to no registered handler: $/setTrace Code browsing service initialized Querying compiler for default C++ language standard using command line: /usr/bin/gcc -x c++ -E -dM /dev/null Detected language standard version: gnu++14 Querying compiler's default target using command line: "/usr/bin/gcc" -dumpmachine Compiler returned default target value: x86_64-linux-gnu Compiler query command line: /usr/bin/gcc -std=c++17 -m64 -Wp,-v -E -dM -x c++ /dev/null Attempting to get defaults from C++ compiler in "compilerPath" property: '/usr/bin/gcc' Compiler query command line: /usr/bin/gcc -std=c11 -m64 -Wp,-v -E -dM -x c /dev/null Attempting to get defaults from C compiler in "compilerPath" property: '/usr/bin/gcc' LSP: Message ignored due to no registered handler: $/setTrace LSP: Message ignored due to no registered handler: $/setTrace Custom configuration provider 'CMake Tools' registered LSP: Message ignored due to no registered handler: $/setTrace cpptools version (TypeScript): 1.17.5 cpptools version (native): 1.17.5.0 Autocomplete is enabled. Error squiggles are enabled if all header dependencies are resolved. Hover is enabled. IntelliSense Engine = enabled. LSP: cpptools/didChangeCppProperties (id: 1) LSP: cpptools/queryCompilerDefaults (id: 2) Code browsing service initialized Querying compiler for default C++ language standard using command line: /usr/bin/gcc -x c++ -E -dM /dev/null Detected language standard version: gnu++14 Querying compiler's default target using command line: "/usr/bin/gcc" -dumpmachine Compiler returned default target value: x86_64-linux-gnu Compiler query command line: /usr/bin/gcc -std=c++17 -m64 -Wp,-v -E -dM -x c++ /dev/null Attempting to get defaults from C++ compiler in "compilerPath" property: '/usr/bin/gcc' Compiler query command line: /usr/bin/gcc -std=c11 -m64 -Wp,-v -E -dM -x c /dev/null Attempting to get defaults from C compiler in "compilerPath" property: '/usr/bin/gcc'

MichalGuzieniuk avatar Sep 26 '23 14:09 MichalGuzieniuk

@MichalGuzieniuk It looks like the language server process was able to run based on your logs. Does the issue still repro whenever you launch VS Code? It could be an installation issue of the extension when VS Code was updated.

michelleangela avatar Sep 27 '23 19:09 michelleangela

Problem is reproducible. On each CS Code run, I got following message [Error - 6:23:33 PM] The language server crashed. Restarting...

MichalGuzieniuk avatar Oct 18 '23 16:10 MichalGuzieniuk

I had the same issue, and I found someone on Reddit that posted this simple fix that worked. Update. I have now resolved this issue. Had to edit my PSModulePath environment variable and move the entry for Powershell 7 modules above the Windows Powershell entry. credit goes to Shidojin on r/vscode

pamlang avatar Oct 29 '23 23:10 pamlang

Same problem here!

"Unable to start the C/C++ language server. IntelliSense features will be disabled. Error: Error: Pending response rejected since connection got disposed"

nickjoh-giron avatar Nov 27 '23 09:11 nickjoh-giron

Re-assigning to @sean-mcmanus or @Colengms.

michelleangela avatar Nov 27 '23 22:11 michelleangela

Version: 1.84.2 (system setup) Commit: 1a5daa3a0231a0fbba4f14db7ec463cf99d7768e Date: 2023-11-09T10:51:52.184Z Electron: 25.9.2 ElectronBuildId: 24603566 Chromium: 114.0.5735.289 Node.js: 18.15.0 V8: 11.4.183.29-electron.0 OS: Windows_NT x64 10.0.19045

image

I have uninstalled all other plugins but C/C++ Extension Pack, it still not working. image

SimonLeeGit avatar Dec 01 '23 12:12 SimonLeeGit

I also have this problem. I'm happy to help debug.

ntadej avatar Dec 06 '23 10:12 ntadej

I also have this problem. I'm happy to help debug.

Good point! I'm also happy to help debug this!

nickjoh-giron avatar Dec 07 '23 10:12 nickjoh-giron

I'm having this problem on both the 1.18.5 release version and the 1.19.1 prerelease version with the exact same call stack posted here: https://github.com/microsoft/vscode-cpptools/issues/11451#issuecomment-1836031464

bellicapax avatar Dec 08 '23 22:12 bellicapax

Can be solved by opening a powershell instance as admin and inputting: Enable-PSRemoting -Force

Jakeclearwater avatar Feb 01 '24 00:02 Jakeclearwater

Happens to me as well, both Insiders and normal build. OSX 13.6.4.

georgysh avatar Feb 16 '24 02:02 georgysh

I get the same problem. OS: 11.2.3 CPU: Intel Core i7 VSCode: 1.91.1 (Universal) c/c++ extension: v1.21.4 @michelleangela

file cpptools*
cpptools:         Mach-O 64-bit executable x86_64
cpptools-srv:     Mach-O 64-bit executable x86_64
cpptools-wordexp: Mach-O 64-bit executable x86_64
./cpptools -h
zsh: segmentation fault  ./cpptools -h

justin-z0 avatar Jul 27 '24 03:07 justin-z0