github-readme-stats
github-readme-stats copied to clipboard
Stats not showing on first load of GitHub profile page
Describe the bug
Stats not showing on first load of GitHub profile page (see screenshot) After refreshing the page, statistics as a rule are displayed.
This behavior became reproduce with status "always" after deploying stats to my own Vercel instance. Before deploying statistics to my own Vercel instance, reproducibility was "sometimes"
Do you guys have any idea how to fix it?
Expected behaviour
No response
Screenshots / Live demo link
Additional context
No response
try other links for now using https://github.com/anuraghazra/github-readme-stats/issues/2415
mostly because of network issues.
+1 - yet not solved
Can reproduce, but not just with GRS but with all images on my GitHub readme. And because I have so many images, a reload will show one image but make another one disappear! This is likely due to a bug with GitHub itself, and not GRS, and like @PencilNavigator mentioned, local network issues that you may be facing (Jio seems to cause a lot of issues with GitHub, including a complete blocking of the raw.githubusercontent.com domain).
Same Problem here
On first load, the image is not loaded
HTTP Request of the image from my GitHub profile page
General
Request URL: https://camo.githubusercontent.com/20130eebe5adcc15cd05484685ca01fe280310c04b28bb8c686c84bf966c9120/68747470733a2f2f6769746875622d726561646d652d73746174732d7a6574612d626963652d35382e76657263656c2e6170702f6170693f757365726e616d653d4672616e6b2d4d617965722673686f775f69636f6e733d74727565267468656d653d6769746875625f6461726b26636f756e745f707269766174653d7472756526686964655f626f726465723d74727565 Request Method: GET Status Code: 504 Remote Address: 185.199.110.133:443 Referrer Policy: strict-origin-when-cross-origin
Response Headers
accept-ranges: bytes cache-control: no-cache, no-store, private, must-revalidate content-length: 24 content-security-policy: upgrade-insecure-requests; default-src 'none'; img-src data:; style-src 'unsafe-inline' content-type: text/plain; charset=utf-8 date: Fri, 27 Jan 2023 17:00:25 GMT server: github-camo (859e2350) strict-transport-security: max-age=31536000; includeSubDomains timing-allow-origin: https://github.com via: 1.1 varnish x-cache: MISS x-cache-hits: 0 x-content-type-options: nosniff x-fastly-request-id: c21033c99d5099c3225edcecbb29146882d4e996 x-frame-options: deny x-github-request-id: AD2A:466B:743CD:EB1F7:63D40325 x-served-by: cache-fra-eddf8230131-FRA x-timer: S1674838822.719057,VS0,VE4118 x-xss-protection: 1; mode=block
Request Headers
:authority: camo.githubusercontent.com :method: GET :path: /20130eebe5adcc15cd05484685ca01fe280310c04b28bb8c686c84bf966c9120/68747470733a2f2f6769746875622d726561646d652d73746174732d7a6574612d626963652d35382e76657263656c2e6170702f6170693f757365726e616d653d4672616e6b2d4d617965722673686f775f69636f6e733d74727565267468656d653d6769746875625f6461726b26636f756e745f707269766174653d7472756526686964655f626f726465723d74727565 :scheme: https accept: image/avif,image/webp,image/apng,image/svg+xml,image/,/*;q=0.8 accept-encoding: gzip, deflate, br accept-language: de-DE,de;q=0.9,en-US;q=0.8,en;q=0.7,ja;q=0.6 cache-control: no-cache dnt: 1 pragma: no-cache referer: https://github.com/ sec-ch-ua: "Not_A Brand";v="99", "Google Chrome";v="109", "Chromium";v="109" sec-ch-ua-mobile: ?0 sec-ch-ua-platform: "macOS" sec-fetch-dest: image sec-fetch-mode: no-cors sec-fetch-site: cross-site user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36
Hi @andreynav, I was struggling with the same issue, but I think I have now resolved it.
Could you please try adding decoding="async" loading="lazy" attributes to your <img> tag?
<img decoding="async" loading="lazy" align="center" alt="Andrei's GitHub Stats" src="https://github-readme-stats-andreynav-andreynav.vercel.app/api?username=andreynav&layout=compact&show_icons=true&hide=stars,contribs&theme=dark&count_private=true&include_all_commits=true&bg_color=00000000&border_color=444c56&title_color=adbac7&text_color=768390&icon_color=39d353&hide_rank=true&card_width=400" />
Hi @mkredzel Thank you, I've made changes and will try to observe for a few days
Hi @mkredzel Thank you, I've made changes and will try to observe for a few days
I thought it was working, but I'm back to the same issue too...
@rickstaa closing this since it seems to be an issue with GitHub and how it loads its readme images rather than an issue with GRS.
@rickstaa closing this since it seems to be an issue with GitHub and how it loads its readme images rather than an issue with GRS.
If you are not sure, why need to close the issue? Bad way...
@rickstaa closing this since it seems to be an issue with GitHub and how it loads its readme images rather than an issue with GRS.
If you are not sure, why need to close the issue? Bad way...
The problem is with GitHub's CDN. The only way to solve this is to create a GitHub action. You can track progress on this feature at https://github.com/anuraghazra/github-readme-stats/issues/2179.