anuraghazra / github-readme-stats

:zap: Dynamically generated stats for your github readmes
https://github-readme-stats.vercel.app
MIT License
69.66k stars 23.09k forks source link

Wakatime progress bars not filled #2434

Closed carepollo closed 1 year ago

carepollo commented 1 year ago

Describe the bug

Using the following configuration https://github-readme-stats.vercel.app/api/wakatime?username=chickenface&theme=radical&custom_title=Last+7+Days+Coding+Stats&range=last_7_days&langs_count=5 The progress bars do not load and the coding times are not updated.

When I first added it to my README it worked perfectly, after a few days and ever since then it stays like this.

Expected behaviour

The progress bars should be visible and the coding times more accurate to what the Wakatime dashboard says.

Screenshots / Live demo link

image

image

Additional context

I have tried removing the range parameter, the theme parameter, the langs_count parameter, nothing changes. The numbers of coding time are not correct either but the difference is small, by 2 o 3 hours at most.

I have free plan of wakatime.

Zo-Bro-23 commented 1 year ago

Can reproduce. The next logical step would be to test it with a different user, but I don't know anyone else who uses Wakatime. If you can try this with a different user, please let us know the results.

carepollo commented 1 year ago

I do not know another user with wakatime, so I used the user from this other open issue on this repo about the Wakatime card and using the exact same config, I get the same problem, no progress bar shown.

Code Time

Zo-Bro-23 commented 1 year ago

My endpoint is working fine. (https://github-readme-stats.zohan.tech/api/wakatime?username=chickenface&theme=radical)

The latest commit to any files pertaining to wakatime, however, is really old, meaning that my fork shouldn't make a difference. @rickstaa any idea why this could be?

As for the timings that are slightly off, what the card shows is exactly what I see when I visit https://wakatime.com/@chickenface. Where did you take that screenshot from? Is it possible that that is lagging, since it shows everything to be less than what the stats card shows?

carepollo commented 1 year ago

My endpoint is working fine. (https://github-readme-stats.zohan.tech/api/wakatime?username=chickenface&theme=radical)

The latest commit to any files pertaining to wakatime, however, is really old, meaning that my fork shouldn't make a difference. @rickstaa any idea why this could be?

As for the timings that are slightly off, what the card shows is exactly what I see when I visit https://wakatime.com/@chickenface. Where did you take that screenshot from? Is it possible that that is lagging, since it shows everything to be less than what the stats card shows?

I took the screenshots to compare the timings from the dashboard, at the moment of opening the issue

Zo-Bro-23 commented 1 year ago

My endpoint is working fine. (https://github-readme-stats.zohan.tech/api/wakatime?username=chickenface&theme=radical) The latest commit to any files pertaining to wakatime, however, is really old, meaning that my fork shouldn't make a difference. @rickstaa any idea why this could be? As for the timings that are slightly off, what the card shows is exactly what I see when I visit https://wakatime.com/@chickenface. Where did you take that screenshot from? Is it possible that that is lagging, since it shows everything to be less than what the stats card shows?

I took the screenshots to compare the timings from the dashboard, at the moment of opening the issue

Hmm. Are the timings accurate now?

rickstaa commented 1 year ago

@carepollo I think your problems are caused by us caching the card results to decrease the load on the Vercel instance (see https://github.com/anuraghazra/github-readme-stats#common-options). It takes 4 hours for the card to update in the public instance. You can change this value in your fork and deploy your own Vercel instance if it is lower than 4 hours (See https://github.com/anuraghazra/github-readme-stats#deploy-on-your-own-vercel-instance). I created https://github.com/anuraghazra/github-readme-stats/pull/2266 to make this process easier, but it still needs to be merged.

carepollo commented 1 year ago

@carepollo I think your problems are caused by us caching the card results to decrease the load on the Vercel instance (see https://github.com/anuraghazra/github-readme-stats#common-options). It takes 4 hours for the card to update in the public instance. You can change this value in your fork and deploy your own Vercel instance if it is lower than 4 hours (See https://github.com/anuraghazra/github-readme-stats#deploy-on-your-own-vercel-instance). I created #2266 to make this process easier, but it still needs to be merged.

The timing difference is not the main issue for me, is the progress bars not being filled, at any time, even checking every 4 hours, they are not filled.

Zo-Bro-23 commented 1 year ago

@carepollo I think your problems are caused by us caching the card results to decrease the load on the Vercel instance (see https://github.com/anuraghazra/github-readme-stats#common-options). It takes 4 hours for the card to update in the public instance. You can change this value in your fork and deploy your own Vercel instance if it is lower than 4 hours (See https://github.com/anuraghazra/github-readme-stats#deploy-on-your-own-vercel-instance). I created #2266 to make this process easier, but it still needs to be merged.

The timing difference is not the main issue for me, is the progress bars not being filled, at any time, even checking every 4 hours, they are not filled.

@rickstaa any idea why that is? My own Vercel instance seems to work well (see above).

rickstaa commented 1 year ago

@carepollo I think your problems are caused by us caching the card results to decrease the load on the Vercel instance (see https://github.com/anuraghazra/github-readme-stats#common-options). It takes 4 hours for the card to update in the public instance. You can change this value in your fork and deploy your own Vercel instance if it is lower than 4 hours (See https://github.com/anuraghazra/github-readme-stats#deploy-on-your-own-vercel-instance). I created #2266 to make this process easier, but it still needs to be merged.

The timing difference is not the main issue for me, is the progress bars not being filled, at any time, even checking every 4 hours, they are not filled.

@rickstaa any idea why that is? My own Vercel instance seems to work well (see above).

I need to debug the code to figure out what is going wrong. I, however, am currently very busy with my graduation, so I need more time. If you want to debug this issue, you can:

  1. Clone (your fork) of the repository.
  2. Install the dependencies npm i.
  3. Run the project using vercel dev.
  4. Add vscode debug statements in the code where the Wakatime bars are created (see https://github.com/vercel/vercel/issues/2864#issuecomment-963533339).
  5. Request @carepollo's query on the localhost localhost:3000/api/wakatime?username=chickenface&theme=radical&custom_title=Last+7+Days+Coding+Stats&range=last_7_days&langs_count=5.
  6. Inspect the results in vscode.
rickstaa commented 1 year ago

Hello!!!!! Any update? 😄

Same here #2440

I have yet to have time to look at this. Maybe somebody else can investigate 👍. The debug steps are found in https://github.com/anuraghazra/github-readme-stats/issues/2434#issuecomment-1396677126.

Zo-Bro-23 commented 1 year ago

Hello!!!!! Any update? 😄

Same here #2440

I have yet to have time to look at this. Maybe somebody else can investigate 👍. The debug steps are found in https://github.com/anuraghazra/github-readme-stats/issues/2434#issuecomment-1396677126.

Again, my deployment is working fine, and I'm up-to-date with master 😶

rickstaa commented 1 year ago

Hello!!!!! Any update? 😄 Same here #2440

I have yet to have time to look at this. Maybe somebody else can investigate 👍. The debug steps are found in #2434 (comment).

Again, my deployment is working fine, and I'm up-to-date with master 😶

Nice; if somebody can test this out and comment below, we can close this issue 👍.

Zo-Bro-23 commented 1 year ago

Hello!!!!! Any update? 😄 Same here #2440

I have yet to have time to look at this. Maybe somebody else can investigate 👍. The debug steps are found in #2434 (comment).

Again, my deployment is working fine, and I'm up-to-date with master 😶

Nice; if somebody can test this out and comment below, we can close this issue 👍.

See this comment.

guillaumearnx commented 1 year ago

Not working for me, but I'm up to date with master ... image domain : https://garnx.vercel.app

rickstaa commented 1 year ago

s://garnx.vercel.app

Okay, thanks for letting us know. I sadly don't have the time right now to investigate this issue. I will, however, have the time to review a PR with a fix if somebody wants to take it on. The debug steps are found at https://github.com/anuraghazra/github-readme-stats/issues/2434#issuecomment-1396677126. Let me know if you have any questions. 👍

NathanCheshire commented 1 year ago

Just to add, my endpoint has also stopped rendering the progress bar: https://github-readme-stats.vercel.app/api/wakatime?username=nathancheshire&theme=radical&custom_title=Time%20spent%20this%20year&line_height=25&langs_count=7&hide_border=true&border_radius=20&hide=Other,Text,JSON,YAML

Image: image

Zo-Bro-23 commented 1 year ago

Public endpoint

My endpoint

Your endpoint

@rickstaa seems like a high priority issue. I'm not able to figure out which commit broke the card on the master branch (it works fine on my branch which is around the Dec/Jan version of master) though. Perhaps 06a2a78.

rickstaa commented 1 year ago

@Zo-Bro-23, the set animations were missing. I created a quick fix https://github.com/anuraghazra/github-readme-stats/pull/2519. I think the CSS and SVG generation code can be cleaned up when #1633 is implemented.

carepollo commented 1 year ago

currently using the @Zo-Bro-23 as it used to work just fine as I needed, but today I noticed that is now getting the same issue as the original repo.

image Here is a static image and the configuration I am using https://github-readme-stats.zohan.tech/api/wakatime?username=chickenface&theme=radical&custom_title=Last+7+Days+Coding+Stats&range=last_7_days&langs_count=5 also the original repo at the time of writing this comment is not filling the progress bars.

rickstaa commented 1 year ago

currently using the @Zo-Bro-23 as it used to work just fine as I needed, but today I noticed that is now getting the same issue as the original repo.

image Here is a static image and the configuration I am using https://github-readme-stats.zohan.tech/api/wakatime?username=chickenface&theme=radical&custom_title=Last+7+Days+Coding+Stats&range=last_7_days&langs_count=5 also the original repo at the time of writing this comment is not filling the progress bars.

Does #2519 cix the issues you are having?

Zo-Bro-23 commented 1 year ago

currently using the @Zo-Bro-23 as it used to work just fine as I needed, but today I noticed that is now getting the same issue as the original repo.

image Here is a static image and the configuration I am using https://github-readme-stats.zohan.tech/api/wakatime?username=chickenface&theme=radical&custom_title=Last+7+Days+Coding+Stats&range=last_7_days&langs_count=5 also the original repo at the time of writing this comment is not filling the progress bars.

Likely because I synced up my fork recently. Try this URL for the time being: https://github-readme-stats-git-fixwaka-605c1a-github-readme-stats-team.vercel.app. Once #2519 is merged, this will be fixed in the main instance, but we can't merge without @anuraghazra approval.