Skip to content

VS Code still have to access internet when installing extensions with local VSIX file #142812

@hsinyinfu

Description

@hsinyinfu

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

  • VS Code Version: 1.63.2
  • OS Version: Windows 10 20H2 and Ubuntu 18.04.5 (with remote-ssh scenario)

Steps to Reproduce:

  • Scenario A: Install extension with a VSIX file using command line tool on Windows 10 or Ubuntu 18.04.5
  1. Prepare an extension vsix file (e.g., Prettier or Python)
  2. Use the following command to install extension with the vsix file
code --install-extension <path to the vsix file>
  • Scenario B: Install extension with a VSIX file using VS Code UI on Windows 10
  1. Prepare an extension vsix file (e.g., Prettier or Python)
  2. In the "Extensions" view, click "Install from VSIX" and select the vsix file to be installed.
  • Scenario C: Install extension with a VSIX file using VS Code UI on remote Ubuntu Server (remote-ssh activated)
  1. Setup remote-ssh extension and environment settings
  2. Connect to the remote Ubuntu server
  3. In the remote-ssh VS Code window, click "Install from VSIX" and select the vsix file on the remote Ubuntu server to be installed.

Problem States:

In my company network, both local Windows PC and remote Ubuntu Linux terminal server are not allowed to access internet with firewall settings blocked.
Therefore, I downloaded the extension vsix files in my home and sent them to my company PC and installed them with the steps mentioned above.
However, I found that when installing extensions from vsix files, before VS Code start to extract contents from the vsix files, VS Code still tried to access the Microsoft marketplace, which makes it waste a lot of time (about 2minutes per installation) waiting VS Code request timeout and then start to do the extraction and installation.
In my understanding, all the content needed for installing an extension are all included in the vsix file.
Why do VS Code still need to send POST request to marketplace every time at the beginning when installing from vsix file?
Or, if is it possible to provide a configuration option to disable this behavior, or at least make users have a chance to set the timeout value for requests sent by VS Code to Microsoft marketplace?

Here is the log when installing extension with vsix file on my PC which can access internet (I set --log trace),
as you can see, it accessed the marketplace in the log
TRACE RequestService#request https://marketplace.visualstudio.com/_apis/public/gallery/extensionquery

TRACE Started scanning user extensions
 INFO CLI main {
  _: [],
  diff: false,
  add: false,
  goto: false,
  'new-window': false,
  'reuse-window': false,
  wait: false,
  help: false,
  'list-extensions': false,
  'show-versions': false,
  'install-extension': [
    'C:\\Users\\mtk23649.DOMAIN_MTK\\Desktop\\VSCode Portable\\extensions\\esbenp.prettier-vscode\\esbenp.prettier-vscode-9.1.0.vsix'
  ],
  'pre-release': false,
  version: false,
  verbose: false,
  log: 'trace',
  status: false,
  'prof-startup': false,
  'no-cached-data': false,
  'prof-v8-extensions': false,
  'disable-extensions': false,
  'disable-gpu': false,
  'ms-enable-electron-run-as-node': false,
  telemetry: false,
  debugRenderer: false,
  logExtensionHostCommunication: false,
  'skip-release-notes': false,
  'skip-welcome': false,
  'disable-telemetry': false,
  'disable-updates': false,
  'disable-keytar': false,
  'disable-workspace-trust': false,
  'disable-crash-reporter': false,
  'skip-add-to-recently-opened': false,
  'unity-launch': false,
  'open-url': false,
  'file-write': false,
  'file-chmod': false,
  'driver-verbose': false,
  force: false,
  'do-not-sync': false,
  trace: false,
  'force-user-env': false,
  'force-disable-user-env': false,
  'open-devtools': false,
  __sandbox: false,
  'no-proxy-server': false,
  'no-sandbox': false,
  nolazy: false,
  'force-renderer-accessibility': false,
  'ignore-certificate-errors': false,
  'allow-insecure-localhost': false,
  logsPath: 'C:\\Users\\mtk23649.DOMAIN_MTK\\Desktop\\VSCode Portable\\stables\\VSCode-win32-x64-1.63.2\\data\\user-data\\logs\\20220211T152929'
}
Installing extensions...
TRACE Started scanning user extensions
TRACE Scanned user extensions: 4
TRACE Scanned user extensions: 4
(node:28292) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
(Use `Code --trace-deprecation ...` to show where the warning was created)
TRACE Started scanning user extensions
TRACE Scanned user extensions: 4
TRACE ExtensionManagementService#install file:///c%3A/Users/mtk23649.DOMAIN_MTK/Desktop/VSCode%20Portable/extensions/esbenp.prettier-vscode/esbenp.prettier-vscode-9.1.0.vsix
 INFO Installing extension: esbenp.prettier-vscode
TRACE Started scanning system extensions
TRACE Started scanning user extensions
TRACE Scanned user extensions: 4
TRACE Scanned system extensions: 86
TRACE Started scanning system extensions
TRACE Started scanning user extensions
TRACE Scanned user extensions: 4
TRACE Scanned system extensions: 86
TRACE Started scanning user extensions
TRACE Scanned user extensions: 4
TRACE RequestService#request https://marketplace.visualstudio.com/_apis/public/gallery/extensionquery
TRACE resolveShellEnv(): skipped (Windows)
TRACE Started extracting the extension from c:\Users\mtk23649.DOMAIN_MTK\Desktop\VSCode Portable\extensions\esbenp.prettier-vscode\esbenp.prettier-vscode-9.1.0.vsix to C:\Users\mtk23649.DOMAIN_MTK\Desktop\VSCode Portable\stables\VSCode-win32-x64-1.63.2\data\extensions\.3be0a99b-f662-4b55-8289-5651a1ebb224
TRACE [File Watcher (node.js)] [ADDED] c:\Users\mtk23649.DOMAIN_MTK\Desktop\VSCode Portable\stables\VSCode-win32-x64-1.63.2\data\extensions\.3be0a99b-f662-4b55-8289-5651a1ebb224
TRACE [File Watcher (node.js)] [CHANGED] c:\Users\mtk23649.DOMAIN_MTK\Desktop\VSCode Portable\stables\VSCode-win32-x64-1.63.2\data\extensions\.3be0a99b-f662-4b55-8289-5651a1ebb224
TRACE [File Watcher (node.js)] [CHANGED] c:\Users\mtk23649.DOMAIN_MTK\Desktop\VSCode Portable\stables\VSCode-win32-x64-1.63.2\data\extensions\.3be0a99b-f662-4b55-8289-5651a1ebb224
TRACE [File Watcher (node.js)] [CHANGED] c:\Users\mtk23649.DOMAIN_MTK\Desktop\VSCode Portable\stables\VSCode-win32-x64-1.63.2\data\extensions\.3be0a99b-f662-4b55-8289-5651a1ebb224
TRACE [File Watcher (node.js)] [CHANGED] c:\Users\mtk23649.DOMAIN_MTK\Desktop\VSCode Portable\stables\VSCode-win32-x64-1.63.2\data\extensions\.3be0a99b-f662-4b55-8289-5651a1ebb224
TRACE [File Watcher (node.js)] [CHANGED] c:\Users\mtk23649.DOMAIN_MTK\Desktop\VSCode Portable\stables\VSCode-win32-x64-1.63.2\data\extensions\.3be0a99b-f662-4b55-8289-5651a1ebb224
TRACE [File Watcher (node.js)] [CHANGED] c:\Users\mtk23649.DOMAIN_MTK\Desktop\VSCode Portable\stables\VSCode-win32-x64-1.63.2\data\extensions\.3be0a99b-f662-4b55-8289-5651a1ebb224
TRACE [File Watcher (node.js)] [CHANGED] c:\Users\mtk23649.DOMAIN_MTK\Desktop\VSCode Portable\stables\VSCode-win32-x64-1.63.2\data\extensions\.3be0a99b-f662-4b55-8289-5651a1ebb224
TRACE [File Watcher (node.js)] [CHANGED] c:\Users\mtk23649.DOMAIN_MTK\Desktop\VSCode Portable\stables\VSCode-win32-x64-1.63.2\data\extensions\.3be0a99b-f662-4b55-8289-5651a1ebb224
TRACE [File Watcher (node.js)] [CHANGED] c:\Users\mtk23649.DOMAIN_MTK\Desktop\VSCode Portable\stables\VSCode-win32-x64-1.63.2\data\extensions\.3be0a99b-f662-4b55-8289-5651a1ebb224
TRACE [File Watcher (node.js)] [CHANGED] c:\Users\mtk23649.DOMAIN_MTK\Desktop\VSCode Portable\stables\VSCode-win32-x64-1.63.2\data\extensions\.3be0a99b-f662-4b55-8289-5651a1ebb224
TRACE [File Watcher (node.js)] [CHANGED] c:\Users\mtk23649.DOMAIN_MTK\Desktop\VSCode Portable\stables\VSCode-win32-x64-1.63.2\data\extensions\.3be0a99b-f662-4b55-8289-5651a1ebb224
 INFO Extracted extension to C:\Users\mtk23649.DOMAIN_MTK\Desktop\VSCode Portable\stables\VSCode-win32-x64-1.63.2\data\extensions\.3be0a99b-f662-4b55-8289-5651a1ebb224: esbenp.prettier-vscode
TRACE [File Watcher (node.js)] [ADDED] c:\Users\mtk23649.DOMAIN_MTK\Desktop\VSCode Portable\stables\VSCode-win32-x64-1.63.2\data\extensions\esbenp.prettier-vscode-9.1.0
 INFO Renamed to C:\Users\mtk23649.DOMAIN_MTK\Desktop\VSCode Portable\stables\VSCode-win32-x64-1.63.2\data\extensions\esbenp.prettier-vscode-9.1.0
 INFO Extracting completed. esbenp.prettier-vscode
 INFO Extension installed successfully: esbenp.prettier-vscode
Extension 'esbenp.prettier-vscode-9.1.0.vsix' was successfully installed.

Here is the log when installing extension from vsix file on the PC which can't access internet:
(It spent too much time, just like the program freezed, so I stop the process by Ctrl-C)

Installing extensions...
TRACE Started scanning user extensions
TRACE Extension VSIX downlads cache dir does not exist
TRACE Scanned user extensions: 0
TRACE Scanned user extensions: 0
(node:30321) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
(Use `code --trace-deprecation ...` to show where the warning was created)
TRACE Started scanning user extensions

TRACE Scanned user extensions: 0
TRACE ExtensionManagementService#install file:///proj/mtk23649/garmin.private-extension-manager-1.8.0.vsix
INFO Installing extension: garmin.private-extension-manager
TRACE Started scanning system extensions
TRACE Started scanning user extensions
TRACE Scanned user extensions: 0
TRACE Scanned system extensions: 85
TRACE RequestService#request https://marketplace.visualstudio.com/_apis/public/gallery/extensionquery
TRACE resolveShellEnv(): skipped (VSCODE_CLI is set)
^C

Metadata

Metadata

Assignees

Labels

*out-of-scopePosted issue is not in scope of VS CodeextensionsIssues concerning extensionsfeature-requestRequest for new features or functionality

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions