Skip to content
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

New download implementation doesn't work on Win7 #26459

Closed
davidanthoff opened this issue Mar 14, 2018 · 15 comments · Fixed by #26719
Closed

New download implementation doesn't work on Win7 #26459

davidanthoff opened this issue Mar 14, 2018 · 15 comments · Fixed by #26719
Labels
system:windows Affects only Windows

Comments

@davidanthoff
Copy link
Contributor

#25477 changed the way download works on Windows: it now always uses PowerShell. The new implementation uses features that are not available on a fully patched Win 7 SP1 system, though, and so doesn't work there. In particular, [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityProtocolType]::Tls12 does not work on those systems, because the version of .Net that ships with Win7 doesn't have the Tls12 value in it. This now affects both base, and also BinDeps.jl (which uses the same strategy). I'm not sure about BinaryProvider.jl.

I learned about this because one of my students is on a system like this and BinDeps.jl essentially doesn't work for him. I then installed a clean Win7 SP1 in a VM, ran Windows Update until everything was installed and tried things, and same story.

Now, there are probably lots of users out there that have for some reason or another a newer version of .Net & PowerShell installed on their Win 7 systems, and then everything will work. But if the message is that Win 7 is fully supported, it should probably work on a system as MS ships it.

@JeffBezanson
Copy link
Member

Does it work if you remove the Tls12 part?

@davidanthoff
Copy link
Contributor Author

I haven't tried, but then it won't be able to download anything from github, right?

@davidanthoff
Copy link
Contributor Author

I should add that I just tried to execute that powershell code in a normal PowerShell cmd window. I haven't installed julia on that VM system.

@simonbyrne
Copy link
Contributor

Is this fixed by the "easy fix" update? If so, I don't think requiring users of a 7 year old OS to manually install an update is terribly onerous.

@davidanthoff
Copy link
Contributor Author

I haven't tried, but the error right now is on the .Net side: the enum that is used just doesn't have the TLS12 value in it on the version of .Net that is shipped with Win 7. My understanding of that easy fix is that it doesn't install a new .Net version, so I don't think that will help.

I think we would have to tell folks to install a newer version of .Net or Powershell manually to make this work. I'm not sure which of the two, though.

@staticfloat
Copy link
Member

Correct, please try installing .NET framework v4.5 and try again.

@davidanthoff
Copy link
Contributor Author

Alright, one has to manually install PowerShell 3 or higher for this to work (just installing a newer .Net Framework doesn't help, because PowerShell 2 will just continue to use .Net 3.5). In order to install PowerShell 3, one also manually has to install .Net Framework 4.5. So essentially the min version that things work on would be Win 7 SP1 + Windows Management Framework 3 (that is the package that ships PowerShell) + .Net Framework 4.5.

I would think that most systems probably have a newer .Net installed in any case because so much other software depends on that, but probably not the WMF stuff (that was actually the thing missing on my students laptop).

@staticfloat
Copy link
Member

Great, thanks for tracking that down David. We should include this in the set of instructions on the download page.

@simonbyrne
Copy link
Contributor

We could also start powershell with the -Version 3 option, which should throw a more informative error.

@simonbyrne
Copy link
Contributor

Okay, I quickly tried it on a 32-bit Win 7 VM. If you pass the -Version 3 option without it being installed, it doesn't give you a useful error, but it does fail with exit code 4294574080. I I can't find any documentation, but it does seem to be some sort of "version error" code, based on this document (since 4294574080 % Int32 == -393216).

What is the best way to catch the error code from run to spit out a better error?

(Also, should exit codes be Int64 on 32-bit machines?)

@tkelman
Copy link
Contributor

tkelman commented Apr 6, 2018

This is not fixed by #26719 at all. It's a clearer error message now, but it still doesn't work.

@simonbyrne
Copy link
Contributor

Is it even possible to fix it on Julia's end? I think as long as the error message tells the user how to fix the problem, that should be sufficient.

@tkelman
Copy link
Contributor

tkelman commented Apr 6, 2018

Use something other than powershell if it's too old. Fall back to the old implementation, or using one of the libraries distributed with julia. There are a lot of users who won't have admin access necessary to install a newer powershell version.

@simonbyrne
Copy link
Contributor

But the old implementation doesn't support Tls 1.2, which we need in order to download from GitHub (which is the where most packages are going to host their binaries).

@tkelman
Copy link
Contributor

tkelman commented Apr 6, 2018

Has Base.download stopped working on windows on julia 0.6, or only the winhttp pieces of libgit2?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
system:windows Affects only Windows
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants