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

Cards not updating if information changes. #275

Closed
Lekesoldat opened this issue Jul 31, 2020 · 40 comments
Closed

Cards not updating if information changes. #275

Lekesoldat opened this issue Jul 31, 2020 · 40 comments
Labels
bug Something isn't working.

Comments

@Lekesoldat
Copy link

Describe the bug
Images loaded in the README does not update.

Expected behavior
When I delete files / add code / do changes, my stats should update.

Screenshots / Live demo link (paste the github-readme-stats link as markdown image)
Have a look at my profile, - stats are not updated.

Additional context
Read more here. It's a problem due to caching.

Server should send cache headers stating that cache should be turned off or very time limited.

@anuraghazra
Copy link
Owner

Github readme stat uses minimum of 30min caching, and it's expected behaviour.

@nombrekeff
Copy link
Contributor

We should pin this issue or some other similar one, as people have reported it multiple times already

@anuraghazra
Copy link
Owner

We should pin this issue or some other similar one, as people have reported it multiple times already

I think its ok we don't need to that, maybe we can add notes on common issues in the issue template itself.

@pandyaved98
Copy link

MY GitHub read me stats isn't updating. I've created a new repo and committed some files in it but it's still showing the same as before no increment in numbers.

@nombrekeff
Copy link
Contributor

nombrekeff commented May 21, 2021

@pandyaved98 hey there!

As the issue and docs indicate, there is a cache in place, I don't know how long it is currently. But it should reflect the changes in some time.

Note on cache: Repo cards have a default cache of 4 hours (14400 seconds) if the fork count & star count is less than 1k, otherwise, it's 2 hours (7200 seconds). Also, note that the cache is clamped to a minimum of 2 hours and a maximum of 24 hours.

@danglequocbao001
Copy link

My github read me stats updated, but when I display it by html in read me on github it not update same as go to the link by direct

@thedocscripts
Copy link

have the same issue

@rickstaa
Copy link
Collaborator

rickstaa commented May 21, 2022

We use caching to decrease the server load. Due to high server loads, the caching time has recently been updated to 4 hours in 9d2bfd9.

@rickstaa rickstaa added the bug Something isn't working. label May 21, 2022
@sanjanastyles
Copy link

We use caching to decrease the server load. Due to high server loads, the caching time has recently been updated to 4 hours in 9d2bfd9.

Honestly, its been quite few days I've_ been using this stat card, and it has never once updated since then. Please look into the issue, or at least tell us how to update it even if its manual. Thanks

@rickstaa
Copy link
Collaborator

rickstaa commented Jul 6, 2022

@sanjanastyles I checked your account using the graphql explorer and it looks the card is up to date. You can check this yourself in the [graphql explorer](graphql explorer). The following syntax:

query userInfo($login: String!) {
  user(login: $login) {
    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
        }
      }
    }
  }
}
{"login": "sanjanastyles"}

Gives:

{
  "data": {
    "user": {
      "name": "KANATA",
      "login": "sanjanastyles",
      "contributionsCollection": {
        "totalCommitContributions": 67,
        "restrictedContributionsCount": 0
      },
      "repositoriesContributedTo": {
        "totalCount": 1
      },
      "pullRequests": {
        "totalCount": 0
      },
      "openIssues": {
        "totalCount": 0
      },
      "closedIssues": {
        "totalCount": 0
      },
      "followers": {
        "totalCount": 4
      },
      "repositories": {
        "totalCount": 5,
        "nodes": [
          {
            "stargazers": {
              "totalCount": 0
            }
          },
          {
            "stargazers": {
              "totalCount": 0
            }
          },
          {
            "stargazers": {
              "totalCount": 0
            }
          },
          {
            "stargazers": {
              "totalCount": 0
            }
          },
          {
            "stargazers": {
              "totalCount": 0
            }
          }
        ]
      }
    }
  }
}

GitHub stats

@KimeriTenko
Copy link

Mine stopped updating weeks ago and I've added new repos since

@rickstaa
Copy link
Collaborator

rickstaa commented Sep 15, 2022

@KimeriTenko Thanks for your comment. Please be aware that we are using a 4-hour cache time before results show up (see https://github.com/anuraghazra/github-readme-stats#gradient-in-bg_color). I checked your cards, but the results look up to date:

Anurag's GitHub stats

Top Langs

@vaishnav-mandlik
Copy link

GitHub Stats as it is since added in README

@BeatrizARibeiro
Copy link

My GitHub read me Stats not updtating

@vaishnav-mandlik
Copy link

My GitHub read me Stats not updtating

GitHub read me stats updates after 12 am

@rickstaa
Copy link
Collaborator

rickstaa commented Nov 3, 2022

@BeatrizARibeiro @vaishnav-mandlik is right we use a caching mechanism to reduce the server load (see https://github.com/anuraghazra/github-readme-stats#common-options).

@thaisalesz
Copy link

I'm having a similar issue, one of my cards is not showing any information for a few days now, but if I open de link directly it seems to be working fine.

@rickstaa
Copy link
Collaborator

@thaisalesz Thanks for your question. I checked your card and your stats seem to be updated. You can check this by using the following syntax in the GraphQL explorer:

query userInfo($login: String!) {
  user(login: $login) {
    name
    login
    contributionsCollection {
      totalCommitContributions
      restrictedContributionsCount
    }
  }
}
{"login": "thaisalesz"}

Anurag's GitHub stats

[![Anurag's GitHub stats](https://github-readme-stats.vercel.app/api?username=thaisalesz)](https://github.com/anuraghazra/github-readme-stats)

I think you are experiencing the problem because we use a min caching period of 4 hours (see https://github.com/anuraghazra/github-readme-stats#common-options). Every update, therefore, takes 4 hours to be visible on the card. I created #2266 to allow users to set lower values for their own Vercel instances.

@sban2009
Copy link

Hi @rickstaa I have 2 repos using JS. The link is opening up to the correct stats but in my README, it is not showing. Any suggestions?

@rickstaa
Copy link
Collaborator

Hi @rickstaa I have 2 repos using JS. The link is opening up to the correct stats but in my README, it is not showing. Any suggestions?

@sban2009 we use caching to reduce the server load. Your README will likely update in 4 hours (see https://github.com/anuraghazra/github-readme-stats#common-options).

@sban2009
Copy link

@rickstaa added one of the JS ones a long time back

@rickstaa
Copy link
Collaborator

@sban2009 I checked the results we retrieved from GitHub, and it looks like your card is correct. You can test it out yourself using the following syntax in the GraphQL API:

query userInfo($login: String!) {
  user(login: $login) {
    # fetch only owner repos & not forks
    repositories(ownerAffiliations: OWNER, isFork: false, first: 100) {
      nodes {
        name
        languages(first: 10, orderBy: {field: SIZE, direction: DESC}) {
          edges {
            size
            node {
              color
              name
            }
          }
        }
      }
    }
  }
}
{"login": "sban2009"}

The https://github.com/sban2009/carbon-tutorial results do not show up since it is a fork, and we currently do not include results of forks (see #1255).

@KimeriTenko
Copy link

KimeriTenko commented Nov 21, 2022 via email

@mrv8x
Copy link

mrv8x commented Nov 24, 2022

@rickstaa I'm having the same issue please check https://github-readme-stats.vercel.app/api?username=mrv8x&line_height=40&show_icons=true&theme=radical
{ "data": { "user": { "name": "B. Hamza", "login": "mrv8x", "contributionsCollection": { "totalCommitContributions": 90, "restrictedContributionsCount": 0 } } } }

@rickstaa
Copy link
Collaborator

@rickstaa I'm having the same issue please check https://github-readme-stats.vercel.app/api?username=mrv8x&line_height=40&show_icons=true&theme=radical { "data": { "user": { "name": "B. Hamza", "login": "mrv8x", "contributionsCollection": { "totalCommitContributions": 90, "restrictedContributionsCount": 0 } } } }

@mrv8x No problem you can your stats yourself in the GraphQL explorer using the following syntax:

query userInfo($login: String!) {
  user(login: $login) {
    name
    login
    contributionsCollection {
      totalCommitContributions
      restrictedContributionsCount
    }
  }
}
{"login": "mrv8x"}

or for the language card:

query userInfo($login: String!) {
  user(login: $login) {
    # fetch only owner repos & not forks
    repositories(ownerAffiliations: OWNER, isFork: false, first: 100) {
      nodes {
        name
        languages(first: 10, orderBy: {field: SIZE, direction: DESC}) {
          edges {
            size
            node {
              color
              name
            }
          }
        }
      }
    }
  }
}
{"login": "mrv8x"}

You can add a random parameter (i.e. radfasf&arasfda) to force the cache to reset.

[![Anurag's GitHub stats](https://github-readme-stats.vercel.app/api?username=mrv8x&radfasf&arasfda`)](https://github.com/anuraghazra/github-readme-stats)

Anurag's GitHub stats

[![Top Langs](https://github-readme-stats.vercel.app/api/top-langs/?username=mrv8x&radfasf&arasfda`)](https://github.com/anuraghazra/github-readme-stats)

Top Langs

@rickstaa
Copy link
Collaborator

The results on your cards look correct.

{
  "data": {
    "user": {
      "name": "B. Hamza",
      "login": "mrv8x",
      "contributionsCollection": {
        "totalCommitContributions": 4,
        "restrictedContributionsCount": 92
      }
    }
  }
}

You can include the count_private argument.

@Edmartt
Copy link

Edmartt commented Jun 23, 2023

The results on your cards look correct.

{
  "data": {
    "user": {
      "name": "B. Hamza",
      "login": "mrv8x",
      "contributionsCollection": {
        "totalCommitContributions": 4,
        "restrictedContributionsCount": 92
      }
    }
  }
}

You can include the count_private argument.

I have 143 pull request, this 4 hours turned to be several weeks, friend, counting juts 108, something is wrong

@qwerty541
Copy link
Collaborator

qwerty541 commented Jun 23, 2023

The results on your cards look correct.

{
  "data": {
    "user": {
      "name": "B. Hamza",
      "login": "mrv8x",
      "contributionsCollection": {
        "totalCommitContributions": 4,
        "restrictedContributionsCount": 92
      }
    }
  }
}

You can include the count_private argument.

I have 143 pull request, this 4 hours turned to be several weeks, friend, counting juts 108, something is wrong

@Edmartt I checked your profile and detected that most of your contributions are private. Most likely it is the source of your problem. Query parameter count_private was recently removed (#2736) due to it's confusing behaviour and to include your private contributions you should deploy you own vercel instance using own GitHub API token.

@Edmartt
Copy link

Edmartt commented Jun 23, 2023

The results on your cards look correct.

{
  "data": {
    "user": {
      "name": "B. Hamza",
      "login": "mrv8x",
      "contributionsCollection": {
        "totalCommitContributions": 4,
        "restrictedContributionsCount": 92
      }
    }
  }
}

You can include the count_private argument.

I have 143 pull request, this 4 hours turned to be several weeks, friend, counting juts 108, something is wrong

@Edmartt I checked your profile and detected that most of your contributions are private. Most likely it is the source of your problem. Query parameter count_private was recently removed (#2736) due to it's confusing behaviour and to include your private contributions you should deploy you own vercel instance using own GitHub API token.

imagen

@rickstaa
Copy link
Collaborator

The results on your cards look correct.

{
  "data": {
    "user": {
      "name": "B. Hamza",
      "login": "mrv8x",
      "contributionsCollection": {
        "totalCommitContributions": 4,
        "restrictedContributionsCount": 92
      }
    }
  }
}

You can include the count_private argument.

I have 143 pull request, this 4 hours turned to be several weeks, friend, counting juts 108, something is wrong

@Edmartt I checked your profile and detected that most of your contributions are private. Most likely it is the source of your problem. Query parameter count_private was recently removed (#2736) due to it's confusing behaviour and to include your private contributions you should deploy you own vercel instance using own GitHub API token.

imagen

Looks like a Vercel API error. I think you should wait a bit and try again 🤔. The Vercel status can be found here.

@Edmartt
Copy link

Edmartt commented Jun 23, 2023

The results on your cards look correct.

{
  "data": {
    "user": {
      "name": "B. Hamza",
      "login": "mrv8x",
      "contributionsCollection": {
        "totalCommitContributions": 4,
        "restrictedContributionsCount": 92
      }
    }
  }
}

You can include the count_private argument.

I have 143 pull request, this 4 hours turned to be several weeks, friend, counting juts 108, something is wrong

@Edmartt I checked your profile and detected that most of your contributions are private. Most likely it is the source of your problem. Query parameter count_private was recently removed (#2736) due to it's confusing behaviour and to include your private contributions you should deploy you own vercel instance using own GitHub API token.

It was solved, I forgot about forking the repo, thanks.

@0x5b62656e5d
Copy link

I know the caching time is 4 hours or so, but the data just stopped updating some time while ago. The commits are stuck at 155 but when I counted mine (including priv repos), its 271. I just created a new vercel instance and it's not updated either

@qwerty541
Copy link
Collaborator

@0x5b62656e5d It is not an erro from our side since it is exactly what GitHub API returns.

image

If commits count not changed after deploying own vercel instance most likely your GitHub API personal access token permissions was configured not correctly.

@SakshamShandilya
Copy link

Hello @rickstaa, I'm experiencing the same problem; it's not updating and displaying significantly low statistics.

@rickstaa
Copy link
Collaborator

rickstaa commented Jan 2, 2024

Hello @rickstaa, I'm experiencing the same problem; it's not updating and displaying significantly low statistics.

Hey @SakshamShandilya. We use caching to decrease server load, so it might take up to 6 hours for your stats to be visible on the cards (see https://github.com/anuraghazra/github-readme-stats?tab=readme-ov-file#important-notices-). Furthermore, due to upstream limitations, we currently don't include data from forks and organization repositories 😅 (see #3109 and #1). You can use the GraphQL queries at #275 (comment) to see if something else is happening. I hope this helps you. If you have any more questions feel free to let me know 👍🏻.

@Soumilgit
Copy link

Facing same issue here...lots of Javascript files in my repo https://github.com/Soumilgit/YourStory-Digital-Innovation-Hackathon-HackerEarth but the total proportion of Javascript in the languages card of the repo itself is showing Javascript proportion as 11.7 % only,even on visually checking the files,it seems to be higher(inside node_modules).Please help!

@qwerty541
Copy link
Collaborator

Facing same issue here...lots of Javascript files in my repo https://github.com/Soumilgit/YourStory-Digital-Innovation-Hackathon-HackerEarth but the total proportion of Javascript in the languages card of the repo itself is showing Javascript proportion as 11.7 % only,even on visually checking the files,it seems to be higher(inside node_modules).Please help!

Hey @Soumilgit. By default langauges usage percentages calculation based on bytes count, therefore it means the total size of HTML files in your repository in significantly higher than the size of Javascript files, not depending from the files count.

@Soumilgit
Copy link

OK,fine 👍

@immark007
Copy link

My statistics on github are not updating, it is stuck at 28 commits, although I have much more

@rohansx
Copy link

rohansx commented Oct 17, 2024

@anuraghazra
my stats are not updating...
you can see I have done more than 128 PR and its still showing 83 PRs

image
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working.
Projects
None yet
Development

No branches or pull requests