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.
$ apm --version
apm 0.142.0
npm 2.5.1
node 0.10.35
python 2.7.6
git 1.9.1
Could you try running apm config ls and verify the proxy settings there look correct?
They seem fine to me and i haven't changed them between versions.
globalconfig = "/home/marcuslt/.atom/.apm/.apmrc"
user-agent = "npm/2.5.1 node/v0.10.35 linux x64"
userconfig = "/home/marcuslt/.atom/.apmrc"
; environment configs
http-proxy = "http://<proxy>:<port>"
https-proxy = "http://<proxy>:<port>"
proxy = "http://<proxy>:<port>"
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.
$ apm --version
apm 0.142.0
npm 2.5.1
node 0.10.35
python 2.7.6
git 1.8.4.5
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.
Same problem here:
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
C:\Users\mkrnac>apm --version
apm 0.149.0
npm 2.5.1
node 0.10.35
python 3.2.4
git 1.9.5.msysgit.1
visual studio 2010
Iam also behind a proxy
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.
$ apm --version
apm 0.157.0
npm 2.5.1
node 0.10.35
python 2.7.6
git 1.9.1
Installing a new package with --verbose
(apm 0.157.0)
$ apm install emmet --verbose
Installing emmet to /home/hannesna/.atom/packages REQUEST { method: 'GET',
url: 'https://atom.io/api/packages/emmet',
json: true,
retries: 4,
proxy: 'http://wwwproxy:3128/',
strictSSL: true,
headers: { 'User-Agent': 'npm/2.5.1 node/v0.10.35 linux x64' },
uri: null,
callback: [Function] }
REQUEST make request https://atom.io/api/packages/emmet
REQUEST onRequestResponse https://atom.io/api/packages/emmet 200 { server: 'Cowboy',
date: 'Tue, 07 Apr 2015 09:13:13 GMT',
connection: 'keep-alive',
'strict-transport-security': 'max-age=631152000',
'x-frame-options': 'DENY',
'x-xss-protection': '1; mode=block',
'x-content-type-options': 'nosniff',
'content-security-policy': 'default-src \'self\'; connect-src \'self\'; font-src \'self\'; frame-src \'self\'; img-src https://* \'self\' data:; media-src \'none\'; object-src \'self\'; script-src \'self\' \'unsafe-inline\' https://ssl.google-analytics.com https://www.google-analytics.com; style-src \'self\' \'unsafe-inline\';',
'content-type': 'application/json; charset=utf-8',
etag: '"fb6f6e4a651dd173cfc8f11997520e78"',
'cache-control': 'max-age=0, private, must-revalidate',
'set-cookie': [ 'request_method=GET; path=/; secure' ],
'x-request-id': '2e70c448-9ddf-45a5-8cf2-ade29ebb6038',
'x-runtime': '0.129718',
'transfer-encoding': 'chunked',
via: '1.1 vegur' }
REQUEST finish init function https://atom.io/api/packages/emmet
REQUEST response end https://atom.io/api/packages/emmet 200 { server: 'Cowboy',
date: 'Tue, 07 Apr 2015 09:13:13 GMT',
connection: 'keep-alive',
'strict-transport-security': 'max-age=631152000',
'x-frame-options': 'DENY',
'x-xss-protection': '1; mode=block',
'x-content-type-options': 'nosniff',
'content-security-policy': 'default-src \'self\'; connect-src \'self\'; font-src \'self\'; frame-src \'self\'; img-src https://* \'self\' data:; media-src \'none\'; object-src \'self\'; script-src \'self\' \'unsafe-inline\' https://ssl.google-analytics.com https://www.google-analytics.com; style-src \'self\' \'unsafe-inline\';',
'content-type': 'application/json; charset=utf-8',
etag: '"fb6f6e4a651dd173cfc8f11997520e78"',
'cache-control': 'max-age=0, private, must-revalidate',
'set-cookie': [ 'request_method=GET; path=/; secure' ],
'x-request-id': '2e70c448-9ddf-45a5-8cf2-ade29ebb6038',
'x-runtime': '0.129718',
'transfer-encoding': 'chunked',
via: '1.1 vegur' }
REQUEST end event https://atom.io/api/packages/emmet
REQUEST has body https://atom.io/api/packages/emmet 18497
REQUEST emitting complete https://atom.io/api/packages/emmet
REQUEST { method: 'GET',
url: 'https://www.atom.io/api/packages/emmet/versions/2.3.6/tarball',
proxy: 'http://wwwproxy:3128/',
strictSSL: true,
headers: { 'User-Agent': 'npm/2.5.1 node/v0.10.35 linux x64' },
uri: null,
callback: undefined }
REQUEST make request https://www.atom.io/api/packages/emmet/versions/2.3.6/tarball
REQUEST onRequestResponse https://www.atom.io/api/packages/emmet/versions/2.3.6/tarball 302 { server: 'Cowboy',
date: 'Tue, 07 Apr 2015 09:13:14 GMT',
connection: 'keep-alive',
'strict-transport-security': 'max-age=631152000',
'x-frame-options': 'DENY',
'x-xss-protection': '1; mode=block',
'x-content-type-options': 'nosniff',
'content-security-policy': 'default-src \'self\'; connect-src \'self\'; font-src \'self\'; frame-src \'self\'; img-src https://* \'self\' data:; media-src \'none\'; object-src \'self\'; script-src \'self\' \'unsafe-inline\' https://ssl.google-analytics.com https://www.google-analytics.com; style-src \'self\' \'unsafe-inline\';',
location: 'https://codeload.github.com/emmetio/emmet-atom/legacy.tar.gz/v2.3.6',
'content-type': 'text/html; charset=utf-8',
'cache-control': 'no-cache',
'set-cookie': [ 'request_method=GET; path=/; secure' ],
'x-request-id': '1a4c385a-f4ad-4e1c-bb90-31931dbe25fc',
'x-runtime': '0.072120',
'transfer-encoding': 'chunked',
via: '1.1 vegur' }
REQUEST redirect https://codeload.github.com/emmetio/emmet-atom/legacy.tar.gz/v2.3.6
REQUEST redirect to https://codeload.github.com/emmetio/emmet-atom/legacy.tar.gz/v2.3.6
REQUEST {}
REQUEST response end https://codeload.github.com/emmetio/emmet-atom/legacy.tar.gz/v2.3.6 302 { server: 'Cowboy',
date: 'Tue, 07 Apr 2015 09:13:14 GMT',
connection: 'keep-alive',
'strict-transport-security': 'max-age=631152000',
'x-frame-options': 'DENY',
'x-xss-protection': '1; mode=block',
'x-content-type-options': 'nosniff',
'content-security-policy': 'default-src \'self\'; connect-src \'self\'; font-src \'self\'; frame-src \'self\'; img-src https://* \'self\' data:; media-src \'none\'; object-src \'self\'; script-src \'self\' \'unsafe-inline\' https://ssl.google-analytics.com https://www.google-analytics.com; style-src \'self\' \'unsafe-inline\';',
location: 'https://codeload.github.com/emmetio/emmet-atom/legacy.tar.gz/v2.3.6',
'content-type': 'text/html; charset=utf-8',
'cache-control': 'no-cache',
'set-cookie': [ 'request_method=GET; path=/; secure' ],
'x-request-id': '1a4c385a-f4ad-4e1c-bb90-31931dbe25fc',
'x-runtime': '0.072120',
'transfer-encoding': 'chunked',
via: '1.1 vegur' }
REQUEST make request https://codeload.github.com/emmetio/emmet-atom/legacy.tar.gz/v2.3.6
REQUEST onRequestResponse https://codeload.github.com/emmetio/emmet-atom/legacy.tar.gz/v2.3.6 200 { 'content-length': '77542',
'access-control-allow-origin': 'https://render.githubusercontent.com',
'content-security-policy': 'default-src \'none\'',
'x-xss-protection': '1; mode=block',
'x-frame-options': 'deny',
'x-content-type-options': 'nosniff',
'strict-transport-security': 'max-age=31536000',
vary: 'Authorization,Accept-Encoding',
etag: '"32913f368285e9a98cfcdc643096bd7df4a99c2e"',
'content-type': 'application/x-gzip',
'content-disposition': 'attachment; filename=emmetio-emmet-atom-v2.3.6-0-g32913f3.tar.gz',
date: 'Tue, 07 Apr 2015 09:13:15 GMT' }
REQUEST finish init function https://codeload.github.com/emmetio/emmet-atom/legacy.tar.gz/v2.3.6
REQUEST response end https://codeload.github.com/emmetio/emmet-atom/legacy.tar.gz/v2.3.6 200 { 'content-length': '77542',
'access-control-allow-origin': 'https://render.githubusercontent.com',
'content-security-policy': 'default-src \'none\'',
'x-xss-protection': '1; mode=block',
'x-frame-options': 'deny',
'x-content-type-options': 'nosniff',
'strict-transport-security': 'max-age=31536000',
vary: 'Authorization,Accept-Encoding',
etag: '"32913f368285e9a98cfcdc643096bd7df4a99c2e"',
'content-type': 'application/x-gzip',
'content-disposition': 'attachment; filename=emmetio-emmet-atom-v2.3.6-0-g32913f3.tar.gz',
date: 'Tue, 07 Apr 2015 09:13:15 GMT' }
gyp info it worked if it ends with ok
gyp verb cli [ '/opt/atom/resources/app/apm/bin/node',
gyp verb cli '/opt/atom/resources/app/apm/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js',
gyp verb cli 'install',
gyp verb cli '--target=0.22.0',
gyp verb cli '--dist-url=https://atom.io/download/atom-shell',
gyp verb cli '--arch=x64',
gyp verb cli '--ensure',
gyp verb cli '--verbose',
gyp verb cli '--proxy=http://wwwproxy:3128/' ]
gyp info using [email protected]
gyp info using [email protected] | linux | x64
gyp verb command install []
gyp verb install input version string "0.22.0"
gyp verb install installing version: 0.22.0
gyp verb install --ensure was passed, so won't reinstall if already installed
gyp verb install version not already installed, continuing with install 0.22.0
gyp verb ensuring nodedir is created /home/hannesna/.atom/.node-gyp/.node-gyp/0.22.0
gyp verb created nodedir /home/hannesna/.atom/.node-gyp/.node-gyp/0.22.0
gyp http GET https://atom.io/download/atom-shell/v0.22.0/node-v0.22.0.tar.gz
gyp verb download using proxy url: "http://wwwproxy:3128/"
REQUEST { proxy: 'http://wwwproxy:3128/',
headers: { 'User-Agent': 'node-gyp v1.0.2 (node v0.10.35)' },
uri: 'https://atom.io/download/atom-shell/v0.22.0/node-v0.22.0.tar.gz',
callback: undefined }
REQUEST make request https://atom.io/download/atom-shell/v0.22.0/node-v0.22.0.tar.gz
REQUEST onRequestResponse https://atom.io/download/atom-shell/v0.22.0/node-v0.22.0.tar.gz 302 { server: 'Cowboy',
date: 'Tue, 07 Apr 2015 09:13:15 GMT',
connection: 'keep-alive',
'strict-transport-security': 'max-age=631152000',
'x-frame-options': 'DENY',
'x-xss-protection': '1; mode=block',
'x-content-type-options': 'nosniff',
'content-security-policy': 'default-src \'self\'; connect-src \'self\'; font-src \'self\'; frame-src \'self\'; img-src https://* \'self\' data:; media-src \'none\'; object-src \'self\'; script-src \'self\' \'unsafe-inline\' https://ssl.google-analytics.com https://www.google-analytics.com; style-src \'self\' \'unsafe-inline\';',
location: 'http://gh-contractor-zcbenz.s3.amazonaws.com/atom-shell/dist/v0.22.0/node-v0.22.0.tar.gz',
'content-type': 'text/html; charset=utf-8',
'cache-control': 'no-cache',
'set-cookie': [ 'request_method=GET; path=/; secure' ],
'x-request-id': '5c25953b-3419-4434-a6e2-86a90109fa89',
'x-runtime': '0.015554',
'transfer-encoding': 'chunked',
via: '1.1 vegur' }
REQUEST redirect http://gh-contractor-zcbenz.s3.amazonaws.com/atom-shell/dist/v0.22.0/node-v0.22.0.tar.gz
REQUEST redirect to http://gh-contractor-zcbenz.s3.amazonaws.com/atom-shell/dist/v0.22.0/node-v0.22.0.tar.gz
REQUEST {}
REQUEST response end http://gh-contractor-zcbenz.s3.amazonaws.com/atom-shell/dist/v0.22.0/node-v0.22.0.tar.gz 302 { server: 'Cowboy',
date: 'Tue, 07 Apr 2015 09:13:15 GMT',
connection: 'keep-alive',
'strict-transport-security': 'max-age=631152000',
'x-frame-options': 'DENY',
'x-xss-protection': '1; mode=block',
'x-content-type-options': 'nosniff',
'content-security-policy': 'default-src \'self\'; connect-src \'self\'; font-src \'self\'; frame-src \'self\'; img-src https://* \'self\' data:; media-src \'none\'; object-src \'self\'; script-src \'self\' \'unsafe-inline\' https://ssl.google-analytics.com https://www.google-analytics.com; style-src \'self\' \'unsafe-inline\';',
location: 'http://gh-contractor-zcbenz.s3.amazonaws.com/atom-shell/dist/v0.22.0/node-v0.22.0.tar.gz',
'content-type': 'text/html; charset=utf-8',
'cache-control': 'no-cache',
'set-cookie': [ 'request_method=GET; path=/; secure' ],
'x-request-id': '5c25953b-3419-4434-a6e2-86a90109fa89',
'x-runtime': '0.015554',
'transfer-encoding': 'chunked',
via: '1.1 vegur' }
REQUEST make request http://gh-contractor-zcbenz.s3.amazonaws.com/atom-shell/dist/v0.22.0/node-v0.22.0.tar.gz
gyp WARN install got an error, rolling back install
gyp verb command remove [ '0.22.0' ]
gyp verb remove using node-gyp dir: /home/hannesna/.atom/.node-gyp/.node-gyp
gyp verb remove removing target version: 0.22.0
gyp verb remove removing development files for version: 0.22.0
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" "--verbose" "--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
+1 what @h-no said. I have the exact same error.
Getting this as well. Im behind a proxy and have correct config. I can browse packages from atom but install throws the gyp error.
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
Same here. Seems like gyp forgets proxy after redirection.
After manually running gyp with modified --disturl to get atom-shell 0.22.0 installed, it's working fine.
@fujisaks Can you detail how you got this to work? I'm on severly outdated packages now because I can't upgrade.
@noseglid OK. Here is what I typed:
(It's taken from my bash history, so don't forget to change the paths/proxy before you try)
$ HOME=~/.atom/.node-gyp/ "/Applications/Atom.app/Contents/Resources/app/apm/bin/node" "/Applications/Atom.app/Contents/Resources/app/apm/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "install" "--target=0.22.0" "--dist-url=http://gh-contractor-zcbenz.s3.amazonaws.com/atom-shell/dist" "--arch=x64" "--ensure" "--verbose" "--proxy=http://proxy:80"
It bypasses redirection and should make apm work until next atom-shell release.
@fujisaks Thanks so much. I modified your command for linux and it worked. This is what I did (Ubuntu 14.04):
HOME=~/.atom/.node-gyp/ /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=http://gh-contractor-zcbenz.s3.amazonaws.com/atom-shell/dist" "--arch=x64" "--ensure" "--verbose" "--proxy=http://proxy:80"
Thanks @fujisaks Works like a charm here! The only thing I needed to change was the proxy.
Thanks @fujisaks This fixes my issue #337.
BTW, I installed Atom using the .deb file (Ubuntu 14.04). I had to change the paths a bit. My command looks like
HOME=~/.atom/.node-gyp/ /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.22.0" "--dist-url=http://gh-contractor-zcbenz.s3.amazonaws.com/atom-shell/dist" "--arch=x64" "--ensure" "--verbose" "--proxy=http://proxy:80"
Thanks for the workaround guys, having the same problem here after coming back from vacation.
So this issue has been around for a month now, any way to give this some priority? I know, only enterprises suffer from this problem, but not being able to install a single atom package kind of sucks.
+1 (and referenced 2 other duplicates)
I have been dealing with this issue for a week now and @fujisaks just saved me a total OS reinstall.
I can confirm this is working for Windows 7 x64 also. Had to change the paths of course but it works.
Here is the command I used using GIT BASH (won't work in CMD or Powershell without some work to update the paths but that should be easy)
Make sure you replace the {...} with your username and proxy settings.
HOME=/c/Users/{your_user}/.atom/.node-gyp/ /c/Users/{your_user}/AppData/Local/atom/app-0.192.0/resources/app/apm/bin/node /c/Users/{your_user}/AppData/Local/atom/app-0.192.0/resources/app/apm/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js "install" "--target=0.22.0" "--dist-url=http://gh-contractor-zcbenz.s3.amazonaws.com/atom-shell/dist" "--arch=x64" "--ensure" "--verbose" "--proxy=http://{your_proxy}:{proxy_port}"
Since atom 0.194.0 im unable to update packages through apm update same with install.
Here the last lines $ apm update --verbose:
REQUEST onRequestResponse https://atom.io/api/packages/minimap 200 { server: 'Cowboy',
connection: 'close',
date: 'Thu, 23 Apr 2015 07:07:44 GMT',
status: '200 OK',
'strict-transport-security': 'max-age=631152000',
'x-frame-options': 'DENY',
'x-xss-protection': '1; mode=block',
'x-content-type-options': 'nosniff',
'content-security-policy': 'default-src \'self\'; connect-src \'self\'; font-src \'self\'; frame-src \'self\'; img-src https://* \'self\' data:; media-src \'none\'; object-src \'self\'; script-src \'self\' \'unsafe-inline\' https://ssl.google-analytics.com https://www.google-analytics.com; style-src \'self\' \'unsafe-inline\';',
'content-type': 'application/json; charset=utf-8',
etag: '"7bc5c431b9c8d46a684fed9c1194726d"',
'cache-control': 'max-age=0, private, must-revalidate',
'x-request-id': '7f08db86-f496-4471-8902-9149723684c9',
'x-runtime': '0.310628',
'x-rack-cache': 'miss',
via: '1.1 vegur' }
REQUEST finish init function https://atom.io/api/packages/minimap
REQUEST response end https://atom.io/api/packages/linter 200 { server: 'Cowboy',
connection: 'close',
date: 'Thu, 23 Apr 2015 07:07:44 GMT',
status: '200 OK',
'strict-transport-security': 'max-age=631152000',
'x-frame-options': 'DENY',
'x-xss-protection': '1; mode=block',
'x-content-type-options': 'nosniff',
'content-security-policy': 'default-src \'self\'; connect-src \'self\'; font-src \'self\'; frame-src \'self\'; img-src https://* \'self\' data:; media-src \'none\'; object-src \'self\'; script-src \'self\' \'unsafe-inline\' https://ssl.google-analytics.com https://www.google-analytics.com; style-src \'self\' \'unsafe-inline\';',
'content-type': 'application/json; charset=utf-8',
etag: '"2bb48308bc26235b6ce825b8530ead54"',
'cache-control': 'max-age=0, private, must-revalidate',
'x-request-id': 'ea6b45bd-93f1-4fee-ba7a-22e19da43d96',
'x-runtime': '0.207869',
'x-rack-cache': 'miss',
via: '1.1 vegur' }
REQUEST end event https://atom.io/api/packages/linter
REQUEST has body https://atom.io/api/packages/linter 63812
REQUEST emitting complete https://atom.io/api/packages/linter
REQUEST response end https://atom.io/api/packages/minimap 200 { server: 'Cowboy',
connection: 'close',
date: 'Thu, 23 Apr 2015 07:07:44 GMT',
status: '200 OK',
'strict-transport-security': 'max-age=631152000',
'x-frame-options': 'DENY',
'x-xss-protection': '1; mode=block',
'x-content-type-options': 'nosniff',
'content-security-policy': 'default-src \'self\'; connect-src \'self\'; font-src \'self\'; frame-src \'self\'; img-src https://* \'self\' data:; media-src \'none\'; object-src \'self\'; script-src \'self\' \'unsafe-inline\' https://ssl.google-analytics.com https://www.google-analytics.com; style-src \'self\' \'unsafe-inline\';',
'content-type': 'application/json; charset=utf-8',
etag: '"7bc5c431b9c8d46a684fed9c1194726d"',
'cache-control': 'max-age=0, private, must-revalidate',
'x-request-id': '7f08db86-f496-4471-8902-9149723684c9',
'x-runtime': '0.310628',
'x-rack-cache': 'miss',
via: '1.1 vegur' }
REQUEST end event https://atom.io/api/packages/minimap
REQUEST has body https://atom.io/api/packages/minimap 80862
REQUEST emitting complete https://atom.io/api/packages/minimap
Request for package information failed: tunneling socket could not be established, cause=Parse Error
Seems that node-gyp isn't following the 302 Redirect sent by atom.io.
@fujisaks Thanks for pointing to the problem!
I've been able to workaround the issue by setting the ATOM_NODE_URL env variable to the new url (after redirect ). This should also be working after you update Atom. However, remove the entry when the bug gets fixed!
Windows temporary:
set ATOM_NODE_URL=http://gh-contractor-zcbenz.s3.amazonaws.com/atom-shell/dist
Windows permanently:
setx ATOM_NODE_URL http://gh-contractor-zcbenz.s3.amazonaws.com/atom-shell/dist /M
Linux
export ATOM_NODE_URL=http://gh-contractor-zcbenz.s3.amazonaws.com/atom-shell/dist
Thanks TedThiCo, this workaround worked for me (Win7x64).
It looks like the root cause of this problem has not been pointed out. Here's what going on:
avril 29 17:12:24 <redacted> cntlm[10008]: 127.0.0.1 CONNECT atom.io:443
avril 29 17:12:27 <redacted> cntlm[10008]: 127.0.0.1 CONNECT gh-contractor-zcbenz.s3.amazonaws.com:80
It looks like that when supplied an https URL that returns a redirect to an http address, apm uses a CONNECT method on the proxy instead of issuing a GET. As expected, most proxies will reject this.
:heart: @TedThiCo, that did the trick!
@TedThiCo respect, It solved the problem.
Thanks @TedThiCo, you just made my day :-)
Thanks! @TedThiCo Had this issue since day 1 of using Atom (0.179?)
Was able to update my packages.
$ apm --version
apm 0.167.0
npm 2.5.1
node 0.10.35
python 2.7.9
git 2.3.4
@nixar Got a workaround or opened issue on related repos for that problem? I've tried the workarounds from both @noseglid and @TedThiCo, and still it fails when I tried to install atom-ctags. Other packages updated just fine.
It made request to atom.io:
REQUEST make request https://atom.io/download/atom-shell/nan-1.6.1.tgz
REQUEST onRequestResponse https://atom.io/download/atom-shell/nan-1.6.1.tgz 302 { server: 'Cowboy',
connection: 'close',
date: 'Mon, 01 Jun 2015 09:00:27 GMT',
status: '302 Found',
'strict-transport-security': 'max-age=631152000',
'x-frame-options': 'DENY',
'x-xss-protection': '1; mode=block',
'x-content-type-options': 'nosniff',
'content-security-policy': 'default-src \'self\'; connect-src \'self\'; font-src \'self\'; frame-src \'self\'; img-src https://* \'self\' data:; media-src \'none\'; object-src \'self\'; script-src \'self\' \'unsafe-inline\' https://ssl.google-analytics.com https://www.google-analytics.com; style-src \'self\' \'unsafe-inline\';',
location: 'http://gh-contractor-zcbenz.s3.amazonaws.com/atom-shell/dist/nan-1.6.1.tgz',
'content-type': 'text/html; charset=utf-8',
'cache-control': 'no-cache',
'x-request-id': 'f7290bfe-a061-4d91-b7cb-397df3842f5d',
'x-runtime': '0.018494',
'x-rack-cache': 'miss',
via: '1.1 vegur' }
Got redirected:
REQUEST redirect http://gh-contractor-zcbenz.s3.amazonaws.com/atom-shell/dist/nan-1.6.1.tgz
REQUEST redirect to http://gh-contractor-zcbenz.s3.amazonaws.com/atom-shell/dist/nan-1.6.1.tgz
REQUEST {}
REQUEST response end http://gh-contractor-zcbenz.s3.amazonaws.com/atom-shell/dist/nan-1.6.1.tgz 302 { server: 'Cowboy',
connection: 'close',
date: 'Mon, 01 Jun 2015 09:00:27 GMT',
status: '302 Found',
'strict-transport-security': 'max-age=631152000',
'x-frame-options': 'DENY',
'x-xss-protection': '1; mode=block',
'x-content-type-options': 'nosniff',
'content-security-policy': 'default-src \'self\'; connect-src \'self\'; font-src \'self\'; frame-src \'self\'; img-src https://* \'self\' data:; media-src \'none\'; object-src \'self\'; script-src \'self\' \'unsafe-inline\' https://ssl.google-analytics.com https://www.google-analytics.com; style-src \'self\' \'unsafe-inline\';',
location: 'http://gh-contractor-zcbenz.s3.amazonaws.com/atom-shell/dist/nan-1.6.1.tgz',
'content-type': 'text/html; charset=utf-8',
'cache-control': 'no-cache',
'x-request-id': 'f7290bfe-a061-4d91-b7cb-397df3842f5d',
'x-runtime': '0.018494',
'x-rack-cache': 'miss',
via: '1.1 vegur' }
Then eventually got stuck on the request to http://gh-contractor-zcbenz.s3.amazonaws.com/atom-shell/dist/nan-1.6.1.tgz again, and ended up with error npm ERR! fetch failed https://atom.io/download/atom-shell/nan-1.6.1.tgz.
Hi!
Same issue here, only with atom-ctags. I could update other packages just fine.
Cheers!
@TedThiCo's trick works on Mac too.
Hi,
Same issue(s) here. First one I could solve using the workaraound proposed by @TedThiCo (Thanks!).
However I still get the error about nan-1.6.1.tgz when trying to install e.g. markdown-preview-plus.
Hope this issue gets fixed soon.
Thanks.
Cheers
Thanks
Thanks @TedThiCo your solution worked!
Using @TedThiCo solution with https solved my problem. Pretty sure the redirecting from secure to insecure was getting blocked by my work network.
Works for me too. Thanks.
Yesterday my Atom updated itself to version 1.0.2. Unfortunately it looks like the proxy support now is completely broken. Atom 1.0.0 worked fine (using the workaround described above).
All that I get is following error message when trying to update or install packages:
Request for package information failed: tunneling socket could not be established, cause=Parse Error
Does anyone have a clue?
Btw.: I'm using a company proxy with authentification enabled in .apmrc
Hmmm.
Could be that this error message is emitted in case the password for the proxy auth is wrong. At least I realized that in my .apmrc there was still the old PW preset. After fixing the pw the error message is gone.
Would it probably be possible to improve the error message?
The redirect fix worked for me too - using Windows and cntlm.
This worked for me on a Mac:
export ATOM_NODE_URL=http://gh-contractor-zcbenz.s3.amazonaws.com/atom-shell/dist
But the issue is still present, will there be a proper fix for this?
@TedThiCo Dude, you save my day! Thank you very very much!
"TedThiCo commented on Apr 26" <- Confirmed fixed my proxy problem with redirect on Atom v1.0.2 with installing atom-typescript on Windows 7:
setx ATOM_NODE_URL http://gh-contractor-zcbenz.s3.amazonaws.com/atom-shell/dist /M
set ATOM_NODE_URL http://gh-contractor-zcbenz.s3.amazonaws.com/atom-shell/dist
--- Then run the update in verbose mode
apm.cmd.lnk install atom-typescript --verbose
_Thanks a lot!_
The workaround doesn't work for me. There are error messages about the redirected amazonaws url and tunneling socket could not be established.
d:\tools\atom\packages>set ATOM_NODE_URL=http://gh-contractor-zcbenz.s3.amazonaws.com/at
om-shell/dist
d:\\tools\atom\packages\atom-project-manager-master>apm config list
; cli configs
globalconfig = "C:\\Users\\myusername\\.atom\\.apm\\.apmrc"
user-agent = "npm/2.5.1 node/v0.10.35 win32 ia32"
userconfig = "C:\\Users\\myusername\\.atom\\.apmrc"
; userconfig C:\Users\myusername\.atom\.apmrc
https-proxy = "https://COMPANY_SERVER:8080/"
; globalconfig C:\Users\myusername\.atom\.apm\.apmrc
cache = "C:\\Users\\myusername\\.atom\\.apm"
; node bin location = C:\Users\myusername\AppData\Local\atom\app-1.0.2\resources\app\apm\bin\node.exe
; cwd = d:\tools\atom\packages\atom-project-manager-master
; HOME = C:\Users\myusername
; 'npm config ls -l' to show all defaults.
d:\tools\atom\packages\atom-project-manager-master>apm install --check
Checking for native build tools failed
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | win32 | ia32
gyp http GET http://gh-contractor-zcbenz.s3.amazonaws.com/atom-shell/dist/v0.22.0/node-v0.22.0.tar.g
z
gyp WARN install got an error, rolling back install
gyp
d:\tools\atom\packages>apm install project-manager
Installing project-manager to C:\Users\myusername\.atom\packages failed
Request for package information failed: tunneling socket could not be established, cause=socket hang
up (5 attempts) (ECONNRESET)
Installed atom from scratch on Win7 and set up a proxy in apmrc - package search works fine. But I still unable to install packages - I get Parse Error after redirects. The workarounds mentioned above do not work (I do not see any msg from gyp). I've added some console.logs to npm/request/tunnel-agent library. Request settings for the secure socket before and after the redirect seem to be identical and look like this:
Request =================
{ options:
{ proxy:
{ host: 'proxyhost',
port: 80,
proxyAuth: null,
headers: [Object] },
headers:
{ 'User-Agent': 'npm/2.5.1 node/v0.10.35 win32 ia32',
host: 'codeload.github.com' },
ca: undefined,
cert: undefined,
key: undefined,
passphrase: undefined,
pfx: undefined,
ciphers: undefined,
rejectUnauthorized: false,
secureOptions: undefined,
secureProtocol: undefined },
proxyOptions:
{ host: 'proxy',
port: 80,
proxyAuth: null,
headers:
{ 'User-Agent': 'npm/2.5.1 node/v0.10.35 win32 ia32',
host: 'codeload.github.com:443' } },
maxSockets: 5,
requests: [],
sockets: [ {} ],
_events: { free: [Function: onFree] },
request: [Function],
createSocket: [Function: createSecureSocket] }
{ host: 'proxy',
port: 80,
proxyAuth: null,
headers:
{ 'User-Agent': 'npm/2.5.1 node/v0.10.35 win32 ia32',
host: 'codeload.github.com:443' },
method: 'CONNECT',
path: 'codeload.github.com:443',
agent: false }
REQUEST response end https://codeload.github.com/atom-minimap/minimap/legacy.tar.gz/v4.12.1 302 { server: 'Cowboy',
connection: 'close',
date: 'Mon, 27 Jul 2015 18:48:49 GMT',
status: '302 Found',
'strict-transport-security': 'max-age=631152000',
'x-frame-options': 'DENY',
'x-xss-protection': '1; mode=block',
'x-content-type-options': 'nosniff',
'content-security-policy': 'default-src \'self\'; connect-src \'self\'; font-src \'self\'; frame-src \'self\' https://www.youtube.com; img-src
://* \'self\' data:; media-src \'none\'; object-src \'self\'; script-src \'self\' \'unsafe-inline\' https://ssl.google-analytics.com https://www.
e-analytics.com https://platform.twitter.com; style-src \'self\' \'unsafe-inline\';',
location: 'https://codeload.github.com/atom-minimap/minimap/legacy.tar.gz/v4.12.1',
'content-type': 'text/html; charset=utf-8',
'cache-control': 'no-cache',
'x-request-id': 'a85d8dbf-e061-48e6-993c-1c68b77ec0b6',
'x-runtime': '0.106565',
'x-rack-cache': 'miss',
via: '1.1 vegur' }
{ [Error: Parse Error] bytesParsed: 200, code: 'HPE_INVALID_CONSTANT' }
Unable to download https://www.atom.io/api/packages/minimap/versions/4.12.1/tarball: tunneling socket could not be established, cause=Parse Error
I can download this file from a browser so the proxy is ok. What could be the problem?
Using goagent , worked for me!
https-proxy=http://127.0.0.1:8087/
proxy=http://127.0.0.1:8087/
strict-ssl=false
@TedThiCo solved my issue as well.
Win8.1 behind corporate proxy
+1 @TedThiCo solution solved the problem. Windows 7 beghind a corporate proxy
Eureka!! @TedThiCo works in Windows 7 x96 under corporate proxy
@TedThiCo! It works.
I am on Windows 7, behind corporate proxy. I did set up this temporary env as suggested by @TedThiCo. Then came back to Atom and installed package from editor! and it worked.
I have to use this everytime because, I am a non-admin user.
Windows 8.0
$ apm install coffee-compile
npm WARN invalid config https-proxy="="
npm WARN invalid config Must be a full url with 'http://'
Installing coffee-compile to C:\Users\Nima.atom\packages failed
Request for package information failed: getaddrinfo EAGAIN (EAGAIN)
+1 @TedThiCo this works on Mac, when will this actually be fixed in Atom?
@TedThiCo Fix doesn't work for me unfortunately. Is there any way of installing packages manually?
You can install packages at home and then copy .atom/packages.
Since Atom version 1.0.12 (and 1.0.13, 1.0.16, 1.0.18), I am not able to install or update any atom package.
When I use Atom version 1.0.11, everything works as expected.
My .apmrc
http-proxy=http://xxx:8080
https-proxy=http://xxx:8080
strict-ssl=false
Manual installation of a package with apm
> apm -v
apm 1.0.4
npm 2.13.3
node 0.10.40
python 2.7.6
git 1.9.1
> apm install atom-material-ui
Installing atom-material-ui to /home/bjoernsen/.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.30.6/node-v0.30.6.tar.gz
gyp http 500 https://atom.io/download/atom-shell/v0.30.6/node-v0.30.6.tar.gz
gyp WARN install got an error, rolling back install
gyp ERR! install error
gyp ERR! stack Error: 500 response downloading https://atom.io/download/atom-shell/v0.30.6/node-v0.30.6.tar.gz
gyp ERR! stack at Request.<anonymous> (/usr/share/atom/resources/app/apm/node_modules/npm/node_modules/node-gyp/lib/install.js:251:14)
gyp ERR! stack at Request.emit (events.js:117:20)
gyp ERR! stack at Request.onRequestResponse (/usr/share/atom/resources/app/apm/node_modules/npm/node_modules/request/request.js:992:10)
gyp ERR! stack at ClientRequest.emit (events.js:95:17)
gyp ERR! stack at HTTPParser.parserOnIncomingClient (http.js:1689:21)
gyp ERR! stack at HTTPParser.parserOnHeadersComplete [as onHeadersComplete] (http.js:122:23)
gyp ERR! stack at Socket.socketOnData (http.js:1584:20)
gyp ERR! stack at TCP.onread (net.js:528:27)
gyp ERR! System Linux 3.13.0-63-generic
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.30.6" "--dist-url=https://atom.io/download/atom-shell" "--arch=x64" "--ensure" "--proxy=http://xxx:8080/"
gyp ERR! cwd /home/bjoernsen/.atom
gyp ERR! node -v v0.10.40
gyp ERR! node-gyp -v v2.0.2
gyp ERR! not ok
I also can't install any package as well behind a proxy, tried every solution I could find in this issue and in other issues.
> apm -v
apm 1.0.4
npm 2.13.3
node 0.10.40
python 2.7.9
git 1.9.5.msysg
visual studio
my .apmrc is like
http-proxy=http://xxx:80
proxy=http://xxx:80
strict-ssl=false
and when I try to install a package this happens:
apm install -d minimap
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | win32 | ia32
gyp http GET http://gh-contractor-zcbenz.s3.amazonaws.com/atom-shell/dist/v0.22.0/node-v0.22.0.tar.gz
gyp http 403 http://gh-contractor-zcbenz.s3.amazonaws.com/atom-shell/dist/v0.22.0/node-v0.22.0.tar.gz
gyp http 403 http://gh-contractor-zcbenz.s3.amazonaws.com/atom-shell/dist/v0.22.0/node-v0.22.0.tar.gz
I already tried to access the URL http://gh-contractor-zcbenz.s3.amazonaws.com/atom-shell/dist/v0.22.0/node-v0.22.0.tar.gz and I am able to do it via the proxy.
Perhaps is something missing in my configuration?
Thank you a lot.
We aren't using a proxy here. Bringing new interns on board, having problems installing atom packages. Was working fine a few days ago.
I managed to find solution for my issue in one of threads about the same issue with npm.
So example config would look like this:
strict-ssl=false
proxy=http://domain%5Carkadiuszmakarenko:[email protected]:8080/
https-proxy=http://domain%5Carkadiuszmakarenko:[email protected]:8080/
http-proxy=http://domain%5Carkadiuszmakarenko:[email protected]:8080/
Thanks @TedThiCo
Thanks @arkadiuszmakarenko, that trick worked for me :+1:
Also got this.
@nixar already detailed the source of the problem https://github.com/atom/apm/issues/322#issuecomment-97462141 - I also see this in our squid.
Thank you @arkadiuszmakarenko it worked for me!
Well I did some digging and as nixar pointed out in https://github.com/atom/apm/issues/322#issuecomment-97462141, the issue may be due to the request module that is used to retrieve the packages behaving like this:
If your endpoint is an https url, and you are using a proxy, then request will send a CONNECT request to the proxy server first, and then use the supplied connection to connect to the endpoint.
So, the solution here is to pray to the gods of code that the request module has an option to do not behave like this, and make the request using GET as @nixar pointed out.
Do you think this workaround would work for atom?
http://stackoverflow.com/questions/18569054/npm-behind-ntlm-proxy
Workaround provide by @TedThiCo works for me, Win7x64 behind company proxy.
I can also confirm that https://github.com/atom/apm/issues/322#issuecomment-96430856 solves the problem!
Thanks @TedThiCo, you save my life!It works!
@kreyssel I added export ATOM_NODE_URL=http://gh-contractor-zcbenz.s3.amazonaws.com/atom-shell/dist to my bashrc, but still no use.
Could you please tell me where do I add this line?
@TedThiCo fix in https://github.com/atom/apm/issues/322#issuecomment-96430856 is not working for me. If I browse http://gh-contractor-zcbenz.s3.amazonaws.com/atom-shell/dist from the browser, I get this:
<Error>
<Code>AccessDenied</Code>
<Message>Access Denied</Message>
<RequestId>F04A5587F708A776</RequestId>
<HostId>
nYYF4iE/ORNdhUdrs1EwJh2ig+K6Jyd0tX+K1EyotVq2fvlRSUP7trkAuCnDUCPKse8oDJdpMZY=
</HostId>
</Error>
This should be fixed upstream: https://github.com/request/request/pull/1894
If you're impatient and want to get the fix linked by @schlamar into apm _now_, here's how I went about it:
~/.atom/.apmrc file. Mine looks like https-proxy = http://webproxy.companyname.com:3128. Note the http at the beginning!dirnamenpm install dirname.request is. Mine was at /usr/share/atom/resources/app/apm/node_modules/npm/node_modules/request. The pathname should be given in the 'Error: tunneling socket could not be established' that a lot of people seem to get.rm -rf atom_request_dirname).request is. Mine was at /usr/lib/node_modules/request, which I found using npm list -g. request into the old location of atom's request (cp -r node_request_dirname atom_request_dirname).apm. Someone who isn't a complete newbie with Linux/atom (could probably)/(will hopefully) give a more concise way of doing things, but this is what worked for me.
Thanks for the idea @andyljones!
By the way, the fix has just been released in 2.66.0.
So you can run npm install -g [email protected] instead of cloning request repo, then proceed with copiyng as @andyljones suggests. Solved my problem.
Ahh, it finally works! With the latest request it just magically works for me. Tried a lot of other workarounds with no luck.
Now you can run npm install [email protected] in your Atom's npm directory.
You will need to run this command again when you update Atom(w/o [email protected]~).

Ok, so it looks like npm has to be updated to a version that includes the updated request module. Unfortunately, the latest version of npm is still using 2.65.0, so it looks like we'll have to wait a while :watch:.
None of these solutions had worked for me but simply installing the latest NPM on my Windows machine and then adding the proxy configs got things working.
npm config set proxy http://<username>:<password>@<proxy>:<port>
npm config set https-proxy http://<username>:<password>@<proxy>:<port>
@falms :+1: your solution worked for me
@counghy It works. :+1:
Under corporate proxy, with npm, apm and git proxies working OK and all the tools updated the error is raising again
Ξ» node -v
v5.1.0
Ξ» npm -v
3.5.0
Ξ» atom -v
1.3.0-beta6
Ξ» apm -v
apm 1.4.1
npm 2.13.3
node 0.10.40
python 2.7.10
git 2.6.1.windows.1
visual studio 2013
@counghy fix works :+1:
Solution given by @andyljones and @andyljones works like the charm!! Thanks guys!
I don't know if it was falms solution, for sure after installing it and set:
apm config set proxy http://user:password@proxy:port
apm config set https-proxy http://user:password@proxy:port
I could find packages through atom
Thanks to @TedThiCo (https://github.com/atom/apm/issues/322#issuecomment-96430856). The issue get solved with Windows 8.1 and 1.4.0-beta3.
looks like npm 3.5.3 depends on request ~2.67.0, so that should hopefully not be a blocker anymore!
https://github.com/npm/npm/releases/tag/v3.5.3
Thanks @TedThiCo - I've been living without being able to install packages on a corporate laptop for a while now, I'd already setup the proxy - adding the environment variables worked for me.
it seems this issue is cheerfully haunting into 2016. Anyway, the export ATOM_NODE_URL=http://gh-contractor-zcbenz.s3.amazonaws.com/atom-shell/dist did the trick.
@50Wliu The time has come! Both [email protected] and [email protected] are using [email protected] :tada:
Updating to [email protected] did the trick for me in atom 1.4.1 on windows 7 behind corporate proxy, thanks @falms!
atom 1.4.1 on windows 7 64-bit behind corporate proxy with @falms fix: packages can update now, confirmed!
@TedThiCo It did the job. Thanks for the workaround.
Thanks @TedThiCo :+1:
Thanks @TedThiCo, worked for me as well! :+1:
Maddening that this is still happening. Thanks to those who took the time to solve it; I've had to come back to this post at least three times to re-fix the problem after updating or installing on another computer. I'm not sure if @TedThiCo had the final answer I seem to recall it worked the first time. I tried it this time and it didn't work at first. @andyljones and @falms work arounds did the trick for me--maybe only after @TedThiCo's... maybe next time I have to do this (hopefully there isn't a next time) I'll omit @TedThiCo's and see if it goes without it.
I am also facing the same problem.
Here is the Error
dexterβ~Β» apm install tabs-to-spaces --verbose [19:25:30]
Installing tabs-to-spaces to /home/dexter/.atom/packages REQUEST { url: 'https://atom.io/api/packages/tabs-to-spaces',
json: true,
retries: 4,
proxy: 'https://heed:[email protected]:3128/',
strictSSL: true,
headers: { 'User-Agent': 'npm/2.13.3 node/v0.10.40 linux x64' },
callback: [Function],
method: 'GET' }
REQUEST make request https://atom.io/api/packages/tabs-to-spaces
REQUEST { url: 'https://atom.io/api/packages/tabs-to-spaces',
json: true,
retries: 4,
proxy: 'https://heed:[email protected]:3128/',
strictSSL: true,
headers: { 'User-Agent': 'npm/2.13.3 node/v0.10.40 linux x64' },
callback: [Function],
method: 'GET' }
REQUEST make request https://atom.io/api/packages/tabs-to-spaces
REQUEST { url: 'https://atom.io/api/packages/tabs-to-spaces',
json: true,
retries: 4,
proxy: 'https://heed:[email protected]:3128/',
strictSSL: true,
headers: { 'User-Agent': 'npm/2.13.3 node/v0.10.40 linux x64' },
callback: [Function],
method: 'GET' }
REQUEST make request https://atom.io/api/packages/tabs-to-spaces
REQUEST { url: 'https://atom.io/api/packages/tabs-to-spaces',
json: true,
retries: 4,
proxy: 'https://heed:[email protected]:3128/',
strictSSL: true,
headers: { 'User-Agent': 'npm/2.13.3 node/v0.10.40 linux x64' },
callback: [Function],
method: 'GET' }
REQUEST make request https://atom.io/api/packages/tabs-to-spaces
REQUEST { url: 'https://atom.io/api/packages/tabs-to-spaces',
json: true,
retries: 4,
proxy: 'https://heed:[email protected]:3128/',
strictSSL: true,
headers: { 'User-Agent': 'npm/2.13.3 node/v0.10.40 linux x64' },
callback: [Function],
method: 'GET' }
REQUEST make request https://atom.io/api/packages/tabs-to-spaces
β
Request for package information failed: tunneling socket could not be established, cause=140010917041984:error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol:../deps/openssl/openssl/ssl/s23_clnt.c:782:
(5 attempts) (ECONNRESET)
This is my config list
dexterβ~Β» apm config list [19:25:36]
zsh: correct 'config' to '.config' [nyae]? n
; cli configs
globalconfig = "/home/dexter/.atom/.apm/.apmrc"
user-agent = "npm/2.13.3 node/v0.10.40 linux x64"
userconfig = "/home/dexter/.atom/.apmrc"
; userconfig /home/dexter/.atom/.apmrc
http-proxy = "http://heed:[email protected]:3128/"
https-proxy = "https://heed:[email protected]:3128/"
; globalconfig /home/dexter/.atom/.apm/.apmrc
cache = "/home/dexter/.atom/.apm"
; node bin location = /opt/atom/resources/app/apm/bin/node
; cwd = /home/dexter
; HOME = /home/dexter/.atom/.node-gyp
; 'npm config ls -l' to show all defaults.
versions of dependencies
dexterβ~Β» apm -v [19:28:52]
apm 1.5.0
npm 2.13.3
node 0.10.40
python 3.5.1
git 2.5.0
Workaround from dfcsoftware works. Thanks!
However, if you use that, you need to remove any proxy settings made, otherwise you get the tunnel issue mentioned by qqquan
Thanks @TedThiCo , the workaround works for me On Mac.
export ATOM_NODE_URL=http://gh-contractor-zcbenz.s3.amazonaws.com/atom-shell/dist
+1. Any update on this bug (after almost one year now) ?
Thanks, It solved problem.(Solved After the npm proxy settings.)
It seems like an npm bump from the current 2.13.3 to >=2.14.15 or >=3.5.3 (as @falms pointed out) would solve this permanently, no?
Please note that ATOM_NODE_URL is deprecated. The correct env var is now ATOM_ELECTRON_URL
I've updated @TedThiCo's solution:
I've been able to workaround the issue by setting the
ATOM_ELECTRON_URLenv variable to
the new url (after redirect ). This should also be working after you update Atom. However, remove
the entry when the bug gets fixed!Windows temporary (cmd):
set ATOM_ELECTRON_URL=http://gh-contractor-zcbenz.s3.amazonaws.com/atom-shell/distWindows permanently (cmd):
setx ATOM_ELECTRON_URL http://gh-contractor-zcbenz.s3.amazonaws.com/atom-shell/dist /MSh/Bash (Linux/Mac):
export ATOM_ELECTRON_URL=http://gh-contractor-zcbenz.s3.amazonaws.com/atom-shell/dist
I still have the issue on Windows 7x64 behind a proxy:
Searching for βatom-live-serverβ failed.Hide outputβ¦
tunneling socket could not be established, cause=11408:error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol:openssl\ssl\s23_clnt.c:782:
Things I've tried:
proxy=http://my-proxy.com:8088
http-proxy=http://my-proxy.com:8088
https-proxy=https://my-proxy.com:8088
strict-ssl=false
apm config set proxy http://my-proxy.com:8088
apm config set https-proxy https://my-proxy.com:8088
npm config set proxy http://my-proxy.com:8088
npm config set https-proxy https://my-proxy.com:8088
set ATOM_ELECTRON_URL=http://gh-contractor-zcbenz.s3.amazonaws.com/atom-shell/dist
setx ATOM_ELECTRON_URL http://gh-contractor-zcbenz.s3.amazonaws.com/atom-shell/dist /M
Are there any other possible solutions I could try? Is there a way to install packages manually, like extracting to a folder instead of using APM? (can't run npm/apm install because of the proxy issue)
Thanks
@filipegorges Using http://my-proxy.com:8088 (not https) for all including https-proxy might solve the problem.
@falms You have no idea how long I was stuck on this! I owe you a beer man, thanks a lot!
This seemed to work:
export ATOM_NODE_URL=http://gh-contractor-zcbenz.s3.amazonaws.com/atom-shell/dist
Fixed this issue by using
apm config set https-proxy http://127.0.0.1:7070
Change the key to your proxy url.
sivan's solution worked for me.
Note that you nee to set https-proxy (with dash) in oppose to https_proxy (with underscore) which used by number of other apps.
Here are some solutions:
apm config set https-proxy http://127.0.0.1:7070If you are using hosts, you'd better use https instead of http for ATOM_NODE_URL, e.g.
export ATOM_NODE_URL=https://gh-contractor-zcbenz.s3.amazonaws.com/atom-shell/dist
Here are a few notes I took when dealing and solving this problem in the past:
apm config set ftp-proxy ftp://proxy:8080
apm config set http-proxy http://proxy:8080
apm config set https-proxy https://proxy:8080
apm config set proxy http://proxy:8080
apm config set strict-ssl=false
-or try this-
npm config set registry "http://registry.npmjs.org/"
npm --proxy http://username:password@proxy...:port install <package name>
export ATOM_NODE_URL=http://gh-contractor-zcbenz.s3.amazonaws.com/atom-shell/dist
apm config list
npm config ls -l
apm config edit
node-gyp configure --proxy=http://proxy:8080
in Windows:
notepad %userprofile%\.npmrc
-or-
notepad %userprofile%\.atom\.apmrc
in Linux:
vi ~/.npmrc
-or-
vi ~\.atom\.apmrc
File contents:
ftp-proxy=http://proxy:8088
http-proxy=http://proxy:8088
https-proxy=http://proxy:8088
proxy=http://proxy:8088
strict-ssl=false
apm link
C:\Users\pt100314\.atom>apm install editor-stats --unsafe
Installing editor-stats to C:\Users\pt100314\.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.34.5/node-v0.34.5.tar.gz
gyp WARN install got an error, rolling back install
gyp
Seems that node-gyp isn't following the 302 Redirect sent by atom.io.
The workaround to this issue is setting the ATOM_NODE_URL env variable to the new url (after redirect ). This should also be working after you update Atom. However, remove the entry when the bug gets fixed!
Windows temporary:
set ATOM_NODE_URL=http://gh-contractor-zcbenz.s3.amazonaws.com/atom-shell/dist
Windows permanently (execute "cmd" with "Run as Administrator"):
setx ATOM_NODE_URL http://gh-contractor-zcbenz.s3.amazonaws.com/atom-shell/dist /M
Linux:
export ATOM_NODE_URL=http://gh-contractor-zcbenz.s3.amazonaws.com/atom-shell/dist
I'm having this problem when I try to install a package but my network does not have a proxy. What can I do?
[~] sudo apm install autocomplete-ionic2-framework --verbose
Installing autocomplete-ionic2-framework to /home/accurate/.atom/packages REQUEST { url: 'https://atom.io/api/packages/autocomplete-ionic2-framework',
json: true,
retries: 4,
strictSSL: true,
headers: { 'User-Agent': 'npm/2.13.3 node/v0.10.40 linux x64' },
callback: [Function],
method: 'GET' }
REQUEST make request https://atom.io/api/packages/autocomplete-ionic2-framework
βRequest for package information failed: getaddrinfo ENOTFOUND (ENOTFOUND)
My APM Config is:
[~] apm config ls
; cli configs
globalconfig = "/home/accurate/.atom/.apm/.apmrc"
user-agent = "npm/2.13.3 node/v0.10.40 linux x64"
userconfig = "/home/accurate/.atom/.apmrc"
; globalconfig /home/accurate/.atom/.apm/.apmrc
cache = "/home/accurate/.atom/.apm"
; node bin location = /usr/share/atom/resources/app/apm/bin/node
; cwd = /home/accurate
; HOME = /home/accurate/.atom/.node-gyp
; 'npm config ls -l' to show all defaults.
By now, I've already tried all the possible solutions listed here and none of that worked.
If you under a proxy or firewall and can't install a package by using
apm install <package_name>
try to instead of
apm install <git_remote>
@TedThiCo you saved my day
I had the same problem, I solved using this variable:
Windows temporary:
set ATOM_NODE_URL=http://gh-contractor-zcbenz.s3.amazonaws.com/atom-shell/dist
Windows permanently:
set ATOM_NODE_URL=http://gh-contractor-zcbenz.s3.amazonaws.com/atom-shell/dist /M
Linux
export ATOM_NODE_URL=http://gh-contractor-zcbenz.s3.amazonaws.com/atom-shell/dist
Since this problem still seems to exist, I tried to run the commands posted here a while ago.
My OS is Windows and I used git bash to run the commands
With the current node version 0.36.8 the commands look like this:
HOME=/c/Users/
Afterwards apm update worked again.
It seems like an npm bump from the current 2.13.3 to >=2.14.15 or >=3.5.3 (as @falms pointed out) would solve this permanently, no?
Any comment from the maintainers on this? Can we just get this fixed instead of requiring workarounds?
@eatdrinksleepcode The core Atom team is currently understaffed - there are two developers out on paternity leave right now. As such we've had to prioritize certain issues over others.
If anyone wants to experiment with updating the npm version to >=2.14.5 (but <3), feel free to create a PR, but be aware that it might take a while for us to review/test it properly.
@50Wliu understood, thanks for the response.
@TedThiCo Thanks for your workaround, which a bazillion years after you posted it, still appears to be required to install npm packages on a normal install of Windows 7 that uses a proxy.
:tada:
For what it's worth, I managed to get both apm install and the Atom GUI to search and install packages behind our companys proxy, oddly by removing all of the proxy settings from apmrc-file. I had to leave the strict-ssl=false in there.
On Ubuntu 15.10 with:
$ apm --version
apm 1.9.2
npm 2.13.3
node 0.10.40
python 2.7.10
git 2.5.0
I have the proxy set in the environmental variables, but am still unsure whether they are used by Atom or apm.
This is what it looks like now:
$ cat ~/.atom/.apmrc
strict-ssl = false
and that's it. I have no idea why it works. The install --verbose outputs nothing related to the proxy.
As stated here this issue seems not to be solved ... at least not for Windows users.
Here is THE SOLUTION propably for many many Windows users!!!
@Atom-Team: Can u please put it in the docs or FAQs in big big BIG LETTERS and make it blink and flash and let it make noise, too :)))
This needs to be repeated:
@falms You have no idea how long I was stuck on this! I owe you a beer man, thanks a lot!
As stated here this issue seems not to be solved ... at least not for Windows users.
That's because the fix hasn't made it into a released version of Atom yet.
To be clear: this is fixed in apm versions >= 1.11.0. Here is the commit that fixes it. Note the tags and branches of apm the commit is contained in. You can run apm --version to see if you have a version of apm with this fix in it. Note that currently, Atom does not come bundled with a version of apm that has this fix. The latest beta release of Atom uses apm 1.10.0. Once atom/atom#11897 is merged and released, Atom will include a version of apm with this fix.
Note also that even after this is fixed, you're still going to need to tell apm about your proxy, as explicitly stated in the README.
Thanks @TedThiCo , the workaround works for me On window 7
export ATOM_NODE_URL=http://gh-contractor-zcbenz.s3.amazonaws.com/atom-shell/dist
As an update on what @Ajedi32 wrote, this should now be fixed in Atom 1.10.0-beta0 and above.
Yep, this is now fixed in Atom on master. The relevant commit is 3836907ee36219d32f5e12e5df07320b019fed87. The fix will be released in Atom 1.10.0.
Wow, it's been a year and the fix wasn't committed until now.
I was pulling my hair all day over this problem, thinking it was all my fault.
Now I'll have to try the fixes suggested.
Wow, it's been a year and the fix wasn't committed until now.
Yes, because it was a highly involved fix.
Now I'll have to try the fixes suggested.
Or you could just install the Atom beta: https://atom.io/beta.
Protect this issue from futher comment additions! save fellow sufferers from having to digg through issue novels ;-)
I think it would not hurt to edit initial post to point to most relevant suggestion(s)/workaround(s), too.
The actual IP 192.168.1.1 is used by a lot of wireless router companies nowadays, but at first it was made for specific manufacturers. An excellent feature of 192.168.1.1 is the fact that this specific Internet protocol address may be changed without difficulty by the client.
Source 192168ll.net
I solved this problem this way:
1) I run this command:
`npm config set strict-ssl false`
2) Then set npm to run with http, instead of https:
`npm config set registry "http://registry.npmjs.org/"`
3) Then install your package
`npm install <package name> `
I ended up using atom-beta : https://atom.io/beta
This worked for me: (Atom v.1.10.0 on Ubuntu 14.04)
1) Open the file .apmrc under the folder ~/.atom
(if you dont have this file in this location, create a new one)
2) add the following lines:
proxy = http://your_proxy:your_port
strict-ssl = false
3) save the file, and start/restart Atom
Next time Atom is started, the packages, themes, etc. should be able to be accessed from the Atom menu Settings>install
hope it helps
I have this problem but it's because I'm blocked from Amazon AWS domains where most of these files/dependencies seem to be hosted. The proxy settings do not fix this.
same here..though all or most of the package or library is open source..still it is blocked in my company proxy. because amazon s3 is bad choice for hosting and this is blocked in almost all the corporate proxy..proxy setting will not work...we need alternate mirror for these packages.
for alternate mirror see this..https://github.com/atom/apm/issues/488
I've also figured out a workaround. First I clone the repo, then I go to the dir and run "apm link" then "npm install" and it seems to work. You might want to set your repo to the latest release tag rather than just installing HEAD.
@Gemmu just went through the whole song & dance myself - your post did the trick
Update:
If there is a backslash somewhere in your address, use the html code %5C. Example:
proxy=http://domain%5Cusername:password@proxy:port
Please note that only the options proxy and https-proxy are available, http-proxy doesn't exist.
Win7 x64 behind Websense proxy and I haven't been able to use Atom at work ever (over a year).
c:_Home>apm --version
apm 1.12.9
npm 3.10.5
node 4.4.5
python 3.4.4
git 2.10.2.windows.1
visual studio 2015
c:\_Home>apm install atom-typescript --verbose
Installing atom-typescript to C:\Users\bob\.atom\packages REQUEST { url: 'https://atom.io/api/packages/atom-typescript',
json: true,
retries: 4,
proxy: 'http://194.70.42.240:8080/',
strictSSL: false,
headers: { 'User-Agent': 'npm/3.10.5 node/v4.4.5 win32 ia32' },
callback: [Function],
method: 'GET' }
REQUEST make request https://atom.io/api/packages/atom-typescript
REQUEST onRequestResponse https://atom.io/api/packages/atom-typescript 403 { date: 'Thu, 01 Dec 2016 16:38:09 GMT',
'content-type': 'text/html',
'content-length': '1777',
age: '0',
connection: 'close',
via: 'HTTPS/1.1 localhost.localdomain' }
REQUEST reading response's body
REQUEST finish init function https://atom.io/api/packages/atom-typescript
REQUEST response end https://atom.io/api/packages/atom-typescript 403 { date: 'Thu, 01 Dec 2016 16:38:09 GMT',
'content-type': 'text/html',
'content-length': '1777',
age: '0',
connection: 'close',
via: 'HTTPS/1.1 localhost.localdomain' }
REQUEST end event https://atom.io/api/packages/atom-typescript
REQUEST has body https://atom.io/api/packages/atom-typescript 1777
REQUEST invalid JSON received https://atom.io/api/packages/atom-typescript
REQUEST emitting complete https://atom.io/api/packages/atom-typescript
failed
Request for package information failed: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Connect Error</title>
<link rel="stylesheet" href="https://atom.io/%24%24%24%26%3f%26%3f%24%24%24?cmd=get_file&arg=block_style.css&sid=3F6ED4297E8135059F0421CF6723D91F89E4E341" type="text/css">
</head>
<body>
<div id="pagecontainer">
<img class="icon" src="https://atom.io/%24%24%24%26%3f%26%3f%24%24%24?cmd=get_file&arg=images/block.png&sid=FC38B9B678BA92086D7F85C2ED8D09776E203FC4"> <!--Icon for block type-->
<h1>Could not connect to server</h1>
<div class="row">
<p class="label">Overview:</p>
<p class="item">Could not connect to atom.io .</p>
</div>
<div class="row">
<p class="label">Details:</p>
<p class="item">Peer disconnected after first handshake message: Possibly SSL/TLS Protocol level is too low or unsupported on the server</p>
</div>
<div id="options">
<p class="label">Options:</p>
<form action=""><input type="button" class="button" onclick="history.back();" value=" Go Back "></form><p class="item">Pressing the button allows you to go to the previous page.</p>
<p class="last-item">You can try to reload the page or check if the URL is correct.</p>
</div>
<div><img class="logo" title="Websense" src="https://atom.io/%24%24%24%26%3f%26%3f%24%24%24?cmd=get_file&arg=images/wslogo_block_page.png&sid=743A19FC418265727385C7BDB761CF143DC832C1" alt="Websense Logo">
<div style="clear: both; overflow: hidden; height:1px;"></div>
</div>
</div>
</body>
</html>
If I navigate to http://gh-contractor-zcbenz.s3.amazonaws.com/atom-shell/dist I see
<Error><Code>AccessDenied</Code><Message>Access Denied</Message><RequestId>C8EDA23F890C4D04</RequestId><HostId>KL9l+AQ2W0B4qBQnptxgjq4HznT/aEX3GdDu/SGkYtAdTtaED8ESKUmqLudQNWXIYjQtVrYpL4Q=</HostId></Error>
Is there any hope of ever getting this to work?
Hello folks,
I just want to do a quick writeup what was the issue on my site.
We are behind a proxy / gateway here which only allows port 443 for SSL and port 80 for the rest (let's call this one http://our-proxy.corp.net:3128).
Also, we are inside an Windows Active Directory Domain (let's call it ADD), so my user for the proxy would be ADD\sneusse.
My .apmrc looks like this (random slashes are random, these are added by apm config set):
http-proxy = "http://[email protected]:3128"
https-proxy = "http://[email protected]:3128/"
proxy = "http://[email protected]:3128/"
strict-ssl = false
This exact setup is working on my dev machine, but it does not on my laptop, so what's going on here? (Well, I _do_ need to open some browser every now and then so the proxy can cache my username and password.)
It seems our proxy does neither cache credentials, nor does it allow plain authentication for devices _which are connected via WiFi_. To confirm this, i disabled WiFi and used my dev machine as a gateway and everything works.
This might me highly specific to our site, but maybe it will help somebody :)
@sneusse It's a bit confusing that the config you have provided as an example uses the default cntlm port number instead of the port numbers you say your corporate proxy is listening on. I'm not sure whether that's just because it's example config, or whether you actually have cntlm installed but didn't mention that.
Either way it seems like the issue you have might be resolved by installing cntlm since it could be configured to provide the authentication for the corporate proxy while on wifi.
@Neutrino-Sunset Well, this is the actual port the proxy is listening on (afair thats squid default, so maybe we have a squid setup? I don't know, our IT is quite far away :). About cntlm: Thanks for the hint, I'll look into that.
Why has this been closed..? I just installed a new copy of Atom on a Mac at work and I am still getting exactly the same issues installing packages: "tunneling socket could not be established, cause=Parse Error". I really want to like Atom but if this can remain unfixed for this long, I'm out. I don't have any such issues with npm on its own once I specify the proxy in the config file. Sorry, not very helpful but someone has to say it.
@madmalx What version of Atom do you have? (Run apm --version and paste the output here.)
Can you install normal NPM packages?
What output do you get when trying to install manually? (Run apm install package-name-here --verbose.)
Be careful to not confuse Atom and apm versions.
For example, I have this (I'm on Windows):
Ξ» atom --version
Atom : 1.13.0
Electron: 1.3.13
Chrome : 52.0.2743.82
Node : 6.5.0
Ξ» apm --version
apm 1.14.1
npm 3.10.5
node 4.4.5
python 2.7.12
git 1.9.4.msysgit.0
visual studio 2015
@Ajedi32 Many thanks for your response! Herewith:
apm --version =>
apm 1.14.1
npm 3.10.5
node 4.4.5
python 2.7.10
git 2.3.2
atom --version =>
Atom : 1.13.0
Electron: 1.3.13
Chrome : 52.0.2743.82
Node : 6.5.0
I attach a file with the results of trying to install via the Terminal. Yes, I can install npm packages via the Terminal with 'npm install
Interesting looks like a few of the requests are getting through the proxy, but https://codeload.github.com/emmetio/emmet-atom/legacy.tar.gz/v2.4.3 isn't. Can you curl that URL from your machine?
@Ajedi32 Well, I am no expert with curl so I have no confidence that I am getting the syntax or options right but this:
curl -x https://PROXY:PORT --proxy-user USERNAME:PASSWORD https://codeload.github.com/emmetio/emmet-atom/legacy.tar.gz/v2.4.3 --verbose
produces this:
Trying
CONNECT codeload.github.com:443 HTTP/1.1
Host: codeload.github.com:443
Proxy-Authorization: Basic=
User-Agent: curl/7.43.0
Proxy-Connection: Keep-Alive< HTTP/1.1 407 Proxy Authentication Required
< Mime-Version: 1.0
< Date: Wed, 18 Jan 2017 15:14:41 GMT
< Content-Type: text/html
< Proxy-Authenticate: NTLM
< Connection: close
< Proxy-Connection: close
< Content-Length: 2325
<
- Ignore 2325 bytes of response-body
- Received HTTP code 407 from proxy after CONNECT
- Closing connection 0
curl: (56) Received HTTP code 407 from proxy after CONNECT
So I am not sure why that is not getting through... Any ideas? :-)
Thanks...
Try: curl --proxy http://USERNAME:PASSWORD@PROXY:PORT/ --proxytunnel https://codeload.github.com/emmetio/emmet-atom/legacy.tar.gz/v2.4.3 --verbose > legacy.tar.gz
Same result...
That's odd. Received HTTP code 407 from proxy after CONNECT means your proxy is asking you to authenticate. But the USERNAME:PASSWORD bit should already be supplying that...
Wait, hold on... Proxy-Authenticate: NTLM? Hmm...
Try: curl --proxy http://USERNAME:PASSWORD@PROXY:PORT/ --proxytunnel --proxy-ntlm https://codeload.github.com/emmetio/emmet-atom/legacy.tar.gz/v2.4.3 --verbose > legacy.tar.gz
Also, this might have something to do with why apm install is failing for you, though I'm not entirely sure about that. Does anyone know if apm supports proxies which require NTLM authentication?
Woo-Hoo. That worked... :-) So it looks like you have nailed it. NTLM authentication - npm supports it and apm doesn't. -- It would appear. Or maybe not. :-)
The only problem with that theory is that apm is basically just a wrapper over the top of npm, so they really shouldn't be _that_ different. What version of npm are you running? The version used by apm is currently 3.10.5.
Yes, not the whole story... Whilst installing packages always fails I can search for and list them perfectly fine, so apm is getting through there.
apm --version
apm 1.14.1
npm 3.10.5
node 4.4.5
python 2.7.10
git 2.3.2
However... npm --version
3.10.9
Could that be the difference? I'll see if I can find the release notes.
Also, are you sure your proxy is configured exactly the same way for apm and npm? npm/npm#2119 seems to suggest npm still has this issue (closed as wontfix, essentially).
I haven't read it all yet but:
my-machine:NodeTests2 UserName$ npm install handlebars
[email protected] /Users/UserName/Sites/NodeTests2
βββ¬ [email protected]
βββ [email protected]
βββ¬ [email protected]
β βββ [email protected]
β βββ [email protected]
βββ¬ [email protected]
β βββ [email protected]
βββ¬ [email protected]
βββ [email protected]
βββ [email protected]
βββ [email protected]
βββ¬ [email protected]
βββ [email protected]
βββ¬ [email protected]
β βββ¬ [email protected]
β β βββ¬ [email protected]
β β β βββ¬ [email protected]
β β β β βββ [email protected]
β β β βββ [email protected]
β β β βββ [email protected]
β β βββ [email protected]
β βββ [email protected]
β βββ [email protected]
βββ [email protected]
βββ [email protected]
npm WARN [email protected] No repository field.
So no problems there (apart from no git repo). Yes, my .apmrc file and my .npmrc file are the same... I just copied the contents of .npmrc into apmrc, just to make sure. Same problem.
Does this happen for all apm packages? Or just emmet? Maybe try installing Cntlm and using that as your proxy. That should fix the problem for you, at least temporarily, and should confirm whether or not the problem really is specific to proxies which require NTLM authentication.
Yes, it happens for every package that I have tried. Emmet was a fairly random choice, just that it was a popular one so if there was a problem at the other end it would have been noticed by others as well. Yes, I can try that but I think we have established beyond reasonable doubt that the problem persists in apm... at least partially. Many, many thanks for your attention and help!
FWIW - I have the same issue as you're reporting @madmalx - and I'm using Cntlm already. Install will NPM, JSPM, Bower et al daily and they all work fine. APM just fails.
Got the same issue. In my case only @arkadiuszmakarenko workaround worked. It makes a user put a password in plaintext what is a major security concern, though.
I have the same problem with the just-downloaded stable package under Windows 7 x64. NPM works, APM doesn't with the very same configuration. The output is:
[...]
REQUEST { url: 'https://atom.io/api/packages/language-qml',
json: true,
retries: 4,
proxy: 'http://USER:PASSWORD@PROXY:PORT',
strictSSL: false,
headers: { 'User-Agent': 'npm/3.10.5 node/v4.4.5 win32 x64' },
callback: [Function],
method: 'GET' }
REQUEST make request https://atom.io/api/packages/language-qml failed
Request for package information failed: socket hang up (5 attempts) (ECONNRESET)
If I set ATOM_API_URL=http://atom.io/api it fails after a redirect to the https server version.
I can download the requested url with Chrome.
In my case set ATOM_NODE_URL=http://gh-contractor-zcbenz.s3.amazonaws.com/atom-shell/dist does not work either.
As for my case, even the workaround I used stopped working. How about reopening the issue?
I would like to confirm that the workaround (adding proxy info to .apmrc) doesn't work anymore since ATOM has been updated to 1.15. I believe reopening the issue is good idea.
It also stopped working for me, but I can't remember if it was before or after I upgraded to Atom 1.15.
My setup could be different, but FWIW I had to remove proxy info in my .apmrc config file, but also the HTTP_PROXY environment variable, since it's apparently used as a fallback.
I have a local proxy (Cntlm) that redirects to my corporate proxy to solve authentication problems.
And in my .apmrc config file:
strict-ssl=false
proxy=http://127.0.0.1:3128
@nxtzero Did you set Cntlm on Windows? I tried it before on 0.93.2 but the it freezes most of the time. I couldn't update/install any Atom packages. (sad)
I have version Cntlm 0.92.3 on Windows 7 (64 bits) with no problems. Just changed proxy, username, domain and password... Very rarely, like once a month, it crashes and I have to restart the service.
I believe it is still the last version on Cntlm Authentication Proxy
cntlm does not fix for me. I think the problem is the atom registry redirects to https even if asking for http.
Is it possible to set the atm registry like you can with npm?
@neclepsio Have you tried to set/unset Atom check on Settings > Core > Use Proxy Settings When Calling APM ?
And do you have strict-ssl=false and proxy=http://... on your user's directory .atom/.apm/.apmrc ?
@nxtzero Yes. I always get "socket hang up".
yep, same error behind a corporate proxy.
I can confirm the same error on 1.15 not sure, but I believe it worked with cntlm before that version.
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)
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.
+1 for this issue still existing... 407 error no matter that I try from this thread.
407 means unauthorized. You need to provide your proxy with credentials.
Usually this is in the form of http://user:pass@yourproxyaddress:port
I've tried that as well as every other iteration in this thread.
Chad try either cntlm or install on an other machine all u need and then
transfer everything onto the problematic on.
On 27 Jul 2017 9:36 a.m., "chadflorian" notifications@github.com wrote:
I've tried that as well as every other iteration in this thread.
β
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/atom/apm/issues/322#issuecomment-318363923, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AExz3fXldtLuY8UkKOXclPqV3JAIY2fEks5sSJJDgaJpZM4DuUCu
.
cntlm workaround works... but man.. what a PITA
I hear you . Nobody wants to invest time to deal with proxies - no money ,
no fame.
On 27 Jul 2017 10:42 a.m., "chadflorian" notifications@github.com wrote:
cntlm workaround works... but man.. what a PITA
β
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/atom/apm/issues/322#issuecomment-318382937, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AExz3RfWqB7Fc9nCSEfP-Hf8kJXUoQTLks5sSKG6gaJpZM4DuUCu
.
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.
The comment by gabo2000git (Sep 6, 2016) helped
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!!!
Most helpful comment
Seems that node-gyp isn't following the 302 Redirect sent by atom.io.
@fujisaks Thanks for pointing to the problem!
I've been able to workaround the issue by setting the ATOM_NODE_URL env variable to the new url (after redirect ). This should also be working after you update Atom. However, remove the entry when the bug gets fixed!
Windows temporary:
set ATOM_NODE_URL=http://gh-contractor-zcbenz.s3.amazonaws.com/atom-shell/distWindows permanently:
setx ATOM_NODE_URL http://gh-contractor-zcbenz.s3.amazonaws.com/atom-shell/dist /MLinux
export ATOM_NODE_URL=http://gh-contractor-zcbenz.s3.amazonaws.com/atom-shell/dist