Skip to content

Firebase Auth errorFirebase: “auth/network-request-failed”

Sign-in fails with auth/network-request-failed, often for some users and not others. Firebase’s description is short: a network error, such as a timeout, an interrupted connection or an unreachable host. The question is what stopped the request from reaching Google. Here’s how we narrow it down, or hand it over at a fixed price.

Short answer

The request to Firebase Auth never got an answer. Open the browser’s network tab and retry: a blocked or failed request to identitytoolkit.googleapis.com or securetoken.googleapis.com shows the cause. Common ones are an ad blocker or privacy extension, a Content Security Policy that leaves out Google’s hosts, the app still pointing at the Auth emulator, or a form that reloads the page mid-request.

What blocks the request, most likely first

  1. 01

    A real network failure

    “Thrown if a network error (such as timeout, interrupted connection or unreachable host) has occurred.” Firebase, firebase.auth.Error

    Weak mobile data, a captive portal or a VPN can drop the request. Retry once with a short delay, and show a clear “check your connection” message instead of the raw code.

  2. 02

    A blocker, firewall or Content Security Policy

    If only some users fail, ask what browser extensions or office network they use. If everyone fails on the live site but not locally, check the site’s Content Security Policy: it must allow Google’s auth hosts for requests, and apis.google.com and your project’s firebaseapp.com domain for popup and redirect sign-in.

  3. 03

    The app still points at the emulator

    A connectAuthEmulator call left in the production build sends every sign-in to localhost, which fails for real users. Only connect the emulator in development.

  4. 04

    The page reloads during sign-in

    A sign-in button inside a form without preventDefault reloads the page and cancels the request, which Firebase reports as a network error. It’s one of the first things we check in AI-built login screens.

Checked against the vendor’s docs on : Firebase reference: firebase.auth.Error; Firebase docs: Best practices for signInWithRedirect.

Rather hand it over?

Fixed scope, fixed price, paid upfront. The work happens in writing; no call needed.

Related: Firebase auth/unauthorized-domain · Firebase Google sign-in popup blocked · Firebase auth/too-many-requests · Firebase auth/invalid-api-key in production

Questions

More on this error

It only fails on iPhone. Why?

Check whether those users are on Safari with content blockers or iCloud Private Relay, and whether the app uses signInWithRedirect on a domain other than its auth domain. Firebase documents how to keep redirect sign-in working on browsers that block third-party storage.

What do you need to diagnose it?

The live URL, a screenshot of the failed request in the network tab if you can get one, and which users or devices see it.

Can you fix it for me?

If one bug is the whole problem, the App Fix Ticket covers it: a written diagnosis first, then the fix. If the app has more going on, the Launch Check is a written check of the whole app. Each issue found is rated critical, high, medium or low, with where it is and how it was confirmed. No issues worth fixing, no charge. If the Launch Check finds nothing rated medium or higher, Simon refunds the full $450. You keep the report either way.

A different error?

Describe it and get a written quote

Send the error and what you were doing. You get a written scope, a fixed price and a timeline; we reply by email, usually within one business day.