microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
162.45k stars 28.62k forks source link

Unable to install python extension in restricted network (offline install) #227166

Closed clintb-msft closed 5 days ago

clintb-msft commented 2 weeks ago

Does this issue occur when all extensions are disabled?: Yes

Created discussion in vscode-python, but they recommended to bring issue here https://github.com/microsoft/vscode-python/discussions/24020

Steps to Reproduce:

  1. Download vsix for python extension
  2. copy to vm with restricted network
  3. attempt to install extension, get network error
  4. image

  5. I've tried the recommended method using the vsix and below command code --install-extension .\ms-python.python-2024.13.2024082701.vsix --log trace

Seeing this exception in the log TRACE [File Watcher (node.js)] [CHANGED] c:\Users\59e04c8e62.vscode\extensions.763f4210-8d28-4223-a577-f6647b38280a ERR Error while installing the extension ms-python.debugpy Client network socket disconnected before secure TLS connection was established vscode-userdata:/c%3A/Users/59e04c8e62/.vscode/extensions/extensions.json ERR [uncaught exception in CLI]: Client network socket disconnected before secure TLS connection was established: Error: Client network socket disconnected before secure TLS connection was established at TLSSocket.onConnectEnd (node:_tls_wrap:1727:19) at TLSSocket.emit (node:events:531:35) at endReadableNT (node:internal/streams/readable:1696:12) at process.processTicksAndRejections (node:internal/process/task_queues:82:21) TRACE [File Watcher (node.js)] [raw] ["change"] .763f4210-8d28-4223-a577-f6647b38280a TRACE [File Watcher (node.js)] [CHANGED] c:\Users\59e04c8e62.vscode\extensions.763f4210-8d28-4223-a577-f6647b38280a ERR Error while installing the extension ms-python.vscode-pylance Client network socket disconnected before secure TLS connection was established vscode-userdata:/c%3A/Users/59e04c8e62/.vscode/extensions/extensions.json ERR [uncaught exception in CLI]: Client network socket disconnected before secure TLS connection was established: Error: Client network socket disconnected before secure TLS connection was established at TLSSocket.onConnectEnd (node:_tls_wrap:1727:19) at TLSSocket.emit (node:events:531:35) at endReadableNT (node:internal/streams/readable:1696:12) at process.processTicksAndRejections (node:internal/process/task_queues:82:21)

I tried installing pylance and pydebug first, but they also fail, and I also attempted to install them all 3 together in the same command, but still no luck code --install-extension .\ms-python.python-2024.13.2024082701.vsix --install-extension .\ms-python.vscode-pylance-2024.8.103.vsix --install-extension .\ms-python.debugpy-2024.11.2024082801.vsix --log trace

Users have to manually bring their extensions and install, but we can't see how to prevent the dependency failures. Can you please suggest how we should proceed here to get these installed in an offline/restricted network?

Thanks!

vs-code-engineering[bot] commented 2 weeks ago

Thanks for creating this issue! It looks like you may be using an old version of VS Code, the latest stable release is 1.92.2. Please try upgrading to the latest version and checking whether this issue remains.

Happy Coding!

clintb-msft commented 2 weeks ago

Updated to 1.92.2 and still facing the same issue.

sandy081 commented 1 week ago

Can you please try with any other simple extension like dbaeumer.vscode-eslint and share us with the logs.

vs-code-engineering[bot] commented 5 days ago

This issue has been closed automatically because it needs more information and has not had recent activity. See also our issue reporting guidelines.

Happy Coding!