Vercel: Unable to deploy because of proxy

Created on 27 Jan 2017  ·  36Comments  ·  Source: vercel/vercel

Hello, I am behind a Proxy, I can access npm registry by putting http_proxy and https_proxy environment variables, but I can't deploy using now. It throws me the following error:

> now --token 123567778998876767

> Deploying ~\Desktop\scrapaor
> Error! Unexpected error. Please try later. (request to https://api.zeit.co/now/create failed, reason: getaddrinfo EAI_AGAIN api.zeit.co:443)

Is there a solution for this?

bug

Most helpful comment

I've seen more and more very useful apps built without the ability to use a proxy lately.

Implementing this in nearly every language is a trivial affair.

This trend is disturbing.

All 36 comments

It looks like a DNS issue on your side. Can you try nslookup api.zeit.co?

This indeed sounds like normal issue of an "enterprise" proxied environment...

👍 ^

but why can I download packages from npm and even install meteor packages just by exporting http_proxy? I think proxy support is on your side. You can implement it right?

Agreed, I think we should support the http_proxy /cc @leo

any progress on this @jamo , @leo ?

@leo , any progress???

No progress, folks. But we will definitely tackle this once we have time!

@leo , I saw it was deployed v5.3.2 of now-cli. Still without luck trying to deploy behind a proxy. I have a Premium account and this feature is important to me. Do you have any plans to support proxy envs soon?

@leo , I saw it was deployed v6.1.1 of now-cli. Still without luck trying to deploy behind a proxy. I have a Premium account and this feature is important to me. Do you have any plans to support proxy envs soon?

Hmm, how can we fix this? @OlliV @jamo

I think I'm being bit by this too.

Here's what I'm getting when trying to install 7.2.4:

> [email protected] postinstall /usr/lib/node_modules/now
> node download/install.js

> For the source code, check out: https://github.com/zeit/now-cli

> Downloading now CLI 7.2.4 [                    ] 0%{ FetchError: request to https://cdn.zeit.co/releases/now-cli/7.2.4/now-linux failed, reason: socket hang up
    at ClientRequest.<anonymous> (/usr/lib/node_modules/now/download/dist/download.js:6869:11)
    at emitOne (events.js:96:13)
    at ClientRequest.emit (events.js:188:7)
    at TLSSocket.socketErrorListener (_http_client.js:309:9)
    at emitOne (events.js:96:13)
    at TLSSocket.emit (events.js:188:7)
    at emitErrorNT (net.js:1277:8)
    at _combinedTickCallback (internal/process/next_tick.js:80:11)
    at process._tickCallback (internal/process/next_tick.js:104:9)
  name: 'FetchError',
  message: 'request to https://cdn.zeit.co/releases/now-cli/7.2.4/now-linux failed, reason: socket hang up',
  type: 'system',
  errno: 'ECONNRESET',
  code: 'ECONNRESET' }

I guess it has to do with the use of node-fetch in download.js, but I don't have the necessary JS/npm chops to tackle this.

I get an SSL error on curl for that URL. If I set HTTP{S}_PROXY, curl is able to reach it. But now-cli can't.

I also need proxy support to be able to use now.

@OlliV: I guess we can swap fetch for request. request honors http_proxy. can you help me to get a PR going?

@thiagoarrais npm has recently switched away from request in favor of make-fetch-happen, which also supports http_proxy.

@thiagoarrais https://github.com/thiagoarrais,
What do that means?

This is the output from npm i -g now. It means that now-cli tries to download something without going to the proxy.

The relevant portion is:

FetchError: request to https://cdn.zeit.co/releases/now-cli/7.2.4/now-linux failed, reason: socket hang up

This is the error message I get when trying to install now behind a proxy. It is caused by fetch not honoring http_proxy.

Come to think of it, maybe this isn't the same issue after all. I guess yours manifests when trying to _use_ now-cli. Mine happens when trying to _install_ it.

@thiagoarrais Both scenarios need to be fixed.

A recent version of now was recently released... _Eight months_ has gone since I opened the issue and still can't deploy behind a proxy.

@leo , @TooTallNate , I am a premium Now service and I can't understand why in 8 long months, this problem is still here.

I need this fixed ASAP please

Being affected by this as well, is there any workaround or solution to this?

If anybody wants to take a shot at a pull request, my proxy-agent module should do the trick (also see https://github.com/TooTallNate/node-proxy-agent/issues/11).

i thing the best solution is global-tunnel-ng it works transparetly

What is the current status?
If it is still unsolved I'd take time to implement the solution mentioned in #735.

I implemented #735 here https://github.com/zeit/now-cli/compare/canary...Horsed:canary. Waiting for the merge of https://github.com/zeit/update-check/pull/13 before I can create a pull request here.

Hi folks, long issue here.
I just wanna mention that on windows there is this program called
Proxifier, which allows you to customize which programs goes through a
proxy and which not.

In my case I solved the issue long ago by proxifying cmd.exe and now.exe.

I used cntlm to configure the proxy on the computer, then told proxifier
that those programs goes through 127.0 0.1:8080 which is the cntlm tunnel.

On Fri, Oct 26, 2018, 5:13 AM Martin Knopf notifications@github.com wrote:

I implemented #735 https://github.com/zeit/now-cli/pull/735. Waiting
for the merge of zeit/update-check#13
https://github.com/zeit/update-check/pull/13 before I can create a pull
request here.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/zeit/now-cli/issues/255#issuecomment-433342607, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AMDUAof1AfGpgQZm48U2NuPg4Z9C0a3Pks5uotIngaJpZM4LvUxe
.

With now-cli 12.0.0 my implementation won't work anymore. I switched to running now in a docker container using proxychains.

I have same problem.
1 year, solve this issues please

I am getting a similar issue to this as well. It does not seem to pull the http_proxy or https_proxy environment vars.

$ npx now
{ FetchError: request to https://github.com/zeit/now-cli/releases/download/12.1.12/now-linux.gz failed, reason: connect ECONNREFUSED 192.30.253.113:443
    at ClientRequest.<anonymous> (/home/eric/.npm/_npx/10605/lib/node_modules/now/download/dist/index.js:1:29589)
    at ClientRequest.emit (events.js:182:13)
    at TLSSocket.socketErrorListener (_http_client.js:399:9)
    at TLSSocket.emit (events.js:182:13)
    at emitErrorNT (internal/streams/destroy.js:82:8)
    at emitErrorAndCloseNT (internal/streams/destroy.js:50:3)
    at process.internalTickCallback (internal/process/next_tick.js:72:19)
  name: 'FetchError',
  message:
   'request to https://github.com/zeit/now-cli/releases/download/12.1.12/now-linux.gz failed, reason: connect ECONNREFUSED 192.30.253.113:443',
  type: 'system',
  errno: 'ECONNREFUSED',
  code: 'ECONNREFUSED' }

I've seen more and more very useful apps built without the ability to use a proxy lately.

Implementing this in nearly every language is a trivial affair.

This trend is disturbing.

just to pile on one more person who wants proxy support, here I am! Please implement proxy support. It'll be three years soon, and you had a lot of time to do it right.

I really don't get why this is not a priority for you, because many corporate users (= paying users) are behind a proxy and will probably use anything instead of Zeit. At least in my team's case, we used a different service instead of Zeit because of this very issue.

post for visibility

just to pile on one more person who wants proxy support, here I am! Please implement proxy support. It'll be three years soon, and you had a lot of time to do it right.

I really don't get why this is not a priority for you, because many corporate users (= paying users) are behind a proxy and will probably use anything instead of Zeit. At least in my team's case, we used a different service instead of Zeit because of this very issue.

What else did you used?

I was able to reach api.zeit.co via curl ... registering / listing user JSON / ...

C:\Users\wm\Desktop\cmder_mini
λ curl "https://api.zeit.co/www/user" -H "Authorization: Bearer xxxxxxxxOa8XHvPXf4q9KKZw"
{"user":"uid":"xxxxxxxxj5NoAteuQiIfAjJh","email":"email@email","name":null,"username":"trax100","date":"2019-11-26T09:33:06.843Z","avatar":null,"platformVersion":null,"billing":"plan":"free","period":null,"trial":null,"cancelation":null,"addons":null,"email":null,"tax":null,"language":null,"address":null,"name":null},"bio":null,"website":null,"profiles":[],"stagingPrefix":"trax100","resourceConfig":{"concurrentBuilds":1}}}
C:\Users\wm\Desktop\cmder_mini
λ

BUT plain now-cli is failing

λ now -d
> Error! Checking for updates failed:
> [debug] [2019-11-26T09:34:19.209Z] Using Now CLI 16.6.0
> [debug] [2019-11-26T09:34:19.212Z] user supplied no target, defaulting to deploy
> [debug] [2019-11-26T09:34:19.238Z] GET https://api.zeit.co/www/user
> [debug] [2019-11-26T09:34:40.887Z] Retrying: FetchError: request to https://api.zeit.co/www/user failed, reason: connect ETIMEDOUT 52.9.164.177:443
FetchError: request to https://api.zeit.co/www/user failed, reason: connect ETIMEDOUT 52.9.164.177:443
    at ClientRequest.<anonymous> (C:\Users\wm\AppData\Roaming\npm\node_modules\now\dist\index.js:2:952506)
    at ClientRequest.emit (events.js:198:13)
    at ClientRequest.EventEmitter.emit (domain.js:448:20)
    at TLSSocket.socketErrorListener (_http_client.js:392:9)
    at TLSSocket.emit (events.js:198:13)
    at TLSSocket.EventEmitter.emit (domain.js:448:20)
    at emitErrorNT (internal/streams/destroy.js:91:8)
    at emitErrorAndCloseNT (internal/streams/destroy.js:59:3)
    at process._tickCallback (internal/process/next_tick.js:63:19)
> [debug] [2019-11-26T09:34:41.289Z] GET https://api.zeit.co/www/user
> [debug] [2019-11-26T09:35:02.297Z] Retrying: FetchError: request to https://api.zeit.co/www/user failed, reason: connect ETIMEDOUT 52.9.164.177:443
FetchError: request to https://api.zeit.co/www/user failed, reason: connect ETIMEDOUT 52.9.164.177:443
    at ClientRequest.<anonymous> (C:\Users\wm\AppData\Roaming\npm\node_modules\now\dist\index.js:2:952506)
    at ClientRequest.emit (events.js:198:13)
    at ClientRequest.EventEmitter.emit (domain.js:448:20)
    at TLSSocket.socketErrorListener (_http_client.js:392:9)
    at TLSSocket.emit (events.js:198:13)
    at TLSSocket.EventEmitter.emit (domain.js:448:20)
    at emitErrorNT (internal/streams/destroy.js:91:8)
    at emitErrorAndCloseNT (internal/streams/destroy.js:59:3)
    at process._tickCallback (internal/process/next_tick.js:63:19)
> [debug] [2019-11-26T09:35:04.296Z] GET https://api.zeit.co/www/user
> [debug] [2019-11-26T09:35:25.301Z] Retrying: FetchError: request to https://api.zeit.co/www/user failed, reason: connect ETIMEDOUT 52.9.164.177:443
FetchError: request to https://api.zeit.co/www/user failed, reason: connect ETIMEDOUT 52.9.164.177:443
    at ClientRequest.<anonymous> (C:\Users\wm\AppData\Roaming\npm\node_modules\now\dist\index.js:2:952506)
    at ClientRequest.emit (events.js:198:13)
    at ClientRequest.EventEmitter.emit (domain.js:448:20)
    at TLSSocket.socketErrorListener (_http_client.js:392:9)
    at TLSSocket.emit (events.js:198:13)
    at TLSSocket.EventEmitter.emit (domain.js:448:20)
    at emitErrorNT (internal/streams/destroy.js:91:8)
    at emitErrorAndCloseNT (internal/streams/destroy.js:59:3)
    at process._tickCallback (internal/process/next_tick.js:63:19)
> [debug] [2019-11-26T09:35:29.303Z] GET https://api.zeit.co/www/user
> [debug] [2019-11-26T09:37:23.827Z] FetchError: request to https://api.zeit.co/www/user failed, reason: connect ETIMEDOUT 52.9.164.177:443
    at ClientRequest.<anonymous> (C:\Users\wm\AppData\Roaming\npm\node_modules\now\dist\index.js:2:952506)
    at ClientRequest.emit (events.js:198:13)
    at ClientRequest.EventEmitter.emit (domain.js:448:20)
    at TLSSocket.socketErrorListener (_http_client.js:392:9)
    at TLSSocket.emit (events.js:198:13)
    at TLSSocket.EventEmitter.emit (domain.js:448:20)
    at emitErrorNT (internal/streams/destroy.js:91:8)
    at emitErrorAndCloseNT (internal/streams/destroy.js:59:3)
    at process._tickCallback (internal/process/next_tick.js:63:19)
> Error! request to https://api.zeit.co/www/user failed, reason: connect ETIMEDOUT 52.9.164.177:443

C:\Users\wm\Desktop\cmder_mini
λ

PLS HELP ME :-)

I wrote a module that wraps Now CLI to add proxy support: https://www.npmjs.com/package/proxify-now

Tested on WIN 10 64bit.

Bump. Nearly three and a half years and still no solution for this?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

brandonmp picture brandonmp  ·  29Comments

viczam picture viczam  ·  30Comments

doque picture doque  ·  27Comments

gadicc picture gadicc  ·  48Comments

rgwozdz picture rgwozdz  ·  40Comments