denoland / deno

A modern runtime for JavaScript and TypeScript.
https://deno.com
MIT License
97.38k stars 5.36k forks source link

Installation fails on Windows #26429

Open giovannibaldi opened 2 weeks ago

giovannibaldi commented 2 weeks ago

Version: Deno 2.0.2

On Windows 11, I'm running the install command using PowerShell: irm https://deno.land/install.ps1 | iex

The command fails, giving this error:

curl: (35) schannel: next InitializeSecurityContext failed: CRYPT_E_NO_REVOCATION_CHECK (0x80092012)
 + CategoryInfo : ObjectNotFound: (C:\Users\MyUser\.deno\bin\deno.zip:String) [Remove-Item], ItemNotFoundException
 + FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.RemoveItemCommand
yazan-abdalrahman commented 2 weeks ago
Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.

Install the latest PowerShell for new features and improvements! https://aka.ms/PSWindows

PS C:\Users\Yazan.Abdalrahman> irm https://deno.land/install.ps1 | iex
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 40.4M  100 40.4M    0     0  13.3M      0  0:00:03  0:00:03 --:--:-- 13.3M
Deno was installed successfully to C:\Users\Yazan.Abdalrahman\.deno\bin\deno.exe
Run 'deno --help' to get started
Stuck? Join our Discord https://discord.gg/deno
PS C:\Users\Yazan.Abdalrahman>

I use Windows 11, and I can't reproduce it.

bartlomieju commented 2 weeks ago

@giovannibaldi are you using some sort of proxy or custom certificates in an enterprise context?

giovannibaldi commented 1 week ago

@bartlomieju I'm using my personal pc with a basic wi-fi connection. I tried looking into the settings but don't seem to be using a proxy server. Anyway, the Winget installation worked fine, and then upgraded to version 2.0.3 using PowerShell. Not really sure why the installation using PowerShell didn't work in the first place.

AndreiTS commented 1 week ago

I have the same issue:

PS C:\Users\andreits> irm https://deno.land/install.ps1 | iex
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
curl: (35) schannel: next InitializeSecurityContext failed: CRYPT_E_NO_REVOCATION_CHECK (0x80092012) - A função de revogação não pôde verificar a revogação do certificado.

Windows 11, personal computer, wifi.

spalberg commented 3 days ago

This is happening for us too. Windows 10 with enterprise firewall. But it was working before and I can even download the same ZIP using my browser without problems. I'll have our networking guys have a look at it and report if we can find something at our end.

spalberg commented 2 days ago

The issue is the curl command: curl.exe -Lo "$env:TMP\tmp.zip" https://dl.deno.land/release/v2.0.4/deno-x86_64-pc-windows-msvc.zip

curl: (35) schannel: next InitializeSecurityContext failed: CRYPT_E_NO_REVOCATION_CHECK (0x80092012) - The revocation function was unable to check revocation for the certificate.

Seems that this error occurs when a self signed certificate is injected by the firewall. When I download the ZIP from github directly, which is excluded from our firewall, I don't have any errors. When I download the ZIP from dl.deno.land via my browser, the certificates are handled correctly. So I presume that this is an issue with curl for windows.

However, for deno the simplest way would be to change from the usage of curl to something like Invoke-WerbRequest, see: Invoke-WebRequest -uri "https://dl.deno.land/release/v2.0.4/deno-x86_64-pc-windows-msvc.zip" -Method "GET" -Outfile "$env:TMP\tmp.zip" which works fine with the custom certificates.

--

Good article concerning this issue: https://www.phillipsj.net/posts/windows-curl-and-self-signed-certs/