-
Type: Bug
-
Resolution: Unresolved
-
Priority: Minor - P4
-
None
-
Affects Version/s: None
-
Component/s: None
-
Environment:OS:
node.js / npm versions:
Additional info:
-
2
-
Developer Tools
Problem Statement/Rationale
When connecting in progress and the sidebar re-rendering, you can still call the copy connection string action from a contextual menu. When you do it very fast and re-rendering and copying happen simultaneously (which should be rare but anyway), the extension throws: `Error running command mdb.copyConnectionString: Cannot read properties of undefined (reading 'connectionId'). This is likely caused by the extension that contributes mdb.copyConnectionString.`
24-08-01 16:14:21.397 [error] No tree item with id '1/cd0b1db1-8beb-4375-a2c9-21e9314827cf-1722521657661' found.2024-08-01 16:15:11.140 [info] ExtensionService#_doActivateExtension vscode.typescript-language-features, startup: false, activationEvent: 'onLanguage:typescript'2024-08-01 16:17:30.677 [error] No tree item with id '1/06ef1937-5795-4e14-8e6f-a7bccb46756c-1722521846427' found.2024-08-01 16:18:03.331 [error] TypeError: Cannot read properties of undefined (reading 'connectionId') at /Users/alena.khineika/.vscode-insiders/extensions/mongodb.mongodb-vscode-1.7.0/dist/extension.js:510:1177884 at /Users/alena.khineika/.vscode-insiders/extensions/mongodb.mongodb-vscode-1.7.0/dist/extension.js:510:1176724 at d.h (/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:154:206481) at d.$executeContributedCommand (/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:154:207341) at E.S (/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:151:5980) at E.Q (/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:151:5746) at E.M (/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:151:4778) at E.L (/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:151:3830) at i.value (/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:151:2297) at n.B (/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:83:737) at n.fire (/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:83:954) at s.fire (/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:97:14453) at i.value (/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:177:8655) at n.B (/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:83:737) at n.fire (/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:83:954) at s.fire (/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:97:14453) at MessagePortMain.<anonymous> (/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:177:6781) at MessagePortMain.emit (node:events:519:28) at MessagePortMain.emit (node:domain:488:12) at MessagePortMain._internalPort.emit (node:electron/js2c/utility_init:2:2285) mdb.copyConnectionString {"value":"mongodb.mongodb-vscode","_lower":"mongodb.mongodb-vscode"}
Steps to Reproduce
- Click on remote connection that takes a bit longer to connect
- Try to be really fast and copy a connection string from another inactive connection
Expected Results
No error is being thrown.
Actual Results
The `Error running command mdb.copyConnectionString: Cannot read properties of undefined (reading 'connectionId'). This is likely caused by the extension that contributes mdb.copyConnectionString.` errors is thrown.