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

Can't connect to FSAC if HTTP_PROXY is defined. #272

Closed
vasily-kirichenko opened this issue Nov 7, 2016 · 11 comments · Fixed by axios/axios#691 or #785
Closed

Can't connect to FSAC if HTTP_PROXY is defined. #272

vasily-kirichenko opened this issue Nov 7, 2016 · 11 comments · Fixed by axios/axios#691 or #785
Labels
bug workaround Problems for which exist known workarounds

Comments

@vasily-kirichenko
Copy link
Contributor

[11:29:15 DEBUG] got FSAC line, is it the started message? true
[11:29:15 DEBUG] FSAC stdout: [I] 2016-11-07T08:29:15.5075536Z: listener started in 22.175 ms with binding 127.0.0.1:8414 [Suave.Tcp.tcpIpServer]

[11:29:15 INFO ] REQ (001) -> {lint}, File = "~\Source\xxx.fs"
[11:29:15 INFO ] REQ (002) -> {project}, File = "~\Source\xxx.fsproj"
[11:29:15 INFO ] REQ (003) -> {parse}, File = "~\Source\xxx.fs"
[11:29:16 ERROR] RES (002) <- {project} ERROR in 1013 ms: Error: connect EACCES 127.0.0.1:8080 Data=undefined
[11:29:16 ERROR] RES (001) <- {lint} ERROR in 1018 ms: Error: connect EACCES 127.0.0.1:8080 Data=undefined
[11:29:16 INFO ] REQ (004) -> {tooltip}, File = "~\Source\xxx.fs"
[11:29:16 ERROR] RES (003) <- {parse} ERROR in 1004 ms: Error: connect EACCES 127.0.0.1:8080 Data=undefined
[11:29:17 ERROR] RES (004) <- {tooltip} ERROR in 1014 ms: Error: connect EACCES 127.0.0.1:8080 Data=undefined

Nothing works, obviously.

@Krzysztof-Cieslak Krzysztof-Cieslak added the reproduction needed Bug reports that can't be reproduced by maintainers label Nov 7, 2016
@Krzysztof-Cieslak
Copy link
Member

Is it still the problem?

@c000
Copy link

c000 commented Nov 30, 2016

This problem occurs if you maybe have the http_proxy envvar.

@eerohele
Copy link

eerohele commented Dec 5, 2016

I can confirm that removing the HTTP_PROXY environment variable fixed the issue. Thanks, @c000!

@vasily-kirichenko
Copy link
Contributor Author

That's great, but what if I don't want / cannot remove http_proxy var?

@Krzysztof-Cieslak Krzysztof-Cieslak added bug and removed reproduction needed Bug reports that can't be reproduced by maintainers labels Dec 5, 2016
@Krzysztof-Cieslak Krzysztof-Cieslak changed the title FSAC dies on start Can't connect to FSAC if HTTP_PROXY is defined. Dec 13, 2016
@fbehrens
Copy link
Contributor

@vasily-kirichenko It you need to keep http_proxy on your machine, you can start code from a shell, on which you change your environment. I use powershell and run $env:HTTP_PROXY="". For more convenience, wrap this in a function and store it in your profile. This way you have your editor running in a controlled environment. On windows the Extensions can be installed without http_proxy

@s952163
Copy link

s952163 commented Dec 14, 2016

also unset HTTPS_PROXY if necessary :-( but glad codelens is back! :-)

@Krzysztof-Cieslak
Copy link
Member

I;ve included fix suggested by @vilinski in 2.22.0, hopefully its fixed.

@vilinski
Copy link

vilinski commented Feb 3, 2017

Seems it still doesn't work the assumed way: https://github.com/mzabriskie/axios/blob/master/lib/adapters/http.js#L85
However it works without hacks on ionide side with this not yet merged PR of @inthemill to axios:
https://github.com/inthemill/axios/commit/ed47ef8b568018928e4560f7380d1752573a5e32

@hickford
Copy link

hickford commented Jul 19, 2017

This is an annoying bug! I work in an enterprise environment where we can only access the web through the corporate proxy server. It's necessary to set the http_proxy environment variable to make many applications work.

Thanks for the links. I agree the upstream bug axios/axios#434 should be fixed so axios respects the no_proxy environment variable (pull request axios/axios#565 )

Meanwhile, if it helps anyone else, here's a minimal workaround you can apply on your computer:

  1. In a text editor, edit %userprofile%\.vscode\extensions\Ionide.ionide-fsharp-3.1.0\fsharp.js (adjust version number in path if necessary) eg.

  2. Find the lines

    var proxy = config.proxy;
    if (!proxy) {
    
  3. Edit them so proxy won't be used for host 127.0.0.1

    var proxy = config.proxy;
    if (!proxy && parsed.hostname !== "127.0.0.1") {
    
  4. Restart Visual Studio Code

@vilinski
Copy link

vilinski commented Jul 19, 2017

@hickford I also used to use this hack, actually deactivating proxy initialization. But you should do this every ionide update, which is pretty frequent. Actually I use CNTLM with it's own NoProxy option and already forgotten this pain. Now I just update the password hash when forced to change my windows password and have also no problems with other unix-tools like git, npm, etc.

@dh360
Copy link

dh360 commented Jul 19, 2019

In a text editor, edit %userprofile%\.vscode\extensions\Ionide.ionide-fsharp-3.1.0\fsharp.js

i have no such file , how can i fix it ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug workaround Problems for which exist known workarounds
9 participants