Open kehrazy opened 1 year ago
Maybe it's because you use http proxy for https?
Maybe it's because you use http proxy for https?
no, the proxy accepts http, then redirects to https:// on request.
the error is not on my part - vcpkg (probably) shouldn't call WinHttpOpen to connect to an https endpoint :)
Are you able to download vcpkg.exe directly? https://github.com/microsoft/vcpkg-tool/releases/download/2023-08-09/vcpkg.exe
Are you able to download vcpkg.exe directly? https://github.com/microsoft/vcpkg-tool/releases/download/2023-08-09/vcpkg.exe
Yes, I am, which i mentioned in the initial message. However, vcpkg.exe
seems to use the same export.
@kehrazy How did you set the HTTP{S}_PROXY? What is its value? You mentioned that the manually downloaded vcpkg.exe also doesn't work properly. What is the error when you run it?
@kehrazy How did you set the HTTP{S}_PROXY? What is its value?
Through the "System Environment Variables" menu.
It has a format of http://{login}:{pass}@{proxy_host}:{proxy_port}
. HTTPS proxies are handled through HTTP, that's how our company proxies are set up.
You mentioned that the manually downloaded vcpkg.exe also doesn't work properly. What is the error when you run it?
Will update this thread in a couple of days.
This is an automated message. Per our repo policy, stale issues get closed if there has been no activity in the past 28 days. The issue will be automatically closed in 14 days. If you wish to keep this issue open, please add a new comment.
@Cheney-W Sorry for the late response.
You mentioned that the manually downloaded vcpkg.exe also doesn't work properly. What is the error when you run it?
warning: Download failed -- retrying after *ms
WinHttpSendRequest failed with exit code 12002
The issue does not seem to be on my end - I am able to download files via wget/curl..
Are you able to download vcpkg.exe directly? https://github.com/microsoft/vcpkg-tool/releases/download/2023-08-09/vcpkg.exe
Download VCPKG.exe, put in the same folder where git clone downloaded and run in powershell "./vcpkg integrate install".
Check this video: https://www.youtube.com/watch?v=0h1lC3QHLHU
Are you able to download vcpkg.exe directly? https://github.com/microsoft/vcpkg-tool/releases/download/2023-08-09/vcpkg.exe
Download VCPKG.exe, put in the same folder where git clone downloaded and run in powershell "./vcpkg integrate install".
Check this video: https://www.youtube.com/watch?v=0h1lC3QHLHU
Once again, vcpkg seems to download all https:// related urls via WinHttpSendRequest, which does not work.
I'm hitting this same problem.
I have the environment variable set, and winhttp knows about my proxy:
f:\dev\GameNetworkingSockets\master>echo %https_proxy%
http://proxy:3128/
f:\dev\GameNetworkingSockets\master>netsh winhttp show proxy
Current WinHTTP proxy settings:
Proxy Server(s) : proxy:3128
Bypass List : (none)
vcpkg was unable to download vcpkg.exe to bootstrap. I manually downloaded vcpkg.exe, but then I get the same basic problem trying to download portable cmake:
f:\dev\GameNetworkingSockets\master>.\vcpkg\vcpkg install --triplet=x64-windows
A suitable version of cmake was not found (required v3.27.1) Downloading portable cmake 3.27.1...
Downloading cmake...
https://github.com/Kitware/CMake/releases/download/v3.27.1/cmake-3.27.1-windows-i386.zip->F:\dev\GameNetworkingSockets\master\vcpkg\downloads\cmake-3.27.1-windows-i386.zip
Downloading https://github.com/Kitware/CMake/releases/download/v3.27.1/cmake-3.27.1-windows-i386.zip
warning: Download failed -- retrying after 1000ms
warning: Download failed -- retrying after 2000ms
warning: Download failed -- retrying after 4000ms
error: Failed to download from mirror set
error: https://github.com/Kitware/CMake/releases/download/v3.27.1/cmake-3.27.1-windows-i386.zip: WinHttpSendRequest failed with exit code 12002
error: https://github.com/Kitware/CMake/releases/download/v3.27.1/cmake-3.27.1-windows-i386.zip: WinHttpSendRequest failed with exit code 12002
error: https://github.com/Kitware/CMake/releases/download/v3.27.1/cmake-3.27.1-windows-i386.zip: WinHttpSendRequest failed with exit code 12002
error: https://github.com/Kitware/CMake/releases/download/v3.27.1/cmake-3.27.1-windows-i386.zip: WinHttpSendRequest failed with exit code 12002
I am able to download any of these URLs that vcpkg is failing on in Chrome. curl also works (the URL generates a 302, so you have to add -L and curl will emit two lines).
f:\dev\GameNetworkingSockets\master>curl -L https://github.com/Kitware/CMake/releases/download/v3.27.1/cmake-3.27.1-windows-i386.zip -o F:\dev\GameNetworkingSockets\master\vcpkg\downloads\cmake-3.27.1-windows-i386.zip
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
100 38.7M 100 38.7M 0 0 46.4M 0 --:--:-- --:--:-- --:--:-- 112M
I know that this used to work at some point.
Just unset both http(s)_proxy for bootstrap. That worked for me..
Just unset both http(s)_proxy for bootstrap. That worked for me..
You'll most likely hit a 407 behind a proxy. This won't work.
This open issue is almost a year old!
Getting the cake ready.
Seriously guys, this is stupid.
Still having this issue.
f:\dev\GameNetworkingSockets\master>set HTTP_PROXY
HTTP_PROXY=http://proxy:3128/
f:\dev\GameNetworkingSockets\master>set HTTPS_PROXY
HTTPS_PROXY=http://proxy:3128/
f:\dev\GameNetworkingSockets\master>netsh winhttp show proxy
Current WinHTTP proxy settings:
Proxy Server(s) : proxy:3128
Bypass List : (none)
f:\dev\GameNetworkingSockets\master>.\vcpkg\bootstrap-vcpkg.bat
Downloading https://github.com/microsoft/vcpkg-tool/releases/download/2024-08-01/vcpkg.exe -> F:\dev\GameNetworkingSockets\master\vcpkg\vcpkg.exe (using proxy: http://proxy:3128/)While calling Windows API function WinHttpOpen got error 0x00000057:
The parameter is incorrect.
F:\dev\GameNetworkingSockets\master\vcpkg\scripts\bootstrap.ps1 : Downloading vcpkg.exe failed. Please check your internet connection, or consider
downloading a recent vcpkg.exe from https://github.com/microsoft/vcpkg-tool with a browser.
At line:1 char:4
+ & {& "f:\dev\GameNetworkingSockets\master\vcpkg\scripts\bootstrap.ps1 ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException
+ FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,bootstrap.ps1
ScriptHalted
At F:\dev\GameNetworkingSockets\master\vcpkg\scripts\bootstrap.ps1:63 char:5
+ throw
+ ~~~~~
+ CategoryInfo : OperationStopped: (:) [], RuntimeException
+ FullyQualifiedErrorId : ScriptHalted
I can work around the first problem using curl (which demonstrates that it is definitely a problem with vcpkg, and not my computer or the proxy):
f:\dev\GameNetworkingSockets\master>curl -L -o vcpkg\vcpkg.exe https://github.com/microsoft/vcpkg-tool/releases/download/2024-08-01/vcpkg.exe
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
100 7928k 100 7928k 0 0 13.7M 0 --:--:-- --:--:-- --:--:-- 116M
And I also manually installed powershell. But I am not sure how to get past this:
f:\dev\GameNetworkingSockets\master>7z
7-Zip 24.08 (x64) : Copyright (c) 1999-2024 Igor Pavlov : 2024-08-11
...<snip>...
f:\dev\GameNetworkingSockets\master>vcpkg\vcpkg install --triplet x64-windows
Detecting compiler hash for triplet x64-windows...
-- Using %HTTP(S)_PROXY% in environment variables.
Compiler found: C:/Program Files/Microsoft Visual Studio/2022/Professional/VC/Tools/MSVC/14.37.32822/bin/Hostx64/x64/cl.exe
The following packages will be built and installed:
* abseil:x64-windows@20240722.0
openssl:x64-windows@3.3.1#1
protobuf:x64-windows@4.25.1#1
* utf8-range:x64-windows@4.25.1
* vcpkg-cmake:x64-windows@2024-04-23
* vcpkg-cmake-config:x64-windows@2024-05-23
* vcpkg-cmake-get-vars:x64-windows@2023-12-31
Additional packages (*) will be modified to complete this operation.
A suitable version of 7zip was not found (required v24.8.0).
warning: Download failed -- retrying after 1000ms
warning: Download failed -- retrying after 2000ms
warning: Download failed -- retrying after 4000ms
error: Missing 7z2408-extra.7z and downloads are blocked by x-block-origin.
error: https://github.com/ip7z/7zip/releases/download/24.08/7z2408-extra.7z: WinHttpSendRequest failed with exit code 12002
error: https://github.com/ip7z/7zip/releases/download/24.08/7z2408-extra.7z: WinHttpSendRequest failed with exit code 12002
error: https://github.com/ip7z/7zip/releases/download/24.08/7z2408-extra.7z: WinHttpSendRequest failed with exit code 12002
error: https://github.com/ip7z/7zip/releases/download/24.08/7z2408-extra.7z: WinHttpSendRequest failed with exit code 12002
Describe the bug With HTTP{S}_PROXY environment variables set, bootstrap_vcpkg script errors out.
Environment
To Reproduce Steps to reproduce the behavior:
git clone https://github.com/microsoft/vcpkg
cd vcpkg
bootstrap_vcpkg.bat
Expected behavior vcpkg installs successfuly.
Failure logs
Additional context There is really no point in downloading the .exe manually - the exe doesn't seem to work either.