github-readme-stats: [Upstream Issue] GitHub Stats Card broken for some usernames

Describe the bug

Since 2 days the Github Stats Card on my personal README.md appears to be broken when my username is used. When I switch the username to another user, for example, anuraghazra the card starts to work again. Switching from my self-hosted vercel instance to the community one does not solve the issue. All the other cards seem to work fine with my GitHub username. The only error GitHub gives me is the following:

Error Fetching Resource

Might be something I have to sort out with the GitHub support, but I first wanted to check if somebody else is also experiencing this issue.

Expected behaviour

I would expect that the card also works for my username.

Screenshots / Live demo link (paste the github-readme-stats link as markdown image)

image

Additional info

I currently use https://github.com/anuraghazra/github-readme-stats/pull/1122 to also receive organization stats, but the issue also appears on the master branch.

About this issue

  • Original URL
  • State: open
  • Created 5 years ago
  • Reactions: 15
  • Comments: 46 (8 by maintainers)

Commits related to this issue

Most upvoted comments

Thanks for letting me know that I’m not the only one with this problem! Maybe from now, let’s add a thumbs up instead of commenting when you don’t have additional information relating to this bug. This will keep this issue and our mailbox clutter-free 😃.

Okay I don’t think this is from our end.

Something is really messed up from github’s side.

It’s returning error/HTML content on graphql api request

image

Note that it’s only happening for few users.

Hi everyone, I’ve added a hotfix for the issue for the moment, it should solve the issue for now. https://github.com/anuraghazra/github-readme-stats/pull/1409

(replying to main comment) Related: https://github-readme-stats.vercel.app/api/top-langs/?username=Mojang shows this

Could not resolve to a User with the login of 'Mojang'.

The error you are getting is that you are trying to request stats for an organization. Which is currently not supported. A feature request for this feature can be found on #654. You can show your support there.

Here is a quick update I and @anuraghazra again reiterated to GitHub that this issue must be solved. We received the following response:

Hi Rick,

Thanks for writing back to us!

I agree with you that the error is from GitHub side and as I earlier mentioned, the reason for the error is because the API request timeouts.

While GraphQL allows you to request as much data as you want, there is a limit on the processing time of that request on our end. If it takes more than 10 seconds to process the request and collect all the data you requested -- the request will be terminated and you'll get back an error.

Our recommendation is that you split the query into multiple requests until you stop hitting timeouts --I noticed this is what the author did in the hotfix.

I am happy to pass your feedback again to the engineering team but given the team's current backlog, I don't have an ETA for a response given the team's current backlog. I'll reach out to you again if I have any news or update.

Regards,

GitHub Support

For now, we, therefore, have to keep using the hotfix till GitHub fixes the issue. The downside of this is that the HotFix requests more data since it requests the same field twice. The agent has been notified about this. I will let you know when the ticket status changes.

@anuraghazra I was also surprised by the response. Such a response is however sadly not uncomment on tickets like this since companies are often highly protective of the time of their developers. I will try to reiterate the importance of solving this issue. I will send it to your gmail so you can review it before I send it. I can also post it here but I wanted to keep this issue clean.

@anuraghazra I just received the following reply from the GitHub Support:

Hi Rick, It appears the author of the library shipped a fix and the issue is now resolved. #1406 (comment) I’ll go ahead and mark this ticket as solved but do reach out again if you have any further concerns. Regards, GitHub Support

WTF! How does my hotfix justifies the problem as “solved”?

Of course it should be fixed from their side, it’s an literal issue with their API responses. There could be other services which might use their graphql apis and those will also suffer the same problem.

Give them this example error,

{
  "errors": [
    {
      "message": "Something went wrong while executing your query. Please include `E6A8:098D:10A0805:332E750:6176B687` when reporting this issue."
    }
  ]

image

@anuraghazra Thanks for your answer I closed #1416. Maybe we can hide the comments related to the maxDuration discussion?

I got the following response from the GitHub Team:

It does appear you and the other users hit a timeout. The API(REST and GraphQL) has a timeout on processing requests and if that timeout is hit, the request is terminated and you get back an error. Currently, the timeout is 10 seconds. I have asked the engineering team to help take a further look at this particular timeout and check if it is indeed expected. I don’t have an ETA now but will write back to you when I have any news.

I however think that all tickets are private. I will keep you updated.