Error in UpgradeMODX widget ("403 API limit exceeded")

I get the following error in my UpgradeMODX widget:

Konnte Versionsliste von GitHub nicht laden – 403 API rate limit exceeded for 81.169.144.135. (But here’s the good news: Authenticated requests get a higher rate limit. Check out the documentation for more details.)
Fehler: Konnte Versionsliste von GitHub nicht laden – 403 API rate limit exceeded for 81.169.144.135. (But here’s the good news: Authenticated requests get a higher rate limit. Check out the documentation for more details.)
Fehler: Regex failed

What I have tried so far to solve this problem:
On GitHub I created an access token. I entered this access token and my github username in the system settings: ugm_github_token and ugm_github_username.
Screenshot:

I cleared the cache.
The error message still appears. What else do I need to do to solve this problem?

Try manually deleting all files in the core/cache directory, then visiting the site with your browser in private or incognito mode.

Double check the System Settings, sometimes a change doesn’t stick.

Thank you for your suggestion. I followed your instructions - unfortunately the error message still appears. What else can I do?

I’m afraid I can’t think of anything else. I believe the worst-case rate limit for GitHub is 5,000 requests per hour. Is there any change you’re exceeding that? What’s the ugm_interval System Setting?

You could keep an eye on the last_check System Setting to see how often it’s actually checking.

ugm_interval = 1 day. Should I adapt ugm_interval or last_check in order to get rid of the error?

Neither. 1 day should be fine unless you have thousands of admin users visiting the dashboard every hour. Last check is set automatically by UGM.

It almost has to be a problem with the GitHub credentials – maybe a stray character in the strings like a space at either end or a non-printing character like \n.

See if you can log out from GitHub and log back in with the credentials.

Which credentials you mean? I have normal access to GitHub.

I just created an additional token. Before, I created a “Fine-grained token”, now I created a “Classical token”. Then I deleted the cache files. Still the problem persists.

Any further solution in mind?
Is there any other way to upgrade MODX without using the plugin?

which MODX version do you want to upgrade?
If UgradeMODX doesn’t work for you for some reason, you could try that installer:

Bruno17/installer (github.com)

You can always do a manual update:

https://docs.modx.com/current/en/getting-started/maintenance/upgrading

The UpgradeMODX extra does exactly the same, just automated.


Maybe it’s also possible to host the update information yourself.
The system setting ugm_versionlist_api_url shows the URL where the version information is coming from. You could theoretically change that and provide the same JSON data yourself.

@halftrainedharry: You mean changing ugm_versionlist_api_url helps preventing the error “403 API limit exceeded”? What should I put as a value?

The default value for the api url is //api.github.com/repos/modxcms/revolution/tags.

Your server seemingly has a problem accessing this url.
Can you access the URL directly in your browser? Maybe by adding your github credentials? Maybe by using a VPN?

If you can access the URL, you can save the response (e.g. as “tags.json”), then put this file on a server of yours (e.g. https://mydomain.com/tags.json) and use this new URL for the setting ugm_versionlist_api_url.

(Of course this is only a temporary solution and you have to manually update the file every time MODX releases a new version.)

1 Like

Thank you, this has worked. :slight_smile:

I’m certain that the problem is not with the server’s ability to connect to the URL. That “Rate limit exceeded” message is coming from GitHub’s server.

In fact, I don’t think the problem is the rate limit at all since the last time I checked, the anonymous rate is 60 per hour.

I’ve seen cases where GitHub returned that message for other issues. You might turn on Dev Tools in your browser (Ctrl-shift-i) and watch the Network tab at the bottom. If you can find the call to GitHub, you can click on that entry to drill down and look at the Response tab to see the full message from GitHub. That might provide a clue to what’s happening.

This drives me nuts too. So I just checked my IP address. It start with 84. But the UPM widget is saying: API rate limit exceeded for 81… I’ve no idea where this information is coming from but maybe anyone else? And I just checked my internet connections with LittleSnitch. When GitHubDesktop is running even in the background it connects to GitHub every minute.

Update: I just looked ip the 81… ip address. It’s wierd, it is belonging to an internet provider I am not using. Maybe m client but I’m sure he died not try to update MODx. It’s wierd.