You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 15, 2022. It is now read-only.
Repository navigation
This repository was archived by the owner on Dec 15, 2022. It is now read-only.
Unable to install packages behind corporate proxy #322
I get the following error when trying to install a package with apm behind a corporate proxy.
$ apm install linter
Installing linter to /home/marcuslt/.atom/packages
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | linux | x64
gyp http GET https://atom.io/download/atom-shell/v0.21.0/node-v0.21.0.tar.gz
gyp WARN install got an error, rolling back install
gyp ERR! install error
gyp ERR! stack Error: tunneling socket could not be established, cause=Parse Error
gyp ERR! stack at ClientRequest.onError (/opt/atom/resources/app/apm/node_modules/npm/node_modules/request/node_modules/tunnel-agent/index.js:168:17)
gyp ERR! stack at ClientRequest.g (events.js:180:16)
gyp ERR! stack at ClientRequest.emit (events.js:95:17)
gyp ERR! stack at Socket.socketOnData (http.js:1593:9)
gyp ERR! stack at TCP.onread (net.js:528:27)
gyp ERR! System Linux 3.13.0-46-generic
gyp ERR! command "/opt/atom/resources/app/apm/bin/node" "/opt/atom/resources/app/apm/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "install" "--target=0.21.0" "--dist-url=https://atom.io/download/atom-shell" "--arch=x64" "--ensure" "--proxy=http://wwwproxy:3128/"
gyp ERR! cwd /home/marcuslt/.atom
gyp ERR! node -v v0.10.35
gyp ERR! node-gyp -v v1.0.2
gyp ERR! not ok
All proxy settings should be correct and it worked perfectly in earlier versions.
Same here when trying to install Sublime-Style-Column-Selection :
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | linux | x64
gyp http GET https://atom.io/download/atom-shell/v0.21.0/node-v0.21.0.tar.gz
gyp WARN install got an error, rolling back install
gyp ERR! install error
gyp ERR! stack Error: tunneling socket could not be established, cause=Parse Error
gyp ERR! stack at ClientRequest.onError (/usr/share/atom/resources/app/apm/node_modules/npm/node_modules/request/node_modules/tunnel-agent/index.js:168:17)
gyp ERR! stack at ClientRequest.g (events.js:180:16)
gyp ERR! stack at ClientRequest.emit (events.js:95:17)
gyp ERR! stack at Socket.socketOnData (http.js:1593:9)
gyp ERR! stack at TCP.onread (net.js:528:27)
gyp ERR! System Linux 3.11.10-25-default
gyp ERR! command "/usr/share/atom/resources/app/apm/bin/node" "/usr/share/atom/resources/app/apm/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "install" "--target=0.21.0" "--dist-url=https://atom.io/download/atom-shell" "--arch=x64" "--ensure" "--proxy=http://127.0.0.1:3128/"
gyp ERR! cwd /home/f_mo/.atom
gyp ERR! node -v v0.10.35
gyp ERR! node-gyp -v v1.0.2
gyp ERR! not ok
$ apm config ls
; cli configs
globalconfig = "/home/f_mo/.atom/.apm/.apmrc"
user-agent = "npm/2.5.1 node/v0.10.35 linux x64"
userconfig = "/home/f_mo/.atom/.apmrc"
; userconfig /home/f_mo/.atom/.apmrc
http-proxy = "http://127.0.0.1:3128"
https-proxy = "http://127.0.0.1:3128/"
strict-ssl = false
; globalconfig /home/f_mo/.atom/.apm/.apmrc
cache = "/home/f_mo/.atom/.apm"
; node bin location = /usr/share/atom/resources/app/apm/bin/node
; cwd = /home/f_mo/Téléchargements
; HOME = /home/f_mo/.atom/.node-gyp
; 'npm config ls -l' to show all defaults.
Hmm, I see the command was spawned with --proxy and it looks like it properly picked up the value from the config file.
Are either of you building Atom from source? I just added support for enabling verbose output from node-gyp when running apm install --verbose.
So if you build Atom yourselves and then ran apm install <package_name> --verbose using apm 0.151+ it should include confirmation that it is using the right proxy config.
C:\Users\mkrnac>apm install minimap
Installing minimap to C:\Users\mkrnac\.atom\packages
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | win32 | ia32
gyp http GET https://atom.io/download/atom-shell/v0.21.0/node-v0.21.0.tar.gz
gyp WARN install got an error, rolling back install
gyp
For me this problem started today, Atom was updated to 0.189.0 (installed via webupd8 ppa) and when I tried to update my packages I got this error.
$ apm update
Package Updates Available (5)
├── autocomplete-plus 2.7.1 -> 2.8.0
├── color-picker 1.5.0 -> 1.6.0
├── linter-jscs 1.9.0 -> 1.10.0
├── linter-jshint 0.1.0 -> 0.1.1
└── minimap 4.7.1 -> 4.7.5
Would you like to install these updates? (yes)
Installing [email protected] to /home/hannesna/.atom/packages
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | linux | x64
gyp http GET https://atom.io/download/atom-shell/v0.22.0/node-v0.22.0.tar.gz
gyp WARN install got an error, rolling back install
gyp ERR! install error
gyp ERR! stack Error: tunneling socket could not be established, cause=Parse Error
gyp ERR! stack at ClientRequest.onError (/opt/atom/resources/app/apm/node_modules/npm/node_modules/request/node_modules/tunnel-agent/index.js:168:17)
gyp ERR! stack at ClientRequest.g (events.js:180:16)
gyp ERR! stack at ClientRequest.emit (events.js:95:17)
gyp ERR! stack at Socket.socketOnData (http.js:1593:9)
gyp ERR! stack at TCP.onread (net.js:528:27)
gyp ERR! System Linux 3.13.0-49-generic
gyp ERR! command "/opt/atom/resources/app/apm/bin/node" "/opt/atom/resources/app/apm/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "install" "--target=0.22.0" "--dist-url=https://atom.io/download/atom-shell" "--arch=x64" "--ensure" "--proxy=http://wwwproxy:3128/"
gyp ERR! cwd /home/hannesna/.atom
gyp ERR! node -v v0.10.35
gyp ERR! node-gyp -v v1.0.2
gyp ERR! not ok
$ apm config ls
; cli configs
globalconfig = "/home/hannesna/.atom/.apm/.apmrc"
user-agent = "npm/2.5.1 node/v0.10.35 linux x64"
userconfig = "/home/hannesna/.atom/.apmrc"
; userconfig /home/hannesna/.atom/.apmrc
https-proxy = "http://wwwproxy:3128/"
proxy = "http://wwwproxy:3128/"
; globalconfig /home/hannesna/.atom/.apm/.apmrc
cache = "/home/hannesna/.atom/.apm"
; node bin location = /opt/atom/resources/app/apm/bin/node
; cwd = /home/hannesna
; HOME = /home/hannesna/.atom/.node-gyp
; 'npm config ls -l' to show all defaults.
Same here. Can browse and search packages, but not install. The error is the same of everybody.
Seems to me that this error is not because the proxy. Apm can search packages, which means that it's passing the proxy normally. Trying to install any packages and gyp gives a "Parse Error" as the cause of not being able to make the connection:
gyp ERR! stack Error: tunneling socket could not be established, cause=Parse Error
1.16 has just been released. I could confirm that the workaround of setting proxy in .apmrc and environment variable works on Windows 10. Note that, "use proxy setting when calling APM" is disabled. It seems there is a regression in 1.15 release.
would you please explain what you mean by "use proxy setting when calling APM" @wattachai? If use of apmrc can be controlled during runtime that would fix the issue for portable version. I'll be testing 1.16 momentarly.
The portable installation (from ZIP file) still does not respect ENV variables on Windows and requires a use of .apmrc file inside .atom folder (and that file is not present there by default).
@ethernal "use proxy setting when calling APM" is a setting you can find on setting page of atom itself.
Let me describe what I did.
I disabled the above setting and made change to .apmrc with the following command in cmd:
apm config set http-proxy http://<proxy>:<port>
apm config set https-proxy http://<proxy>:<port>
apm config set strict-ssl false
apm config set registry http://registry.npmjs.org
After that, package update worked but I couldn't see any package detail, no. of download or package thumbnail.
Not giving up, I added a system environment variable: HTTP_PROXY pointing it to the same proxy in .apmr and restarted machine. Now package page of atom works like a charm. Yeah!
I will try to enable "use proxy setting when calling APM" without those workaround later with a hope that it would just work. (finger crossed)
Reacted by yodatak, Eddy Prado and Viet Thuong Tran
well this is good. but why apm can not supporting SSL checks? i have CA for the proxy and curl is working just fine when i point it to the right directory...
I don't think this ticket is resolved. Please reopen.
Activity
kevinsawicki commentedon Mar 16, 2015
Could you try running
apm config lsand verify the proxy settings there look correct?marcuslindfeldt commentedon Mar 17, 2015
They seem fine to me and i haven't changed them between versions.
superbob commentedon Mar 19, 2015
Same here when trying to install
Sublime-Style-Column-Selection:kevinsawicki commentedon Mar 26, 2015
Hmm, I see the command was spawned with
--proxyand it looks like it properly picked up the value from the config file.Are either of you building Atom from source? I just added support for enabling verbose output from
node-gypwhen runningapm install --verbose.So if you build Atom yourselves and then ran
apm install <package_name> --verboseusing apm 0.151+ it should include confirmation that it is using the right proxy config.michaelkrnac commentedon Mar 27, 2015
Same problem here:
Iam also behind a proxy
h-no commentedon Apr 7, 2015
For me this problem started today, Atom was updated to 0.189.0 (installed via webupd8 ppa) and when I tried to update my packages I got this error.
h-no commentedon Apr 7, 2015
Installing a new package with --verbose
(apm 0.157.0)
noseglid commentedon Apr 7, 2015
wmira commentedon Apr 7, 2015
Getting this as well. Im behind a proxy and have correct config. I can browse packages from atom but install throws the gyp error.
wsouto commentedon Apr 7, 2015
Same here. Can browse and search packages, but not install. The error is the same of everybody.
Seems to me that this error is not because the proxy. Apm can search packages, which means that it's passing the proxy normally. Trying to install any packages and gyp gives a "Parse Error" as the cause of not being able to make the connection:
gyp ERR! stack Error: tunneling socket could not be established, cause=Parse Errornoseglid commentedon Apr 16, 2015
@fujisaks Can you detail how you got this to work? I'm on severly outdated packages now because I can't upgrade.
noseglid commentedon Apr 16, 2015
@fujisaks Thanks so much. I modified your command for linux and it worked. This is what I did (Ubuntu 14.04):
morberg commentedon Apr 16, 2015
Thanks @fujisaks Works like a charm here! The only thing I needed to change was the proxy.
161 remaining items
ethernal commentedon Apr 11, 2017
I can confirm the same error on 1.15 not sure, but I believe it worked with cntlm before that version.
wattachai commentedon Apr 13, 2017
1.16 has just been released. I could confirm that the workaround of setting proxy in .apmrc and environment variable works on Windows 10. Note that, "use proxy setting when calling APM" is disabled. It seems there is a regression in 1.15 release.
ethernal commentedon Apr 13, 2017
would you please explain what you mean by "use proxy setting when calling APM" @wattachai? If use of apmrc can be controlled during runtime that would fix the issue for portable version. I'll be testing 1.16 momentarly.
ethernal commentedon Apr 13, 2017
The portable installation (from ZIP file) still does not respect ENV variables on Windows and requires a use of .apmrc file inside .atom folder (and that file is not present there by default).
wattachai commentedon Apr 13, 2017
@ethernal "use proxy setting when calling APM" is a setting you can find on setting page of atom itself.
Let me describe what I did.
I disabled the above setting and made change to .apmrc with the following command in cmd:
After that, package update worked but I couldn't see any package detail, no. of download or package thumbnail.
Not giving up, I added a system environment variable:
HTTP_PROXYpointing it to the same proxy in .apmr and restarted machine. Now package page of atom works like a charm. Yeah!I will try to enable "use proxy setting when calling APM" without those workaround later with a hope that it would just work. (finger crossed)
az-z commentedon Apr 27, 2017
well this is good. but why apm can not supporting SSL checks? i have CA for the proxy and curl is working just fine when i point it to the right directory...
I don't think this ticket is resolved. Please reopen.
chadflorian commentedon Jul 27, 2017
+1 for this issue still existing... 407 error no matter that I try from this thread.
jekriske-lilly commentedon Jul 27, 2017
407 means unauthorized. You need to provide your proxy with credentials.
Usually this is in the form of http://user:pass@yourproxyaddress:port
chadflorian commentedon Jul 27, 2017
I've tried that as well as every other iteration in this thread.
az-z commentedon Jul 27, 2017
chadflorian commentedon Jul 27, 2017
cntlm workaround works... but man.. what a PITA
az-z commentedon Jul 27, 2017
Rexeh commentedon Aug 9, 2017
One solution that has worked for me. Install Fiddler on your machine, have it open and ensure Rules > Automatically Authenticate is set.
Set your https-proxy to 127.0.0.1:8888
All traffic will then route via Fiddler and handle all NTLM negotiations.
yselivonchyk commentedon Dec 11, 2017
The comment by gabo2000git (Sep 6, 2016) helped
HerAdri commentedon Nov 11, 2018
I have read and tried to reproduce a few links similar to the following:
https://stackoverflow.com/questions/25997440/how-to-configure-atom-to-use-proxy-file-pac-settings
https://stackoverflow.com/questions/52448490/atom-using-system-proxy/52528490#52528490 1
https://stackoverflow.com/questions/48686716/tunneling-socket-could-not-be-established-statuscode-407-im-getting-this-error/52335359#52335359 1
https://stackoverflow.com/questions/52448490/atom-using-system-proxy/52528490#52528490 1
But so far without results.
However Rstudio does it perfectly!!!
There is corporate proxy server!!!