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

Incorrect "Unable to process IntelliSense for file with same canonicalized path as existing file." message can appear when cpptools crashes

Open sean-mcmanus opened this issue 1 year ago • 18 comments

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

sean-mcmanus avatar Apr 09 '24 22:04 sean-mcmanus

image 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 avatar Apr 10 '24 07:04 35mickey

@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?

sean-mcmanus avatar Apr 10 '24 21:04 sean-mcmanus

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 image
  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. image

35mickey avatar Apr 15 '24 04:04 35mickey

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.

xiaoyukuai avatar Apr 15 '24 07:04 xiaoyukuai

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
   ![image](https://private-user-images.githubusercontent.com/58681322/322352130-58f8b237-db65-46c8-be92-3f38e8372c65.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTMxOTYyNDYsIm5iZiI6MTcxMzE5NTk0NiwicGF0aCI6Ii81ODY4MTMyMi8zMjIzNTIxMzAtNThmOGIyMzctZGI2NS00NmM4LWJlOTItM2YzOGU4MzcyYzY1LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA0MTUlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNDE1VDE1NDU0NlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTMyN2U2YWFlNWIxMGFjNmEwZjgzNDhhYzMxNmRjMGE1ZjRjZmJhNmNlMzhlOTUyMGNlNjExZWUyZTYxZGY1OWImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.tXmSfDVazuExlMCp6n_S4d74zoc4QoNscLkF-tG-syA)

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.
   ![image](https://private-user-images.githubusercontent.com/58681322/322352414-c7a9e503-61e0-41ad-beb5-6c3ae788e1be.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTMxOTYyNDYsIm5iZiI6MTcxMzE5NTk0NiwicGF0aCI6Ii81ODY4MTMyMi8zMjIzNTI0MTQtYzdhOWU1MDMtNjFlMC00MWFkLWJlYjUtNmMzYWU3ODhlMWJlLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA0MTUlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNDE1VDE1NDU0NlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTBiNWIzZTM2OTQ4YjNjODU3ZjcwNmNmM2U1M2VkMTdlNTE0NTgxYTQyYmFhNDdhMmYzMjY1ZmM4YWNkYjVjMjgmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.GiP1jKANvH5-zvpoOE8xHDW6l4-PSMl6GeCRZ9E71dQ)

I am having the exact same issue.

Lorsh avatar Apr 15 '24 15:04 Lorsh

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

Kenvell avatar Apr 19 '24 01:04 Kenvell

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.

valiko-ua avatar Jun 23 '24 12:06 valiko-ua

I got the same error when I was using ssh link to Ubuntu by vscode, and some "#include error" came to me

wang274 avatar Jul 25 '24 09:07 wang274

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

czado avatar Aug 09 '24 08:08 czado

Same issue encountered when the folder/workspace is opened via symlink, using remote SSH. Appreciate if there's a workround.

pcy190 avatar Aug 15 '24 06:08 pcy190

У меня та же проблема, когда пытаюсь выполнить 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.

x729-robots avatar Aug 15 '24 07:08 x729-robots

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 avatar Aug 29 '24 03:08 hostilefork

@hostilefork Can you try https://github.com/microsoft/vscode-cpptools/releases/tag/v1.22.1 -- it has some crash fixes.

sean-mcmanus avatar Aug 29 '24 23:08 sean-mcmanus

@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...)

hostilefork avatar Aug 30 '24 02:08 hostilefork

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 avatar Sep 03 '24 08:09 heartacker

@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?

sean-mcmanus avatar Sep 03 '24 11:09 sean-mcmanus

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.

Tianming-Wu avatar Sep 15 '24 15:09 Tianming-Wu