Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vercel deploy fails, reason: socket hang up #6979

Closed
vinisaveg opened this issue Nov 11, 2021 · 20 comments
Closed

Vercel deploy fails, reason: socket hang up #6979

vinisaveg opened this issue Nov 11, 2021 · 20 comments

Comments

@vinisaveg
Copy link

Vercel CLI failed while trying to deploy the app.

Even though the app continue to build and deploy on vercel, with a sequence of staging deploys queue.

Command:

npx vercel

Output:

Vercel CLI 23.1.2
Error! request to https://api.vercel.com/v13/now/deployments?teamId=team_***  failed, reason: socket hang up

Result:

screenshot

Expected:
no errors, 1 deploy.

Platform: Linux
Vercel CLI version: 23.1.2

@TooTallNate
Copy link
Member

Hi @vinisaveg, is this still an issue for you? Likely it was related to your local internet connection. For future reference, you can check on the status of Vercel here: https://www.vercel-status.com/

@GiancarlosIO
Copy link

GiancarlosIO commented Apr 13, 2022

hi @vinisaveg @TooTallNate, How did u solve that error? I'm getting the same error
For some reason the command vercel -t my-token fails with a failed, reason: socket hang up. This error happens in our GitLab ci (and also in local). The other thing is that I don't get why 6-7 deployments are created when we run vercel -t my-token only one time.

@vinisaveg
Copy link
Author

vinisaveg commented Apr 13, 2022

Hi @GiancarlosIO @TooTallNate. I did not do anything, It just simply started working as it should after a few days... 😅

@Oriole-Alex
Copy link

I'm having the exact same issue, it hangs for a while and then errors out with failed, reason: socket hang up. Anyone found a fix?

@gitnasr
Copy link

gitnasr commented May 23, 2022

Issue still presist

@niklasravnsborg
Copy link

niklasravnsborg commented Jun 23, 2022

I'm also experiencing this issue with Vercel CLI 25.1.0.

@jpall12
Copy link

jpall12 commented Aug 13, 2022

Experiencing this issue too! Vercel CLI 18.0.0
image

@agustinl
Copy link

Same issue here:

Vercel CLI 28.1.0
Error! request to https://api.vercel.com/v13/deployments failed, reason: socket hang up

😢

@Moe03
Copy link

Moe03 commented Aug 21, 2022

Same issure here...

Vercel CLI 28.1.0
Error! request to https://api.vercel.com/v13/deployments failed, reason: socket hang up

@davidkolesom
Copy link

Anyone? 😢

@jpall12
Copy link

jpall12 commented Aug 26, 2022

I have opened a ticket with Vercel and referenced this issue. Hopefully they can resolve this issue soon.

@mrkstwrt
Copy link

mrkstwrt commented Sep 6, 2022

I've encountered this issue too with 28.2.2

@zioForas
Copy link

i'm having this issue too, my partber @ziadidi has no issues on the same network

@willkuerlich
Copy link

Same here..
Also Vercel is not reflecting current commit to my github repo for at least 30minutes now

@ivstiv
Copy link

ivstiv commented Oct 13, 2022

We are also experiencing it on our self-hosted Gitlab runners since yesterday.

Vercel CLI 28.4.10
Retrieving project…
Deploying **edited**
Uploading [--------------------] (0.0B/4.6MB)
Uploading [=====---------------] (1.2MB/4.6MB)
Uploading [==========----------] (2.3MB/4.6MB)
Uploading [===============-----] (3.5MB/4.6MB)
Uploading [====================] (4.6MB/4.6MB)
Error: request to https://api.vercel.com/v13/deployments?teamId=**edited** failed, reason: socket hang up

It looks like the upload doesn't get acknowledged from the server. It broke on its own without any changes from our side. Moving it to a vercel integrated repository is not an option as it is behind a firewall. It also doesn't seem to be a blocked/limited IP as the deployment job was ran on multiple runners with different IPs.

@GiancarlosIO
Copy link

GiancarlosIO commented Oct 13, 2022

@ivstiv I was getting the same error. To fix that I switched to vercel deploy --prebuilt --archive=tgz
Now, we run the following commands in our gitlab runner to deploy our nextjs apps:

  • vercel pull
  • vercel build
  • vercel deploy --prebuilt --archive=tgz

Related discussion: #8643

@ivstiv
Copy link

ivstiv commented Oct 14, 2022

Here is part of the response I got from Vercel regarding the aforementioned error:

Socket hang up can happen when too many files are being pushed to Vercel, hitting the API limit threshold or the internet connection itself is poor and the connection is dropped. Typically when we've seen it, it's been caused by the nodes_modules and the .git folders being uploaded to Vercel, which aren't required for the build.

I was not able to identify any such large folders or internet issues, so I tried what @GiancarlosIO proposed by adding --archive=tgz and it worked! Here is what our uploading script looks like:

vercel pull --yes --environment=production --token=$VERCEL_TOKEN
vercel build --prod --token=$VERCEL_TOKEN
vercel deploy --prebuilt --prod --archive=tgz --token=$VERCEL_TOKEN

@caweidmann
Copy link

caweidmann commented Oct 16, 2022

Experiencing the same issue. Deploy step hangs in Github Actions even though on Vercel UI it triggers multiple deploys which all complete successfully. Adding

vercel deploy --prebuilt --archive=tgz

also worked for me.

@elviocb
Copy link

elviocb commented Nov 8, 2022

Why the option --archive=tgz option is not on Vercel's CLI help? 🤔

@afl1986
Copy link

afl1986 commented Jan 11, 2023

I turned on the VPN and everything worked

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests