Support Forums

VIMEO API request socket hangup on netlify build

Hi together,

i cannot fix a problem with the automated build. it’s a gatsby site and needs to fetch some pictures from a viemo user. the api request to viemo is done by client credentials grant and has a pro user account (so not the rate limit). the scope i request is public.

Locally the build runs fine. the preinit gatsby does the authentication and gets the access token to do the request. but when it comes to netflify build i always get the socket hang up. anyone any idea what the reason could be?

FetchError: request to https://api.vimeo.com/videos/501936217 failed, reason: socket hang up
10:36:21 PM:     at ClientRequest.<anonymous> (/opt/build/repo/node_modules/node-fetch/lib/index.js:1461:11)
10:36:21 PM:     at ClientRequest.emit (events.js:315:20)
10:36:21 PM:     at TLSSocket.socketOnEnd (_http_client.js:493:9)
10:36:21 PM:     at TLSSocket.emit (events.js:327:22)
10:36:21 PM:     at endReadableNT (internal/streams/readable.js:1327:12)
10:36:21 PM:     at processTicksAndRejections (internal/process/task_queues.js:80:21) {
10:36:21 PM:   type: 'system',
10:36:21 PM:   errno: 'ECONNRESET',
10:36:21 PM:   code: 'ECONNRESET'
10:36:21 PM: }


Hi @el-j,

The first answer to this post, would help you understand what the error means:

In any case, it looks like the server is taking more time to respond to the request till Netlify is waiting for. I’m not sure if this limit can be changed or something, however I’d advise to try and move away from NodeJS based file download methods. Netlify build image has brew support (alpha), so you could try using something like wget to download files.

Hej thanks for your response. But i do know what the error means. It was not my question. I asked why it just happens here on netlify, it builds otherwise ok. Just netlify makes trouble.

So i am asking kindly for an advice how i can get netlify doing the build. Not an stackoverfolw that I found weeks before I raised the topic here.
Thx for any help on this.

Hi @el-j,

I’ve already gave some advise here:

Hi again,

Yes but this is not possible. We are talking about a Gatsby build, so i have to use node. As i need the resources during the build to assign them to the articles/pages.

All I need is to get the picture url from the video id for each video. I do the authentication as written in the preinit. I do not understand why the timeout happens. The rate limits are good as well.

Could it be a problem with oauth2? Do I need to use another auth Methode from netlify builder then on a local machine? If so, why?

Thank u

Hi @el-j

How are you making the call to the Vimeo API?