Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problems with using StackOverflow reputation badge #5415

Closed
1 of 3 tasks
Yoskutik opened this issue Aug 12, 2020 · 17 comments · Fixed by #8539
Closed
1 of 3 tasks

Problems with using StackOverflow reputation badge #5415

Yoskutik opened this issue Aug 12, 2020 · 17 comments · Fixed by #8539
Labels
question Support questions, usage questions, unconfirmed bugs, discussions, ideas

Comments

@Yoskutik
Copy link

you experiencing an issue with...

🪲 Description

When I use StackOverflow reputation badge without any parameters everything works okay:

But when I add parameters in order to change badge color or shape, it says there's invalid parameters

Also, if I want to change title from stackoverflow reputation to StackOverflow reputation:

🔗 Link to the badge

💡 Possible Solution

¯_(ツ)_/¯

@Yoskutik Yoskutik added the question Support questions, usage questions, unconfirmed bugs, discussions, ideas label Aug 12, 2020
@Yoskutik
Copy link
Author

Yoskutik commented Aug 12, 2020

Hm, actually. Even https://img.shields.io/stackexchange/stackoverflow/r/11589183 now says that parameters are invalid

image

@paulmelnikow
Copy link
Member

Thanks for the report. Weird! This issue is very strange, and must be related either to the Shields onboard caching logic (or possibly the CDN, though I doubt it). I expect it will resolve itself whenever the bad data is evicted from the cache.

It works fine locally and on staging.

If the underlying issue is the onboard cache, probably the best solution is to remove that cache, something I've wanted to do anyway. (#3368)

@Yoskutik
Copy link
Author

Thank you. It did resolve itself for the next day.

@MacroPower
Copy link
Contributor

MacroPower commented Aug 18, 2020

I'm seeing this issue intermittently. Right now, every badge on this page shows "invalid parameters". I've also tested on multiple browsers and even computers. It seems random, it will work for several hours and then revert back to "invalid parameters".

image

Edit: And now they're working again.

@Yoskutik Yoskutik reopened this Aug 18, 2020
@chris48s
Copy link
Member

Wild speculation, but I wonder if this is a manifestation of #3591 ?

from https://api.stackexchange.com/docs/throttle :

Note that exactly what response an application gets (in terms of HTTP code, text, and so on) is undefined when subject to this ban; we consider > 30 request/sec per IP to be very abusive and thus cut the requests off very harshly.

I guess we could be getting rejected with a 400 for making too many requests (which might explain this error and the intermittent behaviour)

@gepser
Copy link

gepser commented Aug 25, 2020

I have the same issue, they work and stop working randomly

@paulmelnikow
Copy link
Member

@chris48s I guess I’m confused that we’re getting “invalid parameter” on this, which sounds like, in addition to needing more rate limit, there’s also a bug in that we return what sounds like a permanent error instead of “unreachable.”

@chris48s
Copy link
Member

chris48s commented Aug 27, 2020

The message "invalid parameters" implies we're getting a 400 response from the upstream API based on the code:

errorMessages: {
400: 'invalid parameters',
},

We don't know why that is happening. It would indeed be conventional for a 400 response to indicate that we are issuing an invalid or erroneous request. It would also be conventional to reject a request with something like a 429 if a rate limit has been exceeded. The reason I suggested the 400 might be rate-limit related in this case is because of that quote from the documentation I posted:

exactly what response an application gets (in terms of HTTP code, text, and so on) is undefined

but I don't really know.

@paulmelnikow
Copy link
Member

Ah, I gotcha. It’s too bad they seem to send a 400 for both things!

@roman-1983
Copy link

Any update on this?

@cdhunt
Copy link

cdhunt commented Oct 13, 2022

Let me know if you want some help with the rate limiting.

@chris48s
Copy link
Member

Yes. We'd love to find out if the issue we're seeing is rate limit related or not. We make all our requests with a user agent starting Shields.io/ if that helps.

@cdhunt
Copy link

cdhunt commented Oct 14, 2022

Have you registered with https://stackapps.com/? That would get you higher throttling limits. I do see your requests and I'll poke around some more on Monday.

@chris48s
Copy link
Member

Have you registered with https://stackapps.com/?

No. I was not aware it existed. We're making all our requests with no auth. I'll have a look into this 👍

@chris48s
Copy link
Member

PR up at #8539

@dillanjwilding
Copy link

Has this been resolved because I'm still seeing "invalid parameters" instead of the reputation count?

@chris48s
Copy link
Member

#8539 is still open waiting on review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Support questions, usage questions, unconfirmed bugs, discussions, ideas
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants