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

Stats not showing on first load of GitHub profile page

Open andreynav opened this issue 2 years ago • 8 comments

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

see bug image

Additional context

No response

andreynav avatar Jan 20 '23 14:01 andreynav

try other links for now using https://github.com/anuraghazra/github-readme-stats/issues/2415

mostly because of network issues.

pencilnav avatar Jan 20 '23 14:01 pencilnav

+1 - yet not solved

terremoth avatar Jan 20 '23 19:01 terremoth

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).

Zo-Bro-23 avatar Jan 21 '23 11:01 Zo-Bro-23

Same Problem here

On first load, the image is not loaded

Bildschirm­foto 2023-01-27 um 15 30 49

tsukinoko-kun avatar Jan 27 '23 14:01 tsukinoko-kun

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

tsukinoko-kun avatar Jan 27 '23 17:01 tsukinoko-kun

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" />

mkredzel avatar Feb 05 '23 00:02 mkredzel

Hi @mkredzel Thank you, I've made changes and will try to observe for a few days

andreynav avatar Feb 05 '23 09:02 andreynav

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...

mkredzel avatar Feb 05 '23 12:02 mkredzel

@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.

Zo-Bro-23 avatar Feb 08 '23 11:02 Zo-Bro-23

@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...

andreynav avatar Feb 08 '23 11:02 andreynav

@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.

rickstaa avatar Feb 08 '23 12:02 rickstaa