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

bug: passing a wrong theme now causes 500 Internal Error

Open mikyll opened this issue 2 months ago โ€ข 8 comments

Describe the bug

When passing a theme that does not exist in query params (theme=...), I get the following error:

500: INTERNAL_SERVER_ERROR
Code: FUNCTION_INVOCATION_FAILED
ID: fra1::hrdcg-1762421377288-2993a3767f96

Expected behavior

I'd like to have the default theme as a fallback.

Screenshots / Live demo link

https://github-readme-stats.vercel.app/api?username=mikyll&show_icons=not&theme=foobar

Image

Additional context

I noticed this some day ago, so I think this bug was mistakenly introduced with most recent commits

mikyll avatar Nov 06 '25 09:11 mikyll

Hey @mikyll ๐Ÿ‘‹๐Ÿป

would love to work on this issue. Kindly assign it to me!

iemafzalhassan avatar Nov 06 '25 19:11 iemafzalhassan

Hello @anuraghazra ๐Ÿ‘‹๐Ÿผ

can you please review the PR.

iemafzalhassan avatar Nov 07 '25 03:11 iemafzalhassan

Hi @iemafzalhassan

I'm not a maintainer, so I cannot assign the issue nor review your PR ๐Ÿ˜…

mikyll avatar Nov 07 '25 08:11 mikyll

Oops I thought you're maintaining this project. sorry

iemafzalhassan avatar Nov 07 '25 09:11 iemafzalhassan

@iemafzalhassan I had a quick look at your PR out of curiosity...

You made changes in a branch that is 394 commits behind the main branch ๐Ÿ˜•

Moreover, the file where you made the fix src/common/utils.js, is not even present anymore on the main branch, since it was renamed to src/common/render.js with this commit: https://github.com/anuraghazra/github-readme-stats/commit/c43fd65bdd7bbb5e60ca8ccd480c488536516905.

mikyll avatar Nov 10 '25 13:11 mikyll

I thought I was the only one with this bug, but I guess it's everyone!

Franklyn-R-Silva avatar Nov 25 '25 20:11 Franklyn-R-Silva

Yes Sorry Reopened a Ticket just a couple hours ago the issue still persists :/

JF-2121 avatar Nov 26 '25 12:11 JF-2121

@JF-2121 the issue you opened (https://github.com/anuraghazra/github-readme-stats/issues/4661) is related to Vercel deployment, this one is related to application logic.

Currently theme query parameter doesn't have a default fallback when the theme specified with query parameters doesn't exist.

mikyll avatar Nov 26 '25 13:11 mikyll

Try thisย https://github.com/pranesh-2005/github-readme-stats-fast Fast version and changes reflect instantly

Pranesh-2005 avatar Dec 13 '25 13:12 Pranesh-2005