-
Notifications
You must be signed in to change notification settings - Fork 27.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
extension installation using CLI leads to UnhandledPromiseRejectionWarning and hangs #32381
Comments
Same problem on Windows 10 too. |
Same problem on macOS Sierra 10.12.6 and VSCode 1.15 |
I have the same problem with @gperdomor |
I have this too, how to fix it? code -v node -v npm -v macOS Sierra 10.12.4 (16E195) |
Any ideas? |
+1 |
Same problem on macOS Sierra 10.12.6 and VSCode 1.15.1 |
Same issue. VS Code version info from About (latest): node --version OS is latest x64 Kali linux. |
I have three plugins, and they all fail! The editor doesn't even start. Very disappointing! 👎 |
Any one is dealing with it? I believe it's a bug... |
Same problem on |
I'm seeing the same with
|
ops |
Hi @joaomoreno , I'm SDE at Microsoft work for IoT DevKit https://microsoft.github.io/azure-iot-developer-kit/ We have published one-click install script to help developers to setup dev environment, including install vscode and arduino extension. https://microsoft.github.io/azure-iot-developer-kit/docs/get-started/ To install extension with CLI is an important step in our installation script, and this issue may break our script. Could you please tell us more information about when this issue will be fixed? To our one-click script, we have no workaround currently. Thanks. |
This issue is fixed now in |
@Sneezry - agree this was an unfortunate hiccup as I was trying to get started with my IoT dev board. I ended up having to install the cpp extension manually, then commented out a line from out\cli.js (//'installCppExtension') and hopefully I'm back to green. Looking forward to the code fix release. |
I found one workaround(at-least worked for me :) ) Whats worked is:Step 1: Install through command line (It will fail) |
@amiteshhh this issue is only related with installing extensions from marketplace with CLI. Both installing from GUI or local vsix file are okay. |
I'm having the same issue with v 1.15.1. Though it is possible to use $name = "publisher.package"
$pattern = "<script class=`"vss-extension`" defer=`"defer`" type=`"application\/json`">(.*?)<\/script>"
$regex = [regex]"(?m)$pattern"
$dom = (New-Object Net.WebClient).DownloadString("https://marketplace.visualstudio.com/items?itemName=$name");
if($dom -and $dom -match $pattern) {
$matches = $regex.Match($dom)
$jsonText = $matches[0].Groups[1]
$json = ConvertFrom-Json $jsonText
$version = $Json.versions[0].version
$parts = $name.Split(".")
$publisher = $parts[0]
$package = $parts[1]
$packageUrl = "https://marketplace.visualstudio.com/_apis/public/gallery/publishers/$publisher/vsextensions/$package/$version/vspackage"
Write-Host "vscode: install $name"
Write-Host "----------------------------------------"
Invoke-RestMethod -Method Get -Uri $packageUrl -OutFile "$Env:Temp\$name.vsix"
code --install-extension "$Env:Temp\$name.vsix"
Write-Host ""
} The code above could use more defense coding, however, its to demonstrate that you can do the following:
|
@joaomoreno seems like vscode not publish new version at the end of August? We still waiting for this bugfix. |
Installing any extension, using code CLI, like
code --install-extension EditorConfig.EditorConfig
leads to the following message and the command hangs
Found 'EditorConfig.EditorConfig' in the marketplace. Installing... (node:16346) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): TypeError: this._state.then is not a function (node:16346) DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
Extensions can be installed from within the editor, without any problem.
The text was updated successfully, but these errors were encountered: