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

Failed to get crumb (Error: connect ETIMEDOUT) #69

Open
adams-family opened this issue Mar 17, 2020 · 6 comments
Open

Failed to get crumb (Error: connect ETIMEDOUT) #69

adams-family opened this issue Mar 17, 2020 · 6 comments

Comments

@adams-family
Copy link

adams-family commented Mar 17, 2020

Started getting the following error today:

Failed to get crumb (Error: connect ETIMEDOUT 87.248.107.204:443)

How to reproduce:

yahooFinance.quote({
	symbol: 'TSLA',
	modules: ['price']
}, function (err, result) {
	if (err) {
		reject('ERROR:', err);
	} else {
		console.log('SUCCESS:', result)
	}
});

I noticed that I can't even curl to yahoo:

curl https://finance.yahoo.com

  • Curl to finance.yahoo.com works fine from another machine.
  • Curl to other addresses (such as www.yahoo.com) works fine from the affected machine as well.

Maybe this library gets banned by Yahoo over time?

@adams-family
Copy link
Author

Just in case it helps anyone, I figured out a workaround, although I'm not absolutely happy with it:

On the wrong machine finance.yahoo.com resolved to 87.248.107.204

On the good machine finance.yahoo.com resolved to 87.248.114.11

Therefore I was able to make it work by setting up a custom record into the /etc/hosts file:

87.248.114.11 finance.yahoo.com query1.yahoo.com query2.yahoo.com

I think it had nothing to do with a ban from Yahoo but rather an outage. Can anyone confirm?

@adams-family adams-family changed the title Failed to get crumb (Error: connect ETIMEDOUT) - banned by Yahoo? Failed to get crumb (Error: connect ETIMEDOUT) Mar 17, 2020
@gadicc
Copy link
Collaborator

gadicc commented Mar 17, 2020

Hi yes this sounds like nothing to do with the library specifically.

In the worst case, perhaps they are indeed trying to curtail requests origination from hosting providers, but probably it's either a CDN issue their side, or, considering how long it's been going on, more likely a DNS issue on your side.

Where are the two machines? What are their DNS settings? Do they have their own DNS caches that can be reset? Any possibility of stale cache also at interim DNS servers?

@adams-family
Copy link
Author

Hi, yes, I agree, I also think that it had nothing to do with the library in the end. I wanted to report it just in case some new restrictions were put in placed by Yahoo - but it seems that it an outage of Yahoo's servers.

The affected machines are in the Czech Republic, DNS is 1.1.1.1.
The working machine is in Austria, DNS is 1.1.1.1.

I think that Yahoo might use different servers for the two regions either for geo-balancing or they might have just changed the IP in the meantime.

I plan to remove the record from /etc/hosts in about a day from now and see if the problem occurs again.

@codeofsumit
Copy link

I suddenly get the same problem since a few days and can't figure it out. Will try a few suggestions from @adams-family now

@codeofsumit
Copy link

87.248.114.11 finance.yahoo.com query1.yahoo.com query2.yahoo.com

This solution works. Thanks a lot @adams-family

@debegr92
Copy link

debegr92 commented Apr 29, 2021

Not workling for me. Just trying the example code. Still not able to get any data with node-yahoo-api
Unhandled Rejection (Error): Failed to get crumb (TypeError: NetworkError when attempting to fetch resource.)

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

4 participants