-
Notifications
You must be signed in to change notification settings - Fork 65
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, reason: socket hang up and status 500 #195
Comments
Hi @hawx1993! 👋🏻 Thanks for reaching out. It sounds like there is a connectivity issue between your machine and The following code works for me locally (I changed the
I have some follow-up questions:
|
@timrogers hi, there! curl https://api.github.com --verbose
* Trying 20.205.243.168:443...
* Connected to api.github.com (20.205.243.168) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* successfully set certificate verify locations:
* CAfile: /etc/ssl/cert.pem
* CApath: none
* TLSv1.2 (OUT), TLS handshake, Client hello (1):
* LibreSSL SSL_connect: SSL_ERROR_SYSCALL in connection to api.github.com:443
* Closing connection 0
curl: (35) LibreSSL SSL_connect: SSL_ERROR_SYSCALL in connection to api.github.com:443
is instant. I request github api meybe 100times per seconds
local mac machine. but I can open https://api.github.com/repos/hawx1993/heaven-docs/contents/%2Fpackages%2Fheaven%2Fsrc?ref=master on my browser. I use axios , and it's normal |
Thanks! It looks like your machine is having some kind of SSL or TLS issue with connecting to |
{
"message": "API rate limit exceeded for 172.105.122.83. (But here's the good news: Authenticated requests get a higher rate limit. Check out the documentation for more details.)",
"documentation_url": "https://docs.github.com/rest/overview/resources-in-the-rest-api#rate-limiting"
} |
@timrogers it seems my token has been limited , can I use octokit to work through it by pass same params? |
It does seem that your IP has been rate limited, but the issue you are having with Looking at the |
@timrogers ok, thx |
That's surprising! In that case, I'm not sure what the issue is. It's odd that it would work in Axios but not @octokit/js-community Any ideas? |
That could definitely be the problem. If you send more than ~1 request per second over a prolonged time you will be flagged in some way or another. The same request works through curl and the browser because you send a single request. Another idea: can you remove the |
If others hit this, check your VPN or DNS settings. In my case, OpenDNS was causing this same issue nondeterministically. I switched to another VPN and it works without issue. OpenDNS wasn't reporting anything blocked or blacklisted in the requests, but it will still causing it to fail. One other oddity was that after getting an HTTP 500, if I then visited that same URL in the browser the results would load (somewhat slow), then I could retry the octokit request and it would work. This was 100% consistent in the behavior I was experiencing. |
Checklist
Environment
Versions
19.0.44
What happened?
RequestError [HttpError]: request to https://api.github.com/repos/hawx1993/heaven-docs/contents/%2Fpackages%2Fheaven%2Fsrc?ref=master failed, reason: socket hang up at /Users/trigkit4/heaven-code-helper/node_modules/@octokit/request/dist-src/fetch-wrapper.js:96:15
and as you can see, we can easily open the link api: https://api.github.com/repos/hawx1993/heaven-docs/contents/%2Fpackages%2Fheaven%2Fsrc?ref=master
so, not the github issues
Minimal test case to reproduce the problem
and throw upper error
What did you expect to happen?
can get normal response data from github
What the problem might be
The text was updated successfully, but these errors were encountered: