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

There appears to be trouble with your network connection. Retrying... #4890

Closed
id77 opened this issue Nov 9, 2017 · 115 comments
Closed

There appears to be trouble with your network connection. Retrying... #4890

id77 opened this issue Nov 9, 2017 · 115 comments
Assignees
Labels

Comments

@id77
Copy link

id77 commented Nov 9, 2017


➜  fuc git:(master) yarn install
yarn install v1.3.2
[1/4] πŸ”  Resolving packages...
[2/4] 🚚  Fetching packages...
info There appears to be trouble with your network connection. Retrying...
info There appears to be trouble with your network connection. Retrying...
info There appears to be trouble with your network connection. Retrying...
info There appears to be trouble with your network connection. Retrying...
error An unexpected error occurred: "http://npm.byted.org/debug/-/debug-2.6.9.tgz: getaddrinfo ENOTFOUND npm.byted.org npm.byted.org:80".
info If you think this is a bug, please open a bug report with the information provided in "/Users/Jimmy/reactjs/react-native/fuc/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
➜  fuc git:(master) βœ—

I cloned a project and I looked at the value of yarn.lock, package key 'resolved', which starts with 'http://npm.byted.org'.

I think this is the author custom yarn registry, but I can not visit 'http://npm.byted.org', but yarn config did not fix it.

@ghost ghost assigned torifat Nov 9, 2017
@ghost ghost added the triaged label Nov 9, 2017
@torifat
Copy link
Member

torifat commented Nov 9, 2017

What do you mean by "but yarn config did not fix it"? What did you try?

@id77
Copy link
Author

id77 commented Nov 9, 2017

expected:
If 'yarn.lock resolved' is unreachable, can I ignore 'resolved' in yarn.lock and install it using 'yarn config registry'.

doubt:
Or recommend me delete the lock file?

Sorry, forgive me, my English is not good.

@torifat
Copy link
Member

torifat commented Nov 9, 2017

Sorry, forgive me, my English is not good.

It's not a problem as long as I can understand. And, I'm also not very good either πŸ˜„

It's not a bug. This is an expected behavior. You can either delete yarn.lock file and yarn install again. Or, if you need the exact packages then you can replace http://npm.byted.org with https://registry.yarnpkg.com in yarn.lock file.

@torifat torifat closed this as completed Nov 9, 2017
@marcelhageman
Copy link

Adding this comment for other Googlers: What worked for me was increasing the Yarn network timeout:

yarn add YourPackageHere --network-timeout 100000

Apparently the package I was installing was too large (or my network too slow) so it assumed it was a network problem. It might've been, but this solved it. Just took a while.

@AnthonyLamot
Copy link

I'm experiencing this issue now as well. None of the aforementioned solutions seem to be working. Internet still works fine though, and no one else in the co-working space where I'm at seem to be experiencing any network issues?

@sandinosaso
Copy link

yarn install --network-timeout 1000000
Did the trick for me:

β‡’  yarn install --network-timeout 1000000
yarn install v1.3.2
[1/4] πŸ”  Resolving packages...
warning react-native > connect@2.30.2: connect 2.x series is deprecated
warning react-native > fbjs-scripts > gulp-util@3.0.8: gulp-util is deprecated - replace it, following the guidelines at https://medium.com/gulpjs/gulp-util-ca3b1f9f9ac5
[2/4] 🚚  Fetching packages...
[3/4] πŸ”—  Linking dependencies...
warning "jest-expo > babel-jest@21.2.0" has unmet peer dependency "babel-core@^6.0.0 || ^7.0.0-alpha || ^7.0.0-beta || ^7.0.0".
[4/4] πŸ“ƒ  Building fresh packages...
success Saved lockfile.
✨  Done in 234.36s.

@AnthonyLamot
Copy link

AnthonyLamot commented Jan 17, 2018 via email

@JochenFromm
Copy link

Same problem here, increasing the network timeout solved it

yarn install --network-timeout 1000000

Maybe the default timeout is too small?

@HarshulSharma000
Copy link

I am facing the same issue on Windows and setting timeout does not resolve it. On the other hand npm works fine.

@anujthakwani
Copy link

Task :wherehows-web:yarn
yarn install v1.3.2
[1/5] Validating package.json...
[2/5] Resolving packages...
[3/5] Fetching packages...
info There appears to be trouble with your network connection. Retrying...
info There appears to be trouble with your network connection. Retrying...
info There appears to be trouble with your network connection. Retrying...
info There appears to be trouble with your network connection. Retrying...
error An unexpected error occurred: "https://registry.yarnpkg.com/babel-polyfill/-/babel-polyfill-6.26.0.tgz: ESOCKETTIMEDOUT".
info If you think this is a bug, please open a bug report with the information provided in "/Users/athakwani/Desktop/WhereHows/wherehows-web/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

FAILURE: Build failed with an exception.

Any help here ?

@jensbodal
Copy link

Don't have a solution or why there was network issues in the first place, but the default for NETWORK_TIMEOUT is 30 seconds. Note that network-timeout is in ms, I probably wouldn't set this to higher than 5 minutes otherwise your build will just sit there for ~16 minutes (1000000ms) is there truly is network connectivity issues.

https://github.com/yarnpkg/yarn/search?utf8=%E2%9C%93&q=NETWORK_TIMEOUT&type=

@marcelorl
Copy link

@HarshulSharma000 same issue

@HarshulSharma000
Copy link

@marcelori I tried to revert to nodejs 8.9.4(lts) and then tried with --network-timeout=99999 and it works.
Note:- I am using yarn 1.4.0

@suhailgupta03
Copy link

Looks like yarn was trying to connect via a proxy. The following worked for me:

npm config rm proxy
npm config rm https-proxy

@jesper-bylund
Copy link

I'm still having this issue. Increasing network timeout did not help, nor did @suhailgupta03 's proxy removal. Right now, yarn won't install, add, or do anything. I've tried it through three different networks.

@benseitz
Copy link

benseitz commented Apr 6, 2018

same here......

@abishekrsrikaanth
Copy link

same here

@MichelDiz
Copy link

MichelDiz commented Apr 9, 2018

"is there truly is network connectivity issues." I don't think so. I have 100Mb of internet. No services are with trouble. Downloads are perfect, VOIP is perfect, NPM shines. Only Yarn I have this... Something dark is happening.

UPDATE: I did some voodoo trick and works fine now #5259 (comment)

@adjavaherian
Copy link

Might be by design. There's a registry in ~/.yarnrc that's autogenerated. Perhaps its behind a VPN or something?

cat ~/.yarnrc 
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
# yarn lockfile v1


registry "https://artifactory.some.net/api/npm"
lastUpdateCheck 1233305747

@MichelDiz
Copy link

MichelDiz commented Apr 10, 2018

mine (Looks like the registry address is empty - was not it supposed to contain something?):

=> cat ~/.yarnrc
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
# yarn lockfile v1


lastUpdateCheck 1523327705543

But, until now the "voodoo trick" is working great for me.

@jesper-bylund
Copy link

@adjavaherian This works! Mine was stuck to a VPN URL at my company. NO idea why it was set to that though. Because I don't use the VPN for yarn at all.

@learntoswim
Copy link

The "voodoo" trick posted above by @MichelDiz worked for me as well.

@Deja-vuuu
Copy link

Deja-vuuu commented May 28, 2018

So,How to solve this problem?
I ran into the same problem on Windows.

@Ryuurock
Copy link

Ryuurock commented Jun 9, 2018

+1

@cp1001
Copy link

cp1001 commented Jun 27, 2018

this kind of error occurs when your net cannot access some package resource which yarn.lock file specified.
check your yarn.lock file or delete yarn.lock,then change npm registry to other public regitstry,then yarn install.

point are:
donot use private registry.
check your network's connection to registry.

@elhamzaouiaymen
Copy link

I had hhe same issue. Actually I was running the command while a streaming video process is running (netflix). So I just paused it then I ve retried again and it works without even setting timeout to infinite value.

@rbiggers
Copy link

rbiggers commented Apr 6, 2020

I had the same issue, but I didn't notice it until I deleted the node_modules directory in my local repo.
Then I started seeing the network error. Evidently there was an old package in my package.json that was referencing a package that was behind the company firewall (I was also not on the VPN). Once I deleted the offending package from my package.json everything worked correctly.

@jetonk
Copy link

jetonk commented Apr 30, 2020

I had the same issue, my solution was updating the node version and the issue disappeared.

@allthesignals
Copy link

This again.

verbose 0.942 Performing "GET" request to "https://registry.yarnpkg.com/rxjs/-/rxjs-6.5.4.tgz".
verbose 1.047 Performing "GET" request to "https://registry.yarnpkg.com/rxjs/-/rxjs-6.5.3.tgz".
[##########################################################################################] 950/

It just hangs at these last two requests.

@TedSean
Copy link

TedSean commented May 4, 2020

I am having this issue too on yarn version --> 1.15.2

@the-turk
Copy link

the-turk commented May 11, 2020

You shouldn't close issues unless you solve them or inform people about what could go wrong.

@rotelando
Copy link

I ran yarn while building my docker image and had the same issue as mentioned. Restarting the docker daemon solved it for me.

@mirague
Copy link

mirague commented Jun 2, 2020

rm -rf /Users/xxx/.config/yarn/global/yarn.lock

@xdkaka Thanks, that worked for me! Seems that yarn.lock had some old private repository urls set.

trilom added a commit to trailmix/fake-service that referenced this issue Jul 13, 2020
Hyzual added a commit to koel/docker that referenced this issue Aug 3, 2020
* Revert and fix commit 3198879

Commit 3198879 prepended the CYPRESS_INSTALL_BINARY=0 variable to
the install command in the ressources/assets directory, however
this component does not require cypress.

The root component however does. This environment variable should
be prepended to the second install command.

* Add 'install buildx' step

This is just blindly following this blogpost:
https://www.docker.com/blog/multi-arch-build-and-images-the-simple-way/

* Target multiple architectures

See this blogpost for more on how this works:
https://www.docker.com/blog/multi-arch-build-and-images-the-simple-way/

* Add python2 dependency to front-builder

This error message shows it:
https://github.com/Filius-Patris/docker-koel/runs/915997770?check_suite_focus=true#step:5:8914

This issue comment suggests why:
sass/node-sass#1176 (comment)
TL;DR: Building some component requires python. This would normally be
precompiled and fetched, but arm doesn't have precompiled packages.

* Increase network timeout

The CICD errors seems to be tied to this:
yarnpkg/yarn#4890 (comment)

* Try building the 3 architectures at the end of the CI.

This is meant to test the CI. If it works, it will be done in
publish.yml instead of dockerimage.yml.

* Update CI/CD pipelines

For more details, see the discussions on PR #31.

With this commit, some targets in the Makefile are unneeded, but
I left them anyway.

* Correcting the tags: argument

I wasn't understanding the docs correctly.

* Refine CI/CD pipelines more

With this commit the pipeline completely cut reliance to the Makefile.
This helps to make everything more obvious by only looking at the pipeline
yaml file.

Co-authored-by: Joris MASSON <hyzual@gmail.com>
@TheCoderSingh
Copy link

--network-timeout 1000000 fixed it for me but took a long time to install just one package - @material-ui/icons

@Liqiankun

This comment has been minimized.

@kirill-konshin
Copy link

yarn install v1.22.5
[1/4] Resolving packages...
[2/4] Fetching packages...
info There appears to be trouble with your network connection. Retrying...
info There appears to be trouble with your network connection. Retrying...
info There appears to be trouble with your network connection. Retrying...
info There appears to be trouble with your network connection. Retrying...
error An unexpected error occurred: "https://registry.yarnpkg.com/npm/-/npm-6.14.8.tgz: ESOCKETTIMEDOUT".
info If you think this is a bug, please open a bug report with the information provided in "/Users/runner/work/timelapser/timelapser/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

Github Actions, MacOS runner.

@LucasJesusone2
Copy link

yarn install --network-timeout 1000000
Did the trick for me:

β‡’  yarn install --network-timeout 1000000
yarn install v1.3.2
[1/4] πŸ”  Resolving packages...
warning react-native > connect@2.30.2: connect 2.x series is deprecated
warning react-native > fbjs-scripts > gulp-util@3.0.8: gulp-util is deprecated - replace it, following the guidelines at https://medium.com/gulpjs/gulp-util-ca3b1f9f9ac5
[2/4] 🚚  Fetching packages...
[3/4] πŸ”—  Linking dependencies...
warning "jest-expo > babel-jest@21.2.0" has unmet peer dependency "babel-core@^6.0.0 || ^7.0.0-alpha || ^7.0.0-beta || ^7.0.0".
[4/4] πŸ“ƒ  Building fresh packages...
success Saved lockfile.
✨  Done in 234.36s.

IT WORKD FOR ME! THANK YOU VERY MUCH DUDE

@phyolim
Copy link

phyolim commented Oct 7, 2020

I guess there isn't "one size fit all" solution for this error. In my case there was a cyberark process on my i5 computer hogging all the resources. I force ended that process and the error went away. I think it has to do with antivirus. I'm sure it will come when i restart the pc. Such a waste of time working on windows.

@hckhanh
Copy link

hckhanh commented Nov 1, 2020

I get the same problem when I try to install yarn inside docker

Step 6/10 : COPY package.json yarn.lock ./
 ---> 72e0f798190d
Step 7/10 : RUN yarn --frozen-lockfile --check-files
 ---> Running in de083b1b3bac
yarn install v1.22.10
[1/4] Resolving packages...
[2/4] Fetching packages...
info There appears to be trouble with your network connection. Retrying...
info There appears to be trouble with your network connection. Retrying...
info There appears to be trouble with your network connection. Retrying...
info There appears to be trouble with your network connection. Retrying...
error An unexpected error occurred: "https://registry.yarnpkg.com/escape-regexp/-/escape-regexp-0.0.1.tgz: ETIMEDOUT".
info If you think this is a bug, please open a bug report with the information provided in "/usr/src/app/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
The command '/bin/sh -c yarn --frozen-lockfile --check-files' returned a non-zero code: 1
Error: Process completed with exit code 1.

@shawncvv
Copy link

shawncvv commented Nov 19, 2020

rm -rf /Users/xxx/.config/yarn/global/yarn.lock
Try it, works for me

@MeralTd

This comment has been minimized.

@fast-and-curious-1910
Copy link

For me
yarn add <yourPackage> --network-timeout 36000 worked in almost all cases, but while installing @material-ui/icons, I get this message and it errors out. Tried adding it manually to package.json then deleting node_modules andj yarn.lock did not work either.

@merceyz
Copy link
Member

merceyz commented Jan 21, 2021

The timeout logic is less aggressive in v2 so it will probably work for you there https://yarnpkg.com/getting-started/migration

@fast-and-curious-1910

This comment has been minimized.

@Nguyenkhanh98

This comment has been minimized.

@yarnpkg yarnpkg locked as resolved and limited conversation to collaborators Feb 5, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests