github-readme-stats icon indicating copy to clipboard operation
github-readme-stats copied to clipboard

It keeps saying "Something went wrong!"

Open NianBroken opened this issue 9 months ago • 4 comments

My GitHub permissions are all enabled, as you can see in the screenshot below.
But I still can't get your project to work—it keeps giving me this "Something went wrong!" message. I've even tried using different devices, but no matter what, it's still the same old "Something went wrong!"
The URL I'm using is:
"https://github-readme-stats.vercel.app/api?username=nianbroken&include_all_commits=true&rank_icon=github&hide_title=true"

Image

Image

NianBroken avatar May 21 '25 16:05 NianBroken

+1

Image

twofaktor avatar May 21 '25 22:05 twofaktor

Steps to Troubleshoot and Resolve

1. Verify the Username

Ensure that the username in the URL is correct. For example:

https://github-readme-stats.vercel.app/api?username=nianbroken

2. Enable Private Contributions in GitHub Settings

  • Go to Settings > Profile > Contributions & activity.
  • Ensure the option "Include private contributions on my profile" is checked.

3. Use a GitHub Personal Access Token

If you want to include private contributions, you need to pass a GitHub Personal Access Token in the URL:

  1. Go to GitHub Settings > Developer Settings > Personal Access Tokens > Tokens (classic).
  2. Click Generate new token and select the following scopes:
    • read:user
    • repo
  3. Use the token in the URL like this:
    https://github-readme-stats.vercel.app/api?username=nianbroken&count_private=true&token=YOUR_PERSONAL_ACCESS_TOKEN
    

4. Test with Minimal Parameters

Sometimes, extra parameters can cause issues. Test the minimal version of the URL:

https://github-readme-stats.vercel.app/api?username=nianbroken

5. Check Service Status

The service might be down or rate-limited:

6. Debug Locally

If the problem persists, debug locally by running the service:

  1. Clone the repository:
    git clone https://github.com/anuraghazra/github-readme-stats.git
    cd github-readme-stats
    
  2. Install dependencies and start the server:
    npm install
    npm start
    
  3. Access the stats locally to debug issues.

7. Updated Parameters for Your Case

The following URL includes all necessary parameters for private contributions:

https://github-readme-stats.vercel.app/api?username=nianbroken&include_all_commits=true&rank_icon=github&hide_title=true&count_private=true&token=YOUR_PERSONAL_ACCESS_TOKEN

If these steps do not resolve the issue, please let me know, and I can assist further.

eryckassis avatar May 26 '25 00:05 eryckassis

Hi @NianBroken,

I noticed your issue (#4269) regarding the "Something went wrong!" error. Out of curiosity, I tested the URL you provided: https://github-readme-stats.vercel.app/api?username=nianbroken&include_all_commits=true&rank_icon=github&hide_title=true, and it seems to be working fine now.

Can you confirm if the issue is resolved on your end? If so, it might be safe to close this issue. Let me know if you're still encountering any problems!

— @ikramagix

ikramagix avatar Jun 10 '25 10:06 ikramagix

Solved for me

twofaktor avatar Jun 10 '25 11:06 twofaktor

The "Something went wrong" indicates also "Could not fetch total commits. Please try again later" once the include_all_commits is false, it works. Is it some rate limit exception from Github?!

shahart avatar Jul 28 '25 16:07 shahart

Hello guys

Thank you for opening this issue!

This problem happens sometimes when the upstream GitHub API respond with error for some reason (for example due to high load on the GitHub servers). This should be resolved automatically after some time. I don't see anything we can do about it from our side besides rendering clear error message.

qwerty541 avatar Sep 10 '25 15:09 qwerty541