question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

GitHub API rate limit exceeded

See original GitHub issue

Thanks for this awesome plugin! I have used it many times without any issues but ran into a rate limit issue…

This is most likely the same issue as #122, but restarting it did not fix it. The error message is pretty confusing because I most likely ran into the rate limit error by re-trying the download after receiving a The credentials are invalid, or the token does not have permissions error popup.

Is there anyway to make an authenticated request to use the higher rate limit? Not sure what kind of requests are going on- I haven’t looked into the code.

My config:

{
    "access_token": "...",
    "gist_id": "..."
}

Error log:

WARNING:Sync Settings.sync_settings.libs.logger:{'message': "API rate limit exceeded for <IP ADDRESS>. (But here's the good news: Authenticated requests get a higher rate limit. Check out the documentation for more details.)", 'documentation_url': 'https://developer.github.com/v3/#rate-limiting'}
ERROR:Sync Settings.sync_settings.libs.logger:The credentials are invalid, or the token does not have permissions
Traceback (most recent call last):
  File "~/Library/Application Support/Sublime Text 3/Installed Packages/Sync Settings.sublime-package/sync_settings/commands/download.py", line 45, in download
    ).get(settings.get('gist_id'))
  File "~/Library/Application Support/Sublime Text 3/Installed Packages/Sync Settings.sublime-package/sync_settings/libs/gist.py", line 46, in with_gid_wrapper
    return func(self, *args, **kwargs)
  File "~/Library/Application Support/Sublime Text 3/Installed Packages/Sync Settings.sublime-package/sync_settings/libs/gist.py", line 83, in get
    return self.__do_request('get', self.make_uri(gid)).json()
  File "~/Library/Application Support/Sublime Text 3/Installed Packages/Sync Settings.sublime-package/sync_settings/libs/gist.py", line 100, in __do_request
    raise AuthenticationError('The credentials are invalid, or the token does not have permissions')
Sync Settings.sync_settings.libs.gist.AuthenticationError: The credentials are invalid, or the token does not have permissions

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
mwilliammyerscommented, May 7, 2019

I am positive it is defined. Well at least my config looks like:

{
    "access_token": "copy and pasted from my GitHub settings",
    "gist_id": "copy and pasted from the gist's URL"
}

I am definitely getting a rate limit warning:

WARNING:Sync Settings.sync_settings.libs.logger:{'message': "API rate limit exceeded for <IP ADDRESS>. (But here's the good news: Authenticated requests get a higher rate limit. Check out the documentation for more details.)", 'documentation_url': 'https://developer.github.com/v3/#rate-limiting'}

And I know that is the issue causing the The credentials are invalid, or the token does not have permissions popup because I waited a while and without changing anything it worked…

I think we should at the very least signal this to the user in the popup or display the error message returned from GitHub instead of the generic The credentials are invalid... for all GitHub API errors.

0reactions
mfuentesgcommented, May 28, 2019

Thanks William

Read more comments on GitHub >

github_iconTop Results From Across the Web

Rate limits for GitHub Apps
GitHub Apps that are installed on an organization within an enterprise on GitHub.com are subject to a limit of 15,000 requests per hour...
Read more >
GitHub Error: Rate Limit Exceeded - Coder Diaries
When GitHub throws "Rate Limit Exceeded" error, the cause is exceeding the number of requests allowed per hour. Find out how to solve...
Read more >
Is there a way to increase the API Rate limit or to bypass it ...
I am writing a tool to compare over 350 repositories in an organization and to find their correlations. Ok, the tool uses python...
Read more >
How to get the most out of GitHub API rate limits - Endor Labs
That rate limit can be easily reached in just a few minutes by calling the API to list basic information from a medium...
Read more >
Introducing GitHubApiStatus - Code Traveler
If you've ever had to use the GitHub REST APIs, you may be familiar with GitHub's API Rate Limits: This means that if...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found