Repository navigation
Windows installation fails with "The request was aborted: Could not create SSL/TLS secure channel." #33140
Description
Activity
- addedinstallIssues and PRs related to installing Node.js and its installers.Issues and PRs related to installing Node.js and its installers.windowsIssues and PRs related to the Windows platform.Issues and PRs related to the Windows platform.
on Apr 29, 2020 Can you update your installation scripts, please?
I don't know if there's anything the install script could do differently except maybe try a newer powershell version? I'm not sure if that'd make a difference but perhaps you can try it.
This is the relevant line:
"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command Start-Process '%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe' -ArgumentList '-NoProfile -InputFormat None -ExecutionPolicy Bypass -Command iex ((New-Object System.Net.WebClient).DownloadString(''https://chocolatey.org/install.ps1'')); choco upgrade -y python visualstudio2017-workload-vctools; Read-Host ''Type ENTER to exit'' ' -Verb RunAs Reacted by Matt Callahan@bnoordhuis Awesome. That did the trick! I installed the latest Powershell release from https://github.com/PowerShell/PowerShell/releases/tag/v7.0.0 and replaced
%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exeby
C:\Program Files\PowerShell\7\pwsh.exein the batch file you mentioned. The installation worked fine now!
Would it be worth replacing the default "v1.0" in the batch file by something newer?
Maybe try to find the system's latest Powershell installation? Or rely on the Powershell installation to modify the PATH environment variable such that you could omit the directory altogether? At least the installation of the latest version asked if I wanted it to be added to PATH.
Reacted by Matt Callahan and Matt FeemsterI think we're open to such changes. I don't use Windows myself so I can't really evaluate the impact but if you open a PR for people to chime in, we'll take it from there.
FWIW, the
v1.0in the path is not the version, it is there probably because of historical reasons:C:\>c:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe Windows PowerShell Copyright (C) Microsoft Corporation. All rights reserved. Try the new cross-platform PowerShell https://aka.ms/pscore6 PS C:\> $PSVersionTable.PSVersion Major Minor Build Revision ----- ----- ----- -------- 5 1 18362 752
Ah thanks. I have never used Powershell before and I have very little experience with batch scripts. Thus, it would be difficult for me to open a PR.
Maybe someone else is more skilled in Powershell?The Change shouldn't be that big... You'd only need to change the one line mentioned by @bnoordhuis
It would then look like this:"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command Start-Process '%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe' -ArgumentList '-NoProfile -InputFormat None -ExecutionPolicy Bypass -Command [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; iex ((New-Object System.Net.WebClient).DownloadString(''https://chocolatey.org/install.ps1'')); choco upgrade -y python visualstudio2017-workload-vctools; Read-Host ''Type ENTER to exit'' ' -Verb RunAsIf you want I can submit a PR for that
- added a commit that references this issue
on Aug 17, 2020 - added a commit that references this issue
on Sep 23, 2020 This is a general PowerShell issue, replicated on PS v1 and v5 on Windows 7 (with Node.js v13.6). Solution (from here: https://stackoverflow.com/a/62389502) is to enable TLS 1.2 as supported protocol (which is separate from it being supported) by running in admin PS:
[Net.ServicePointManager]::SecurityProtocol = [Net.ServicePointManager]::SecurityProtocol -bor [Net.SecurityProtocolType]::Tls12In my case I also had to manually run the command instead of using the batch file:
iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1')); choco upgrade -y python2 visualstudio2017-workload-vctools@neogic Was this reintroduced? As far as I can tell this should've been closed since my pull request was merged and backported.
@jschpp I saw with a recently installed version of Node (v13.6) - though not the latest (v14.17.x) because I think I ran into an issue with NPM on Win 7.
At the core it's pretty definitely a PowerShell TLS/SSL config issue - I reproduced by running just
(New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1')in a PowerShell prompt. Though I'm surprised the batch file didn't work once the config issue was resolved and I had to run the above command manually.- added a commit that references this issue
on Jul 27, 2026
System
What steps will reproduce the bug?
How often does it reproduce? Is there a required condition?
Always fails. No condition required.
What is the expected behavior?
Installation just works and finishes without errors.
What do you see instead?
The error message:
Additional information
This seems to be well-known with Chocolatey clients:
https://chocolatey.org/docs/troubleshooting#the-request-was-aborted-could-not-create-ssltls-secure-channel
which has recently removed support for older TLS versions, see:
https://chocolatey.org/blog/remove-support-for-old-tls-versions
My computer does support TLS 1.2 and the Powershell command
returns
True.I have also created a file
C:\Users\<myusername>\Documents\PowerShell\Profile.ps1with contentbut that did not change anything. The installation still fails.
What can I do to install nodejs with its additional tools?
Can you update your installation scripts, please?