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 fetch user profile #58

Open
blade-demon opened this issue May 27, 2016 · 5 comments
Open

Failed to fetch user profile #58

blade-demon opened this issue May 27, 2016 · 5 comments

Comments

@blade-demon
Copy link

After I configuration for my express4.x server with github, the server shows the error: Failed to fetch user profile.

error: at /root/passport-github/examples/login/node_modules/passport-github2/lib/strategy.js:96:19

@disciple-dev
Copy link

Isn't passport-github2 a different repository?

@DiegoRBaquero
Copy link

Did you ever solve it?

@i-break-codes
Copy link

It still happens for me randomly. Though am using passport-github2 package. Absolutely no idea why as I've checked the creds.. it works for some, fails for some. Not able to reproduce locally either.

@frankli0324
Copy link

frankli0324 commented Jul 5, 2020

I'm getting the same error on passport-github (not 2), also randomly. I can be sure that the id and the secret are correct because there's a chance (yes, a chance, which means about once per 5,6 requests, weird) that I can login successfully. I'm using version 1.1.0.

traceback:

InternalOAuthError: Failed to fetch user profile
    at /app/node_modules/passport-github/lib/strategy.js:122:19
    at ClientRequest.<anonymous> (/app/node_modules/oauth/lib/oauth2.js:162:5)
    at ClientRequest.emit (events.js:198:13)
    at TLSSocket.socketErrorListener (_http_client.js:401:9)
    at TLSSocket.emit (events.js:198:13)
    at emitErrorNT (internal/streams/destroy.js:91:8)
    at emitErrorAndCloseNT (internal/streams/destroy.js:59:3)
    at process._tickCallback (internal/process/next_tick.js:63:19)

upate: it's not the library's fault... seems that my dns provider is returning different ip addresses for api.github.com, some of which is unavailable.

I wish passport-github could have a better error presentation though

@siyavash4812
Copy link

I'm getting the same error on passport-github (not 2), also randomly. I can be sure that the id and the secret are correct because there's a chance (yes, a chance, which means about once per 5,6 requests, weird) that I can login successfully. I'm using version 1.1.0.

traceback:

InternalOAuthError: Failed to fetch user profile
    at /app/node_modules/passport-github/lib/strategy.js:122:19
    at ClientRequest.<anonymous> (/app/node_modules/oauth/lib/oauth2.js:162:5)
    at ClientRequest.emit (events.js:198:13)
    at TLSSocket.socketErrorListener (_http_client.js:401:9)
    at TLSSocket.emit (events.js:198:13)
    at emitErrorNT (internal/streams/destroy.js:91:8)
    at emitErrorAndCloseNT (internal/streams/destroy.js:59:3)
    at process._tickCallback (internal/process/next_tick.js:63:19)

upate: it's not the library's fault... seems that my dns provider is returning different ip addresses for api.github.com, some of which is unavailable.

I wish passport-github could have a better error presentation though

I had the same issue and changing the DNS helped me. This is a tutorial on how to change DNS in Mac (I recommend cloudflare)
https://www.macinstruct.com/tutorials/how-to-change-your-macs-dns-servers/

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

6 participants