Skip to content

fix: surface GitHub API rate limit errors in install scripts with VPN suggestion#343

Open
devin-ai-integration[bot] wants to merge 1 commit intomainfrom
devin/1774457429-fix-install-rate-limit-error
Open

fix: surface GitHub API rate limit errors in install scripts with VPN suggestion#343
devin-ai-integration[bot] wants to merge 1 commit intomainfrom
devin/1774457429-fix-install-rate-limit-error

Conversation

@devin-ai-integration
Copy link
Contributor

Summary

When the GitHub API returns a rate limit error during CLI installation, the install scripts previously failed silently — the grep for browser_download_url would match nothing, DOWNLOAD_URL would be empty, and the user would either get a confusing "Could not find release" error (install-latest.sh) or a completely silent failure (install-latest-linux.sh).

This PR stores the API response in a variable first, checks it for the "API rate limit exceeded" string, and if detected:

  • bin/install-latest.sh and bin/install-latest-linux.sh: Exit with a clear error message and a suggestion to turn off VPN.
  • scripts/install-agent-skill.sh: Warns but continues (since skill files are already downloaded at that point; only .version resolution is skipped).

Additionally, the generic "Could not find release" fallback in both install scripts now dumps the raw API response to stderr for easier debugging of other unexpected API failures.

Review & Testing Checklist for Human

  • Verify the grep pattern matches real rate-limit responses: The check uses grep -q "API rate limit exceeded" against the raw JSON body. Confirm this matches the actual GitHub API error message (e.g., {"message":"API rate limit exceeded for ...","documentation_url":"..."}). If GitHub changes the wording, the check silently becomes a no-op (falls through to old behavior).
  • Test manually with a rate-limited IP: Simulate or trigger a real rate limit response and confirm the error output is clear and the script exits non-zero. Also test the happy path to confirm no regression.
  • Review the agent skill script's softer handling: install-agent-skill.sh only warns on rate limit (doesn't abort) since it only affects .version resolution. Confirm this is the desired UX — a user might not notice the warning if there's lots of output.

Notes

  • The VPN suggestion is the primary user-facing guidance since the reported issue originated from corporate VPN traffic sharing a single IP that hits rate limits. This won't help in all cases (e.g., CI environments), but it's the most common cause for end users.
  • No automated test coverage for these shell scripts — manual testing is the only verification path.

Link to Devin session: https://app.devin.ai/sessions/865ae722ee8243c08d80b2bb8d639599
Requested by: @theFong

… suggestion

Previously, when the GitHub API returned a rate limit error, the install
scripts would fail silently (the grep for browser_download_url would find
nothing, resulting in an empty download URL and a confusing error or silent
failure).

Now all three scripts that call the GitHub API explicitly check for rate
limit errors and display a clear message suggesting the user turn off
their VPN.

Co-Authored-By: Alec Fong <alecsanf@usc.edu>
@devin-ai-integration devin-ai-integration bot requested a review from a team as a code owner March 25, 2026 16:52
@devin-ai-integration
Copy link
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant