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

Error: getaddrinfo ENOTFOUND graph.facebook.com #116

Closed
JCarlosR opened this issue Aug 30, 2017 · 3 comments
Closed

Error: getaddrinfo ENOTFOUND graph.facebook.com #116

JCarlosR opened this issue Aug 30, 2017 · 3 comments
Labels

Comments

@JCarlosR
Copy link

JCarlosR commented Aug 30, 2017

Hi.
I am trying to scrape my page again requesting it to the graph api:

		// scrape again via facebook api
		const options = {
			appId      : '1927847517490935',
			appSecret  : 'xxx',
			accessToken: 'zzz',
		    version    : 'v2.10'
		};
		FB.options(options);
		const params = {
			id: url,
			scrape: true
		};
		FB.api('/', 'post', params, function (res) {
			if (!res || res.error) {
				console.log(!res ? 'error occurred' : res.error);
				return;
			}
		});

But I get the next error message:

{ Error: getaddrinfo ENOTFOUND graph.facebook.com graph.facebook.com:443 at errnoException (dns.js:28:10) at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:76:26) code: 'ENOTFOUND', errno: 'ENOTFOUND', syscall: 'getaddrinfo', hostname: 'graph.facebook.com', host: 'graph.facebook.com', port: 443 } |  

Can you please help me?

@dantman
Copy link

dantman commented Aug 30, 2017

Firstly, please don't include your appSecret or accessToken in bug reports. You should reset your app secret now.

ENOTFOUND errors are generally thrown by the low level networking stack. Either there's something wrong with your dns or network connection and it can't connect to the graph API or perhaps https isn't setup right on your server.

@JCarlosR
Copy link
Author

@dantman Sorry. I was thinking that the facebook-node-sdk uses HTTP instead of HTTPS.
But that's not true. The problem was with my server as you said.
Firebase cloud functions doesn't allow to perform external requests for free accounts.
Thank you for your help.

@dantman
Copy link

dantman commented Aug 31, 2017

@JCarlosR Defaulting to insecure would be a poor choice. Facebook doesn't even allow usage over HTTP anyways.

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

No branches or pull requests

2 participants