-
Notifications
You must be signed in to change notification settings - Fork 7.1k
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
Invoke-WebRequest throws an error on OS X El Capitan #1919
Comments
|
The command works for me on Mac OS X 10.11.6 with the same PowerShell version you have. |
|
I have exactly same issue
|
|
I was able to reproduce and resolve this issue by installing .net core https://www.microsoft.com/net/core#macos Powershell needs .net core to function fully. |
|
setsquared: bingo ! thank you for helping out ! Works as expected now. |
|
@andschwa is the powershell package for os x having the pre-requisites installed? |
|
There's no way to install prereqs with a PKG. We should dump it for a homebrew formula ASAP. I do believe the installation documentation is missing OpenSSL info; although the manual link step should be unnecessary as we patch the .NET Core binaries. Someone recently pointed out that Http.Client may require curl to be installed --with-openssl. |
|
@gavinelder PowerShell does not need .NET Core installed; PowerShell ships its own copy of .NET Core. Unfortunately, .NET Core really broke their OpenSSL support, and now require the extra manual setup: But this should never be done on a system, for the very good reasons that the homebrew team stopped allowing you to Instead, we patch the provided .NET Core crypto libraries to look for OpenSSL in the right place, provided it's been installed. (Documentation here needs to be updated.) |
|
still getting the error with latest download on Oct 14 PS /Users/sunilm> $PSVersionTable Name Value PSVersion 6.0.0-alpha OpenSSL 0.9.8zh 14 Jan 2016 |
|
@vors did you patch your binaries when you built the last OS X package? |
|
@closedstack build from source, it's fixed but requires all the different .NET Core crypto libraries to be patched (like those in ~/.nuget). My guess is the packager didn't clear those out after Start-PSBootstrap was fixed to patch them. Let me know if it repros after building completely cleanly from source. |
|
@andschwa Didn't build it. Downloaded the latest binary for OS X from github. Maybe that binary needs to be rebuilt? |
|
@closedstack I know, I'm suggesting you build from source until the package is rebuilt. |
|
@andschwa I wiped out ~/.nuget for the upcoming release alpha.11. |
|
Confirmed: the fix was picked up in alpha.11. 🎉 |
Installed Aplha 11 on top of Alpha 10, still getting the same error I think. I wish the errors were more descriptiveInvoke-WebRequest -Uri www.bing.com
|
|
Okay I have to ask: did you install OpenSSL through home brew? |
|
no.. in fact I didn't even have homebrew installed until yesterday and no openssl through homebrew. |
|
Okay, install OpenSSL per the OS X installation docs. .NET Core requires On Tue, Oct 18, 2016, 5:30 PM closedstack notifications@github.com wrote:
-- Andy |
Steps to reproduce
Invoke-WebRequest -Uri "www.microsoft.com"
Expected behavior
Should return an object holding web request results
Actual behavior
Returns an error:
invoke-webrequest : The type initializer for 'System.Net.Http.CurlHandler' threw an exception.
At line:1 char:1
Environment data
Name Value
PSVersion 6.0.0-alpha
PSEdition Core
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 3.0.0.0
GitCommitId v6.0.0-alpha.9
CLRVersion
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion

1.1.0.1The text was updated successfully, but these errors were encountered: