Bolt icon indicating copy to clipboard operation
Bolt copied to clipboard

API rate limit exceeded for IP

Open rodhfr opened this issue 1 year ago • 3 comments

Using the launcher for some months now and I don’t know why, but sometimes I try to open the launcher and I get this error:

8:04:51 PM - Error from https://api.github.com/repos/runelite/launcher/releases: 403: {"message":"API rate limit exceeded for 187.19.177.105. (But here's the good news: Authenticated requests get a higher rate limit. Check out the documentation for more details.)","documentation_url":"https://docs.github.com/rest/overview/resources-in-the-rest-api#rate-limiting"}

I’m not abusing the login or anything; I’m only using only one account and I think I’ve only opened the Bolt launcher about 5 times during the day. This has happened to me a few times on different computers but using the same internet. Maybe it's because my ISP uses CGNAT and routes the addresses.

Authenticated requests get a higher rate limit <- How can I use this?

Normally the problem disappear after a couple minutes or hours but led me unable to play meanwhile.

rodhfr avatar Jul 23 '24 23:07 rodhfr

Checking I see that my API quota is indeed limited according to the output from https://api.github.com/rate_limit

{
  "resources": {
    "core": {
      "limit": 60,
      "remaining": 0,
      "reset": 1721777904,
      "used": 60,
      "resource": "core"
    },
    "graphql": {
      "limit": 0,
      "remaining": 0,
      "reset": 1721781319,
      "used": 0,
      "resource": "graphql"
    },
    "integration_manifest": {
      "limit": 5000,
      "remaining": 5000,
      "reset": 1721781319,
      "used": 0,
      "resource": "integration_manifest"
    },
    "search": {
      "limit": 10,
      "remaining": 10,
      "reset": 1721777779,
      "used": 0,
      "resource": "search"
    }
  },
  "rate": {
    "limit": 60,
    "remaining": 0,
    "reset": 1721777904,
    "used": 60,
    "resource": "core"
  }
}

rodhfr avatar Jul 23 '24 23:07 rodhfr

8:48:16 PM - Game launch status: 'OK' 8:48:16 PM - Latest JAR is already installed 8:48:12 PM - Save-credentials status: OK 8:48:12 PM - Successfully added login for rodhfr

Now I could launch again but this problem is somewhat recorrent

$ curl -H "Accept: application/vnd.github.v3+json" https://api.github.com/rate_limit
{
  "resources": {
    "core": {
      "limit": 60,
      "remaining": 59,
      "reset": 1721782095,
      "used": 1,
      "resource": "core"
    },
    "graphql": {
      "limit": 0,
      "remaining": 0,
      "reset": 1721782144,
      "used": 0,
      "resource": "graphql"
    },
    "integration_manifest": {
      "limit": 5000,
      "remaining": 5000,
      "reset": 1721782144,
      "used": 0,
      "resource": "integration_manifest"
    },
    "search": {
      "limit": 10,
      "remaining": 10,
      "reset": 1721778604,
      "used": 0,
      "resource": "search"
    }
  },
  "rate": {
    "limit": 60,
    "remaining": 59,
    "reset": 1721782095,
    "used": 1,
    "resource": "core"
  }
}

rodhfr avatar Jul 23 '24 23:07 rodhfr

This error is from the Github API and happens when trying to check for a newer version of RuneLite from their releases page, which currently happens every time you click "play". Github rate-limits requests to 2 per minute from any IP address. So either you're launching the game too often, or your IP address is being used by someone else (maybe a shared router, a college or university campus, a VPN, etc..)

I've been thinking I should add a cooldown period so that it won't check more than once per five minutes, or so.

On Wed, 24 Jul 2024, 00:51 Rodolfo Souza, @.***> wrote:

8:48:16 PM - Game launch status: 'OK' 8:48:16 PM - Latest JAR is already installed 8:48:12 PM - Save-credentials status: OK 8:48:12 PM - Successfully added login for rodhfr

Now I could launch again but this problem is somewhat recorrent

$ curl -H "Accept: application/vnd.github.v3+json" https://api.github.com/rate_limit { "resources": { "core": { "limit": 60, "remaining": 59, "reset": 1721782095, "used": 1, "resource": "core" }, "graphql": { "limit": 0, "remaining": 0, "reset": 1721782144, "used": 0, "resource": "graphql" }, "integration_manifest": { "limit": 5000, "remaining": 5000, "reset": 1721782144, "used": 0, "resource": "integration_manifest" }, "search": { "limit": 10, "remaining": 10, "reset": 1721778604, "used": 0, "resource": "search" } }, "rate": { "limit": 60, "remaining": 59, "reset": 1721782095, "used": 1, "resource": "core" } }

— Reply to this email directly, view it on GitHub https://github.com/Adamcake/Bolt/issues/55#issuecomment-2246551080, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHG6BIDNEOHUB3SY6DZ5A23ZN3T6VAVCNFSM6AAAAABLLLEJGCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENBWGU2TCMBYGA . You are receiving this because you are subscribed to this thread.Message ID: @.***>

Adamcake avatar Jul 24 '24 07:07 Adamcake

Fixed in in version 0.10 which has just been released. For the record, I was never able to recreate this - I clicked the button over 20 times in a minute and couldn't get a rate-limiting response no matter what. Regardless, I added a 2-minute cooldown to update checking, and also made RuneLite launch even if the update check fails (if a version already installed of course.)

Adamcake avatar Oct 15 '24 16:10 Adamcake