-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Description
Environment
- OS and Version: Linux
- VS Code Version: 1.99.3
- C/C++ Extension Version: 1.27.7
- If using SSH remote, specify OS of remote machine: N/A
Bug Summary and Steps to Reproduce
Bug Summary:
The extension crashes with following error when reply from the server is invalid. Such situation can occur when held by a captive portal.
In our setup DNS is intercepted due to security restrictions and redirects to our server (like a captive portal would). This causes the extension gallery POST request get a 404 response with an HTML page.
2025-09-20 16:55:28.879 [error] TypeError: Cannot read properties of undefined (reading '0')
at Object.preReleaseCheck (/home/team/.vscode/extensions/ms-vscode.cpptools-1.27.7-linux-x64/dist/src/main.js:11970:50)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async activate (/home/team/.vscode/extensions/ms-vscode.cpptools-1.27.7-linux-x64/dist/src/main.js:117216:9)
at async cw.n (file:///usr/share/code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:111:13359)
at async cw.m (file:///usr/share/code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:111:13322)
at async cw.l (file:///usr/share/code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:111:12778)
This is the relevant line:
vscode-cpptools/Extension/src/main.ts
Line 81 in 5855d98
await LanguageServer.preReleaseCheck(); |
Steps to reproduce:
- Run VS Code on machine with restricted Internet access.
- Observe that the extension crashes.
Expected behavior:
The extension handles the error gracefully, as if no Internet was present.
Configuration and Logs
2025-09-20 16:55:28.879 [error] TypeError: Cannot read properties of undefined (reading '0')
at Object.preReleaseCheck (/home/team/.vscode/extensions/ms-vscode.cpptools-1.27.7-linux-x64/dist/src/main.js:11970:50)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async activate (/home/team/.vscode/extensions/ms-vscode.cpptools-1.27.7-linux-x64/dist/src/main.js:117216:9)
at async cw.n (file:///usr/share/code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:111:13359)
at async cw.m (file:///usr/share/code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:111:13322)
at async cw.l (file:///usr/share/code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:111:12778)
Other Extensions
No response
Additional context
No response
Metadata
Metadata
Assignees
Labels
Type
Projects
Status