Cannot read property 'data' of undefined
Describe the bug
Loading for my profile seems to be broken. In the defense of this project though, I have a bit of an unusual profile. 😆
The error I see is:
Cannot read property 'data' of undefined
Expected behavior A clear and concise description of what you expected to happen.
Screenshots / Live demo link (paste the github-readme-stats link as markdown image) If applicable, add screenshots to help explain your problem.

Additional context
I have ~1.2k repositories against my account. I'm in 56 GitHub organizations. Across a span of two days last year I generated 1,596 PRs from my account, and across another two days I generated a further 3,500 something PRs from my account. I'm also a GitHub Star.
Hi @JLLeitschuh thanks for reporting the issue.
Yes there are few people who are facing similar issues, seems like there is something wrong with GitHub's API.
@rickstaa and I even contacted github support for one of the similar issues with github's api's getting timed out. We'll look into whats happening with this.
Here, see how the graphql API is timing out.

I have lots of contacts inside of GitHub, could you include in a response the full GraphQl query used here? I can get in contact with some of the GH folks to see if I can get this resolved sooner.
@JLLeitschuh As pointed out by @anuraghazra the Github Support is looking into this problem. I however have not received an update yet. I will update https://github.com/anuraghazra/github-readme-stats/issues/1406 when I hear from them. The GitHub support ticket number is 1369436.
Here's the GraphQL query
Here's the previous issue where we were discussing the same problem but we found a workaround: https://github.com/anuraghazra/github-readme-stats/issues/1406
Here's the hotfix which I did: https://github.com/anuraghazra/github-readme-stats/pull/1409
user(login: "JLLeitschuh") {
name
login
contributionsCollection {
totalCommitContributions
restrictedContributionsCount
}
repositoriesContributedTo(first: 1, contributionTypes: [COMMIT, ISSUE, PULL_REQUEST, REPOSITORY]) {
totalCount
}
pullRequests(first: 1) {
totalCount
}
openIssues: issues(states: OPEN) {
totalCount
}
closedIssues: issues(states: CLOSED) {
totalCount
}
followers {
totalCount
}
repositories(first: 100, ownerAffiliations: OWNER, orderBy: {direction: DESC, field: STARGAZERS}) {
totalCount
nodes {
stargazers {
totalCount
}
}
}
}
@rickstaa can you share the previous ticket number of the report which we sent to github with @JLLeitschuh?
I do have the same error with https://github-readme-stats.vercel.app/api?username=VincentLanglet
@VincentLanglet thanks a lot for your comment. Do you also get a timeout error when you fetch the data in the https://docs.github.com/en/graphql/overview/explorer.
@VincentLanglet thanks a lot for your comment. Do you also get a timeout error when you fetch the data in the https://docs.github.com/en/graphql/overview/explorer.
No, but seems like https://github-readme-stats.vercel.app/api?username=VincentLanglet is working today. There are day with, and day without
@VincentLanglet ah that looks like a timeout problem and might be related to https://github.com/anuraghazra/github-readme-stats/issues/1406. Unfortunately, we have no updates from the Github team on whether they are planning to fix this. 😕
Can I get a link to the support ticket? I can pass this along to the GitHub team, I have some direct connections I can leverage.
@JLLeitschuh Thanks a lot for offering to bring this issue to the attention of the GH team. The ticket is already closed and is under a private link. The ticket number, however, is 1369436.
For other people that end up on this issue, I solved this by choosing classic tokens instead of fine-grained ones.

So one of the reasons for this error, assuming there are multiple, might be the token type (or the fine grained config I did wrong).
Duplicate of #https://github.com/anuraghazra/github-readme-stats/issues/1406.