yarn icon indicating copy to clipboard operation
yarn copied to clipboard

Error in GitHub actions workflow : There appears to be trouble with your network connection. Retrying...

Open ankita-p17 opened this issue 2 years ago • 7 comments

I'm encountering an issue that is a blocker for our Production deployment while using Docker build in my GitHub Actions workflow. The error message I'm receiving -

13 202.8 warning jest > @jest/core > jest-config > jest-environment-jsdom > jsdom > [email protected]: Use your platform's native performance.now() and performance.timeOrigin 13 224.5 [2/4] Fetching packages... 13 275.6 info There appears to be trouble with your network connection. Retrying... 13 309.3 info There appears to be trouble with your network connection. Retrying... 13 315.0 info There appears to be trouble with your network connection. Retrying... 13 342.8 info There appears to be trouble with your network connection. Retrying... 13 348.4 info There appears to be trouble with your network connection. Retrying... 13 376.5 info There appears to be trouble with your network connection. Retrying... 13 382.5 info There appears to be trouble with your network connection. Retrying... 13 407.6 info There appears to be trouble with your network connection. Retrying... 13 416.3 info There appears to be trouble with your network connection. Retrying... 13 441.0 info There appears to be trouble with your network connection. Retrying... 13 454.8 error An unexpected error occurred: "https://registry.yarnpkg.com/class-validator/-/class-validator-0.13.2.tgz: ESOCKETTIMEDOUT". 13 454.8 info If you think this is a bug, please open a bug report with the information provided in "/usr/src/app/yarn-error.log". 13 454.8 info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command. 13 475.0 info There appears to be trouble with your network connection. Retrying... 13 509.2 info There appears to be trouble with your network connection. Retrying... 13 ERROR: process "/bin/sh -c yarn" did not complete successfully: exit code: 1

[build 6/10] RUN yarn:

454.8 error An unexpected error occurred: "https://registry.yarnpkg.com/class-validator/-/class-validator-0.13.2.tgz: ESOCKETTIMEDOUT". 454.8 info If you think this is a bug, please open a bug report with the information provided in "/usr/src/app/yarn-error.log". 454.8 info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command. 475.0 info There appears to be trouble with your network connection. Retrying... 509.2 info There appears to be trouble with your network connection. Retrying... Dockerfile:13

11 |
12 | #Install app dependencies using the npm ci command instead of npm install 13 | >>> RUN yarn 14 |
15 | COPY . . ERROR: failed to solve: process "/bin/sh -c yarn" did not complete successfully: exit code: 1 Error: Process completed with exit code 1.

This issue occurs when running the following workflow step:

- name: Build and tag Docker image
  run: docker build --platform=linux/arm64/v8 -t my-image:latest .

ankita-p17 avatar Oct 28 '23 11:10 ankita-p17

Same

#23 298.8 error An unexpected error occurred: "https://registry.yarnpkg.com/date-fns/-/date-fns-2.30.0.tgz: ESOCKETTIMEDOUT".

But that url works for me.

This is blocking my deploys. Any ideas?

guanzo avatar Oct 30 '23 20:10 guanzo

Those workarounds are work for me.

This one is faster than the others

  • RUN yarn install --network-timeout 1000000

My project doesn't have a lock file so npm install works for me.

  • RUN npm install

Also, this could works

  • RUN yarn cache clean RUN yarn config delete proxy RUN yarn config delete https-proxy RUN yarn config delete registry RUN yarn install --network-timeout 1000000

narthanaj avatar Nov 09 '23 11:11 narthanaj

I've changed by base image from node:16-slim to node:16 This issue we are mostly facing on slim image

ankita-p17 avatar Dec 06 '23 12:12 ankita-p17

Have the same issue. The build in AWS Codebuild happens for the 4 minutes, but after we migrated to Github Actions - it takes 52...

zentavr avatar Jul 10 '24 02:07 zentavr