s0hv / rust-imgur-upload

Rust imgur uploader for use with the Discord Rich Presence foobar2000 plugin
MIT License
28 stars 1 forks source link

Uploader returns 503 error, but I can access imgur.com through the browser? #5

Closed afgks closed 7 months ago

afgks commented 8 months ago

I can't seem to upload any artwork through the uploader. I get this error in the console

Discord Rich Presence Integration v1.3.0: artwork uploader exited with status: 1 and error: Error while parsing imgur response from 
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
  <head>
    <title>503 client read error</title>
  </head>
  <body>
    <h1>Error 503 client read error</h1>
    <p>client read error</p>
    <h3>Error 54113</h3>
    <p>Details: cache-par-lfpg1960093-PAR 1709748649 1348769102</p>
    <hr>
    <p>Varnish cache server</p>
  </body>
</html>
: expected value at line 2 column 1

But I can access imgur.com through the browser. I am not using a VPN.

afgks commented 8 months ago

I also now got the same error as another person reported in another open issue

Discord Rich Presence Integration v1.3.0: artwork uploader exited with status: 1 and error: Error while parsing imgur response from {"errors":[{"id":"legacy-api-9f5647bb6-88lls/uHn8baZlRo-021125","code":"429","status":"Too Many Requests","detail":"Too Many Requests"}]}
: missing field `data` at line 1 column 137

Could you please investigate and see if there's something going on?

s0hv commented 8 months ago

It really just seems like the API rate limits have been reached. The X-RateLimit-UserRemaining header is 0 while X-RateLimit-ClientLimit is the default 12500. Below is the rate limit header table taken from https://apidocs.imgur.com/, which contains explanations for the header types.

HTTP Header Description
X-RateLimit-ClientLimit Total credits that can be allocated for the application in a day.
X-RateLimit-ClientRemaining Total credits remaining for the application in a day.
worf1337 commented 8 months ago

suddenly been getting this too. perhaps imgur have lowered their limits?

worf1337 commented 8 months ago

I think it's rate limiting across the entire application. I built it myself with my own client ID and it works perfectly.

s0hv commented 8 months ago

It seems like a problem with my API application. Working on a new release with a new client id, but for some reason the build from github actions keeps being labeled as a virus, while local builds have no such problem. For an immediate fix you can build it yourself with your own client id

s0hv commented 8 months ago

I'm kinda lost as to why the executable is being labeled as a virus by windows defender. You can check out the pre-release that is flagged here, or just compile it yourself

jonahbrawley commented 7 months ago

The new pre-release seemed to work for me. So a more permanent solution is to just use your personal client id?

s0hv commented 7 months ago

That's the easiest solution until the microsoft defender false positives stop

s0hv commented 7 months ago

Seems like the false positive issue has been resolved. The latest release should fix this problem https://github.com/s0hv/rust-imgur-upload/releases/tag/0.2.1