Skip to content
This repository has been archived by the owner on Aug 16, 2023. It is now read-only.

BinaryProvider.download not checking for Windows Management Framework #127

Open
simonbyrne opened this issue Oct 9, 2018 · 4 comments · May be fixed by #128
Open

BinaryProvider.download not checking for Windows Management Framework #127

simonbyrne opened this issue Oct 9, 2018 · 4 comments · May be fixed by #128

Comments

@simonbyrne
Copy link
Contributor

On a Win 7 machine:

julia> using BinaryProvider

┌ Warning: On Windows, creating file symlinks requires Administrator privileges

└ @ Base.Filesystem file.jl:789

 

julia> BinaryProvider.download("https://github.com/bicycle1885/ZlibBuilder/releases/download/v1.0.2/Zlib.v1.2.11.x86_64-

w64-mingw32.tar.gz","zlib.tar.gz")

Exception setting "SecurityProtocol": "Cannot convert null to type "System.Net.SecurityProtocolType" due to invalid enu

meration values. Specify one of the following enumeration values and try again. The possible enumeration values are "Ss

l3, Tls"."

At line:1 char:35

+ [System.Net.ServicePointManager]:: <<<< SecurityProtocol =

    + CategoryInfo          : InvalidOperation: (:) [], RuntimeException

    + FullyQualifiedErrorId : PropertyAssignmentException

 

Exception calling "DownloadFile" with "2" argument(s): "The underlying connection was closed: An unexpected error occur

red on a send."

At line:5 char:24

+ $webclient.DownloadFile <<<< ("https://github.com/bicycle1885/ZlibBuilder/releases/download/v1.0.2/Zlib.v1.2.11.x86_6

4-w64-mingw32.tar.gz", "zlib.tar.gz")

    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException

    + FullyQualifiedErrorId : DotNetMethodException

 

ERROR: Could not download https://github.com/bicycle1885/ZlibBuilder/releases/download/v1.0.2/Zlib.v1.2.11.x86_64-w64-mi

ngw32.tar.gz to zlib.tar.gz:

ErrorException("")

Stacktrace:

[1] error(::String) at .\error.jl:33

[2] #download#93(::Bool, ::Function, ::String, ::String) at .\logging.jl:313

[3] download(::String, ::String) at C:\Users\sbyrne\.julia\packages\BinaryProvider\cVlaj\src\PlatformEngines.jl:485

[4] top-level scope at none:0

This gives confusing errors, e.g. JuliaIO/CodecZlib.jl#24 (comment)

Base.download checks for this:

julia> download("https://github.com/bicycle1885/ZlibBuilder/releases/download/v1.0.2/Zlib.v1.2.11.x86_64-w64-mingw32.tar

.gz")

Cannot start Windows PowerShell version 3 because it is not correctly installed.

ERROR: Downloading files requires Windows Management Framework 3.0 or later.

Stacktrace:

[1] error(::String) at .\error.jl:33

[2] download(::String, ::String) at .\download.jl:20

[3] download(::String) at .\download.jl:59

[4] top-level scope at none:
@staticfloat
Copy link
Member

Good catch. I hate that we have two different implementations of download(), but BP needs to be able to get the Cmd object without running it, so here we are.

@simonbyrne
Copy link
Contributor Author

Actually 3 different implementations, since Pkg had its own as well: https://github.com/JuliaLang/Pkg.jl/blob/7254e17c783c479b30aed933e29d5efb7d6c4762/src/PlatformEngines.jl

simonbyrne added a commit to simonbyrne/BinaryProvider.jl that referenced this issue Oct 16, 2018
@musm
Copy link
Contributor

musm commented Oct 21, 2018

Actually 3 different implementations, since Pkg had its own as well: https://github.com/JuliaLang/Pkg.jl/blob/7254e17c783c479b30aed933e29d5efb7d6c4762/src/PlatformEngines.jl

WinRPM and also BinDeps have their own implementation as well....

Something should be done to try to unify all these different implementations. There have been problems in one implementation that are corrected in an other implementation, it seems unfortunate to have to try to maintain so many different implementations and have bug fixes in one version but not the other.

@simonbyrne
Copy link
Contributor Author

simonbyrne commented Oct 21, 2018

The discussion of that is here: JuliaLang/julia#27043

visr pushed a commit to visr/BinaryProvider.jl that referenced this issue May 10, 2019
Use rm instead of rmdir (because it exists)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants