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

Cannot read property 'data' of undefined #1463

Closed
JLLeitschuh opened this issue Nov 16, 2021 · 13 comments
Closed

Cannot read property 'data' of undefined #1463

JLLeitschuh opened this issue Nov 16, 2021 · 13 comments
Labels
bug Something isn't working. upstream Problems caused by upstream issues.

Comments

@JLLeitschuh
Copy link

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.

Screen Shot 2021-11-16 at 5 12 00 PM

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.

@anuraghazra
Copy link
Owner

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.

@anuraghazra
Copy link
Owner

Here, see how the graphql API is timing out.

image

@JLLeitschuh
Copy link
Author

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.

@rickstaa
Copy link
Collaborator

rickstaa commented Nov 17, 2021

@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 #1406 when I hear from them. The GitHub support ticket number is 1369436.

@anuraghazra
Copy link
Owner

anuraghazra commented Nov 17, 2021

Here's the GraphQL query

Here's the previous issue where we were discussing the same problem but we found a workaround:
#1406

Here's the hotfix which I did: #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?

@VincentLanglet
Copy link

I do have the same error with https://github-readme-stats.vercel.app/api?username=VincentLanglet

@rickstaa
Copy link
Collaborator

@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
Copy link

@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

@rickstaa
Copy link
Collaborator

rickstaa commented Feb 18, 2022

@VincentLanglet ah that looks like a timeout problem and might be related to #1406. Unfortunately, we have no updates from the Github team on whether they are planning to fix this. 😕

@JLLeitschuh
Copy link
Author

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.

@rickstaa
Copy link
Collaborator

@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.

@rickstaa rickstaa added bug Something isn't working. upstream Problems caused by upstream issues. labels Mar 9, 2022
@marcospb19
Copy link

For other people that end up on this issue, I solved this by choosing classic tokens instead of fine-grained ones.

image

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).

@rickstaa
Copy link
Collaborator

rickstaa commented May 6, 2023

Duplicate of ##1406.

@rickstaa rickstaa closed this as completed May 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working. upstream Problems caused by upstream issues.
Projects
None yet
Development

No branches or pull requests

5 participants