Incorrect "Unable to process IntelliSense for file with same canonicalized path as existing file." message can appear when cpptools crashes
Kill cpptools on Mac or maybe other Linux OS's. It don't think it repros on Windows.
Bug: An incorrect warning appears:
LSP: (invoked) textDocument/didOpen: file:///Users/user/test1/test4.h Unable to process IntelliSense for file with same canonicalized path as existing file. uri: file:///Users/user/test1/test4.h, canonicalized path: /Users/user/test1/test4.h
Same problem when jump to the defination of a variable or function, and VScode will open a same file but with real path.
So i can see 2 same file in the editor finally...
@35mickey Your issue sounds different. @Colengms Did VS Code change their handling of files that canonicalize to the same location? Do we need to get rid of that check?
Here is more of details of my problem, hope it can provide you more informations:
- This is the file i open from file explorer, it's a relative path location
- When i jump to the defination of the variable(e.g. filter), VS Code will open the same file with real path location and i can find the tips.
I have the same situation. This prompt box pops up every time I jump, but it doesn't happen locally. This happens when I connect to the server using ssh.
Here is more of details of my problem, hope it can provide you more informations:
1. This is the file i open from file explorer, it's a relative path location  2. When i jump to the defination of the variable(e.g. filter), VS Code will open the same file with real path location and i can find the tips. 
I am having the exact same issue.
This problem will occur if you use a soft link path in OPENSSH-SERVER, open the same file with a relative path and a real path at the same time, and then use formatting. The temporary solution is to use the real path when OPENSSH-SERVER opens the folder
The same issue for me but not sure that it's related to soft links in my case. In my case, language server crashes, I see two popup messages ("Language server crashed" and "Unable to process IntelliSense") and in the Output window I see the following:
[Error - 3:18:08 PM] Server process exited with signal SIGILL.
[Error - 3:18:08 PM] The language server crashed. Restarting...
When this happened I was just typing code, I didn't click "Go to reference" or "Go to definition" or whatever. Notification:
Unable to process IntelliSense for file with same canonicalized path as existing file.
uri: file:///home/username/path/to/project/main.cpp,
canonicalized path: /home/username/path/to/project/main.cpp
Extension Host:
2024-06-23 15:18:08.394 [error] [ms-vscode.cpptools] provider FAILED
2024-06-23 15:18:08.394 [error] Error: Pending response rejected since connection got disposed
at Object.dispose (/home/username/.vscode/extensions/ms-vscode.cpptools-1.21.0-linux-x64/dist/src/main.js:92605:27)
at Object.dispose (/home/username/.vscode/extensions/ms-vscode.cpptools-1.21.0-linux-x64/dist/src/main.js:96434:35)
at LanguageClient.handleConnectionClosed (/home/username/.vscode/extensions/ms-vscode.cpptools-1.21.0-linux-x64/dist/src/main.js:96003:34)
at LanguageClient.handleConnectionClosed (/home/username/.vscode/extensions/ms-vscode.cpptools-1.21.0-linux-x64/dist/src/main.js:105009:22)
at closeHandler (/home/username/.vscode/extensions/ms-vscode.cpptools-1.21.0-linux-x64/dist/src/main.js:95990:18)
at CallbackList.invoke (/home/username/.vscode/extensions/ms-vscode.cpptools-1.21.0-linux-x64/dist/src/main.js:92737:39)
at Emitter.fire (/home/username/.vscode/extensions/ms-vscode.cpptools-1.21.0-linux-x64/dist/src/main.js:92799:36)
at closeHandler (/home/username/.vscode/extensions/ms-vscode.cpptools-1.21.0-linux-x64/dist/src/main.js:91752:26)
at CallbackList.invoke (/home/username/.vscode/extensions/ms-vscode.cpptools-1.21.0-linux-x64/dist/src/main.js:92737:39)
at Emitter.fire (/home/username/.vscode/extensions/ms-vscode.cpptools-1.21.0-linux-x64/dist/src/main.js:92799:36)
at StreamMessageWriter.fireClose (/home/username/.vscode/extensions/ms-vscode.cpptools-1.21.0-linux-x64/dist/src/main.js:93674:27)
at Socket.<anonymous> (/home/username/.vscode/extensions/ms-vscode.cpptools-1.21.0-linux-x64/dist/src/main.js:93706:42)
at Socket.emit (node:events:514:28)
at Pipe.<anonymous> (node:net:337:12)
2024-06-23 15:18:08.395 [error] [ms-vscode.cpptools] provider FAILED
2024-06-23 15:18:08.395 [error] Error: Pending response rejected since connection got disposed
at Object.dispose (/home/username/.vscode/extensions/ms-vscode.cpptools-1.21.0-linux-x64/dist/src/main.js:92605:27)
at Object.dispose (/home/username/.vscode/extensions/ms-vscode.cpptools-1.21.0-linux-x64/dist/src/main.js:96434:35)
at LanguageClient.handleConnectionClosed (/home/username/.vscode/extensions/ms-vscode.cpptools-1.21.0-linux-x64/dist/src/main.js:96003:34)
at LanguageClient.handleConnectionClosed (/home/username/.vscode/extensions/ms-vscode.cpptools-1.21.0-linux-x64/dist/src/main.js:105009:22)
at closeHandler (/home/username/.vscode/extensions/ms-vscode.cpptools-1.21.0-linux-x64/dist/src/main.js:95990:18)
at CallbackList.invoke (/home/username/.vscode/extensions/ms-vscode.cpptools-1.21.0-linux-x64/dist/src/main.js:92737:39)
at Emitter.fire (/home/username/.vscode/extensions/ms-vscode.cpptools-1.21.0-linux-x64/dist/src/main.js:92799:36)
at closeHandler (/home/username/.vscode/extensions/ms-vscode.cpptools-1.21.0-linux-x64/dist/src/main.js:91752:26)
at CallbackList.invoke (/home/username/.vscode/extensions/ms-vscode.cpptools-1.21.0-linux-x64/dist/src/main.js:92737:39)
at Emitter.fire (/home/username/.vscode/extensions/ms-vscode.cpptools-1.21.0-linux-x64/dist/src/main.js:92799:36)
at StreamMessageWriter.fireClose (/home/username/.vscode/extensions/ms-vscode.cpptools-1.21.0-linux-x64/dist/src/main.js:93674:27)
at Socket.<anonymous> (/home/username/.vscode/extensions/ms-vscode.cpptools-1.21.0-linux-x64/dist/src/main.js:93706:42)
at Socket.emit (node:events:514:28)
at Pipe.<anonymous> (node:net:337:12)
2024-06-23 15:18:08.395 [error] [ms-vscode.cpptools] provider FAILED
2024-06-23 15:18:08.395 [error] Error: Pending response rejected since connection got disposed
at Object.dispose (/home/username/.vscode/extensions/ms-vscode.cpptools-1.21.0-linux-x64/dist/src/main.js:92605:27)
at Object.dispose (/home/username/.vscode/extensions/ms-vscode.cpptools-1.21.0-linux-x64/dist/src/main.js:96434:35)
at LanguageClient.handleConnectionClosed (/home/username/.vscode/extensions/ms-vscode.cpptools-1.21.0-linux-x64/dist/src/main.js:96003:34)
at LanguageClient.handleConnectionClosed (/home/username/.vscode/extensions/ms-vscode.cpptools-1.21.0-linux-x64/dist/src/main.js:105009:22)
at closeHandler (/home/username/.vscode/extensions/ms-vscode.cpptools-1.21.0-linux-x64/dist/src/main.js:95990:18)
at CallbackList.invoke (/home/username/.vscode/extensions/ms-vscode.cpptools-1.21.0-linux-x64/dist/src/main.js:92737:39)
at Emitter.fire (/home/username/.vscode/extensions/ms-vscode.cpptools-1.21.0-linux-x64/dist/src/main.js:92799:36)
at closeHandler (/home/username/.vscode/extensions/ms-vscode.cpptools-1.21.0-linux-x64/dist/src/main.js:91752:26)
at CallbackList.invoke (/home/username/.vscode/extensions/ms-vscode.cpptools-1.21.0-linux-x64/dist/src/main.js:92737:39)
at Emitter.fire (/home/username/.vscode/extensions/ms-vscode.cpptools-1.21.0-linux-x64/dist/src/main.js:92799:36)
at StreamMessageWriter.fireClose (/home/username/.vscode/extensions/ms-vscode.cpptools-1.21.0-linux-x64/dist/src/main.js:93674:27)
at Socket.<anonymous> (/home/username/.vscode/extensions/ms-vscode.cpptools-1.21.0-linux-x64/dist/src/main.js:93706:42)
at Socket.emit (node:events:514:28)
at Pipe.<anonymous> (node:net:337:12)
2024-06-23 15:18:08.432 [warning] DiagnosticCollection with name '/home/username/path/to/project' does already exist.
2024-06-23 15:18:08.624 [error] [ms-vscode.cpptools] provider FAILED
2024-06-23 15:18:08.624 [error] Error: Client is not running
at LanguageClient.sendRequest (/home/username/.vscode/extensions/ms-vscode.cpptools-1.21.0-linux-x64/dist/src/main.js:95185:35)
at DocumentSymbolProvider.provideDocumentSymbols (/home/username/.vscode/extensions/ms-vscode.cpptools-1.21.0-linux-x64/dist/src/main.js:73761:65)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async h.provideDocumentSymbols (/snap/code/x1/usr/share/code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:153:98122)
2024-06-23 15:18:08.624 [error] [ms-vscode.cpptools] provider FAILED
2024-06-23 15:18:08.624 [error] Error: Client is not running
at LanguageClient.sendRequest (/home/username/.vscode/extensions/ms-vscode.cpptools-1.21.0-linux-x64/dist/src/main.js:95185:35)
at DocumentSymbolProvider.provideDocumentSymbols (/home/username/.vscode/extensions/ms-vscode.cpptools-1.21.0-linux-x64/dist/src/main.js:73761:65)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async h.provideDocumentSymbols (/snap/code/x1/usr/share/code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:153:98122)
2024-06-23 15:18:08.625 [error] [ms-vscode.cpptools] provider FAILED
2024-06-23 15:18:08.625 [error] Error: Client is not running
at LanguageClient.sendRequest (/home/username/.vscode/extensions/ms-vscode.cpptools-1.21.0-linux-x64/dist/src/main.js:95185:35)
at CodeActionProvider.provideCodeActions (/home/username/.vscode/extensions/ms-vscode.cpptools-1.21.0-linux-x64/dist/src/main.js:73324:57)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async z.provideCodeActions (/snap/code/x1/usr/share/code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:153:103733)
2024-06-23 15:18:09.624 [error] Error: Client is not running
at LanguageClient.sendNotification (/home/username/.vscode/extensions/ms-vscode.cpptools-1.21.0-linux-x64/dist/src/main.js:95270:35)
at DefaultClient.selectionChanged (/home/username/.vscode/extensions/ms-vscode.cpptools-1.21.0-linux-x64/dist/src/main.js:76495:36)
at onDidChangeTextEditorSelection (/home/username/.vscode/extensions/ms-vscode.cpptools-1.21.0-linux-x64/dist/src/main.js:81140:34)
at /home/username/.vscode/extensions/ms-vscode.cpptools-1.21.0-linux-x64/dist/src/main.js:81011:123
at DefaultClient.dispatch (/home/username/.vscode/extensions/ms-vscode.cpptools-1.21.0-linux-x64/dist/src/main.js:76021:50)
2024-06-23 15:18:09.626 [error] Error: Client is not running
at LanguageClient.sendNotification (/home/username/.vscode/extensions/ms-vscode.cpptools-1.21.0-linux-x64/dist/src/main.js:95270:35)
at DefaultClient.selectionChanged (/home/username/.vscode/extensions/ms-vscode.cpptools-1.21.0-linux-x64/dist/src/main.js:76495:36)
at onDidChangeTextEditorSelection (/home/username/.vscode/extensions/ms-vscode.cpptools-1.21.0-linux-x64/dist/src/main.js:81140:34)
at /home/username/.vscode/extensions/ms-vscode.cpptools-1.21.0-linux-x64/dist/src/main.js:81011:123
at DefaultClient.dispatch (/home/username/.vscode/extensions/ms-vscode.cpptools-1.21.0-linux-x64/dist/src/main.js:76021:50)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
at runNextTicks (node:internal/process/task_queues:64:3)
at process.processImmediate (node:internal/timers:449:9)
Window:
2024-06-23 15:18:08.412 [error] Pending response rejected since connection got disposed: Error: Pending response rejected since connection got disposed
at Object.dispose (/home/username/.vscode/extensions/ms-vscode.cpptools-1.21.0-linux-x64/dist/src/main.js:92605:27)
at Object.dispose (/home/username/.vscode/extensions/ms-vscode.cpptools-1.21.0-linux-x64/dist/src/main.js:96434:35)
at LanguageClient.handleConnectionClosed (/home/username/.vscode/extensions/ms-vscode.cpptools-1.21.0-linux-x64/dist/src/main.js:96003:34)
at LanguageClient.handleConnectionClosed (/home/username/.vscode/extensions/ms-vscode.cpptools-1.21.0-linux-x64/dist/src/main.js:105009:22)
at closeHandler (/home/username/.vscode/extensions/ms-vscode.cpptools-1.21.0-linux-x64/dist/src/main.js:95990:18)
at CallbackList.invoke (/home/username/.vscode/extensions/ms-vscode.cpptools-1.21.0-linux-x64/dist/src/main.js:92737:39)
at Emitter.fire (/home/username/.vscode/extensions/ms-vscode.cpptools-1.21.0-linux-x64/dist/src/main.js:92799:36)
at closeHandler (/home/username/.vscode/extensions/ms-vscode.cpptools-1.21.0-linux-x64/dist/src/main.js:91752:26)
at CallbackList.invoke (/home/username/.vscode/extensions/ms-vscode.cpptools-1.21.0-linux-x64/dist/src/main.js:92737:39)
at Emitter.fire (/home/username/.vscode/extensions/ms-vscode.cpptools-1.21.0-linux-x64/dist/src/main.js:92799:36)
at StreamMessageWriter.fireClose (/home/username/.vscode/extensions/ms-vscode.cpptools-1.21.0-linux-x64/dist/src/main.js:93674:27)
at Socket.<anonymous> (/home/username/.vscode/extensions/ms-vscode.cpptools-1.21.0-linux-x64/dist/src/main.js:93706:42)
at Socket.emit (node:events:514:28)
at Pipe.<anonymous> (node:net:337:12)
2024-06-23 15:18:08.628 [error] Client is not running: Error: Client is not running
at LanguageClient.sendRequest (/home/username/.vscode/extensions/ms-vscode.cpptools-1.21.0-linux-x64/dist/src/main.js:95185:35)
at DocumentSymbolProvider.provideDocumentSymbols (/home/username/.vscode/extensions/ms-vscode.cpptools-1.21.0-linux-x64/dist/src/main.js:73761:65)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async h.provideDocumentSymbols (/snap/code/x1/usr/share/code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:153:98122)
I also observed some temporary network issue at this time, so maybe it's caused by some bug in Ubuntu 24.04. Or maybe the opposite: bug in VSCode or the extension caused network interruption in whole OS.
I got the same error when I was using ssh link to Ubuntu by vscode, and some "#include error" came to me
I encountered the same issue when using remote SSH and when the folder was opended via symbolic link. When I want to navigate to a definition, the file is reopened, just like here: https://github.com/microsoft/vscode-cpptools/issues/12187#issuecomment-2054998490 Looks like related to #4573
Same issue encountered when the folder/workspace is opened via symlink, using remote SSH. Appreciate if there's a workround.
У меня та же проблема, когда пытаюсь выполнить RenameSymbol (F2). В результате не переименовывается символ, а вылетает такое же предупреждение, как и в заголовке темы. (моя система Linux **** 5.10.16.3-microsoft-standard-WSL2 #1 SMP Fri Apr 2 22:23:49 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux)
Translation: I have the same issue when trying to execute RenameSymbol(F2). As a result, the character is not renamed, but the same warning is displayed as in the subject title.
Using the prerelease version of the C/C++ extension (v1.22.0) I am getting this error and a crash on every build of a project.
Reverting to the non-pre-release version (v1.21.6) I don't have the message or the crash.
If enough information to investigate isn't on hand, and you would like me to fiddle with logging settings to give a more detailed report, I can do that...
@hostilefork Can you try https://github.com/microsoft/vscode-cpptools/releases/tag/v1.22.1 -- it has some crash fixes.
@sean-mcmanus That seems to have taken care of the problem! (Before it was crashing on every build, I just did several builds with 1.22.1 and hasn't crashed, so I'll hope that means it's fixed...)
Unable to process IntelliSense for file with same canonicalized path as existing file. 名称: C/C++ ID: ms-vscode.cpptools 说明: C/C++ IntelliSense, debugging, and code browsing. 版本: 1.22.2 发布者: Microsoft VS Marketplace 链接: https://marketplace.visualstudio.com/items?itemName=ms-vscode.cpptools
@heartacker We need more info. What operating system are you using? Is cpptools crashing? Do you have any other repro details? Does the issue not repro in an earlier version?
I'm having the same problem on Ubuntu 24.04.01 LTS arm64 / Raspberry Pi 4.
The language server keeps crashing and restarting.
Unable to process IntelliSense for file with same canonicalized path as existing file. uri: file:///home/tianming/Documents/Code/Cpp/Graph/graph_definitions.hpp, canonicalized path: /home/tianming/Documents/Code/Cpp/Graph/graph_definitions.hpp
Anyway there was an unapplied update on my device. I'll return later if it still exists after updating.