apm icon indicating copy to clipboard operation
apm copied to clipboard

Unable to install packages behind corporate proxy

Open marcuslindfeldt opened this issue 11 years ago • 187 comments

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

marcuslindfeldt avatar Mar 13 '15 14:03 marcuslindfeldt

Could you try running apm config ls and verify the proxy settings there look correct?

kevinsawicki avatar Mar 16 '15 17:03 kevinsawicki

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>"

marcuslindfeldt avatar Mar 17 '15 09:03 marcuslindfeldt

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

superbob avatar Mar 19 '15 09:03 superbob

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.

kevinsawicki avatar Mar 26 '15 20:03 kevinsawicki

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

michaelkrnac avatar Mar 27 '15 07:03 michaelkrnac

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

h-no avatar Apr 07 '15 09:04 h-no

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 

h-no avatar Apr 07 '15 09:04 h-no

+1 what @h-no said. I have the exact same error.

noseglid avatar Apr 07 '15 09:04 noseglid

Getting this as well. Im behind a proxy and have correct config. I can browse packages from atom but install throws the gyp error.

wmira avatar Apr 07 '15 12:04 wmira

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

wsouto avatar Apr 07 '15 12:04 wsouto

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.

ghost avatar Apr 09 '15 02:04 ghost

@fujisaks Can you detail how you got this to work? I'm on severly outdated packages now because I can't upgrade.

noseglid avatar Apr 16 '15 09:04 noseglid

@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.

ghost avatar Apr 16 '15 09:04 ghost

@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"

noseglid avatar Apr 16 '15 09:04 noseglid

Thanks @fujisaks Works like a charm here! The only thing I needed to change was the proxy.

morberg avatar Apr 16 '15 10:04 morberg

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"

Bjoernsen avatar Apr 17 '15 06:04 Bjoernsen

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.

voelzmo avatar Apr 17 '15 08:04 voelzmo

+1 (and referenced 2 other duplicates)

tborychowski avatar Apr 17 '15 15:04 tborychowski

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}"

radum avatar Apr 20 '15 09:04 radum

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

fank avatar Apr 23 '15 07:04 fank