badgen/badgen.net

Chrome web store badge doesn't always show the "K"

bokub opened this issue ยท 9 comments

bokub commented

Hello @amio !

This badge says "4" when I open it in my browser, when it's supposed to say "4K".

image
However, it says "4K" when I include it on GitHub using markdown, which is very weird...

image


Here is the dynamic badge. Right now, I see "4K", but maybe it will say "4" in a few hours ๐Ÿคท
badge

Do you have an explanation for this weird behavior?
Thanks!

amio commented

That's strange ๐Ÿค”

bokub commented

Yes, very strange!

Do you also see "5" when you open the link ?

bokub commented

Screenshot_20220827_111711_com.android.chrome.png

So weird, I see 5.
I'm on mobile, on a different network since last time...

bokub commented

Hello !

It looks like this bug it still going on, and it's now visible directly on the homepage of badgen.net, where I can read "200 users", while there are actually 200k users

image

The issue might be coming from webextension-store-meta, which looks abandonned by its maintainer

bokub commented

Oh, I think I understand now ! The result seems to depend on the request location

For example,

  • with a proxy based in New York, I see 200K
  • with a proxy based in Francfort, I see 200

Maybe the chrome web store response depends on the location, and this is not properly handled by webextension-store-meta for European countries...

bokub commented

As a temporary fix, I created a runkit endpoint to fix this badge:

https://runkit.com/bokub/chrome-web-store-users

Example badge using this endpoint: Chrome users
URL: https://badgen.net/runkit/bokub/chrome-web-store-users/hpoiflhmfklhfcfpibmdmpeonphmdbda

amio commented

Thanks @bokub !
I'm doing an refactor #579 , I'll integrate the fix in the migration.

amio commented

This should get fixed by now, thanks @bokub !