PC パソコン

How to Fix “HTTP ERROR 413” After Google Sign-In in Android Studio or Gemini

After completing Google authentication for Android Studio or Gemini, the browser may redirect to localhost, display HTTP ERROR 413, and fail to return a successful sign-in result to the IDE. Google lists this known issue as fixed in Android Studio Quail 1 Canary 3.

Error message

This page isn't working
localhost sent an invalid response.
HTTP ERROR 413

The exact wording varies by browser. The distinguishing sequence is that Google authentication completes, but the local callback that hands the result back to Android Studio responds with HTTP 413.

Cause

Google Issue Tracker #432864542 describes a defect where Android Studio or Gemini sign-in fails after Google login and redirects to localhost with HTTP ERROR 413. HTTP 413 generally means the receiver rejected a request because of its size. Google has not publicly documented the lower-level implementation fault behind this specific IDE authentication bug.

This differs from a 413 response caused by uploading a large file to a normal web server. When it occurs in Android Studio’s local authentication callback, changing your application server configuration is not relevant.

Affected conditions and versions

  • You start Google sign-in from Android Studio or Gemini.
  • You complete authentication in an external browser.
  • The callback redirects to localhost and returns HTTP 413.
  • The installed Android Studio build predates the fix.

Google’s fixed-issues page records the correction in Android Studio Quail 1 Canary 3 (2026.1.1 Canary 3), released April 30, 2026. Install Canary 3 or later, preferably a current stable release containing the fix.

Recommended fix

  1. Check the installed version under Help > About.
  2. Use Help > Check for Updates to install Quail 1 Canary 3 or a newer stable version.
  3. Exit Android Studio completely and restart it.
  4. Start Google sign-in again from the Gemini or IDE account interface.
  5. After browser authentication, return to the IDE and confirm that the account is connected.

Alternatives when you cannot update immediately

For temporary diagnosis, try a private browser window, change the default browser, or restart both the browser and Android Studio before retrying. Google does not document these steps as official workarounds for issue #432864542, so they are not guaranteed or permanent fixes.

On a managed network, ask the administrator whether a VPN, proxy, endpoint-security product, or browser policy is interfering with localhost callbacks. Do not disable security controls without confirming the cause and obtaining authorization.

How to verify the fix

  • The browser no longer displays HTTP ERROR 413 after Google login.
  • The browser-to-IDE handoff completes.
  • Android Studio shows the account as signed in.
  • Gemini chat or the intended authenticated feature becomes available.

Cautions

If 413 persists after updating, use the browser’s developer tools and Android Studio logs to confirm that the failing destination is actually localhost. Google Workspace policy, account permissions, and network proxies can cause separate sign-in failures that require different troubleshooting.

Summary

HTTP ERROR 413 on localhost after Google login is a known Android Studio and Gemini authentication issue. Updating to Quail 1 Canary 3 or later, restarting the IDE, and signing in again is the recommended resolution.

Official references