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

elm-package does not support proxy #113

Closed
Shump opened this issue Jul 7, 2015 · 8 comments
Closed

elm-package does not support proxy #113

Shump opened this issue Jul 7, 2015 · 8 comments

Comments

@Shump
Copy link

Shump commented Jul 7, 2015

When trying to install a package with elm-package, I get an InvalidProxyEnvironmentVariable-exception.

It seems to be a problem with the http library used as described in this StackOverflow post:

http://stackoverflow.com/questions/31138915/haskell-network-http-conduit-exception-invalidproxyenvironmentvariable-http-pr

According to the post, a fix has been made already and might event have been pushed upstream already.

@Shump
Copy link
Author

Shump commented Jul 7, 2015

Here's the exact error message I get:

Error: failed with 'InvalidProxyEnvironmentVariable "http_proxy" "http://user:password@domain:port/"' when sending request to
    <http://package.elm-lang.org/all-packages?elm-package-version=0.5.1>

Would also like to point out that I get the same error message when I'm trying to run elm-make, which even prevents me from running the compiler.

evancz pushed a commit that referenced this issue Jul 10, 2015
Addresses proxy issue reported in #113
@evancz
Copy link
Contributor

evancz commented Jul 10, 2015

Thanks for the very informative issue! I have bumped the constraint on http-client so that anyone building from source will get the fixed version. This means that the fix will definitely be in the next release!

Are you able to build from source in the meantime?

@Shump
Copy link
Author

Shump commented Jul 13, 2015

Thanks!

I got the binaries from npm (which also didn't easily support proxy, the binaries had to be downloaded separately in order to complete the installation script). Hopefully they get updated in the next release.

@franko
Copy link

franko commented May 11, 2016

Hi,

I'm trying Elm and I already love this small, wonderful language. I have just the exact issue that is described here

failed with 'InvalidProxyEnvironmentVariable "http_proxy" "http://username:password@proxy:port/"' when sending request to
http://package.elm-lang.org/all-packages?elm-package-version=0.17

I'm on Windows using MinGW and I'm behind a proxy. Normally my proxy configuration works perfectly with other command-line applications like git.

Just a precision, in the username I have a space and in the password some special characters url-encoded like %3a%2a. May be these special characters trigger in some way the error ?

Right now this is not a big problem for me because I can compile stuff at home, on linux, but it is a little bit imitating if I want to test or develop something at work.

Any solution or workaround ?

EDIT: I did find myself the solution, I needed to replace the space in the username with %20, the url-encoded escape sequence.

@puruzio
Copy link

puruzio commented Feb 3, 2017

I'm having the same InvalidProxyEnvironmentVariable "https_proxy" "https://id:pwd@ip:port" issue running elm make on Windows (Server 2012 R2). I tried url-encoding the special character in the password, but it didn't help.

@nojaf
Copy link

nojaf commented Feb 16, 2017

I'm having an issue as well on Windows 7

PS C:\Users\Me\Downloads\runelm-snippet-3d1\runelm-snippet-3d1> elm-package install
Error: The following HTTP request failed.
<http://package.elm-lang.org/all-packages?elm-package-version=0.18>

FailedConnectionException2 "package.elm-lang.org" 80 False connect: failed (Connection timed out (WSAETIMEDOUT))

What (environment) variable do I need to set exactly?

@puruzio
Copy link

puruzio commented Feb 16, 2017

set http_proxy = http://id:pwd@proxyip:port

@nojaf
Copy link

nojaf commented Feb 20, 2017

Thanks!

In PowerShell it was

$env:http_proxy = "myproxy.com:8080"
$env:https_proxy = "myproxy.com:8080"

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants