Skip to content

Firebase Auth error

Firebase Auth: auth/cancelled-popup-request

auth/cancelled-popup-request is the Firebase Auth error a popup sign-in throws when another popup call starts before it finishes. The SDK shows one popup at a time and cancels the older request.

Rather hand it over? App Fix Ticket: One reproducible bug in an existing mobile or web app, diagnosed and fixed.The Fix is $1,200 in total. The $450 Diagnosis is optional and credited toward it.

Full refund if Simon can’t take it on once he sees your project, or if you cancel before work starts. Refund terms.

Short answer

Make sure only one signInWithPopup or linkWithPopup call runs at a time: disable the button while sign-in is pending, and don’t start sign-in from code that runs twice. When the error does arrive, ignore it; the newer popup is still running.

Rather not fix it yourself? App Fix Ticket fixes one reproducible bug at a fixed price, with an optional Diagnosis that is credited toward the fix.

Why the popup is cancelled, and the fix

  1. 01

    The user clicked twice

    “This operation has been cancelled due to another conflicting popup being opened.” Firebase JS SDK, Firebase JS SDK auth errors (cancelled-popup-request)

    A second click opens a new popup and cancels the first call. Disable the button until the call settles.

    let signingIn = false;
    async function signIn() {
      if (signingIn) return;
      signingIn = true;
      try {
        await signInWithPopup(auth, new GoogleAuthProvider());
      } catch (error) {
        if (error.code !== 'auth/cancelled-popup-request') throw error;
      } finally {
        signingIn = false;
      }
    }
  2. 02

    Sign-in starts from code that runs twice

    “Only one popup is ever shown at once.” Firebase JS SDK, Firebase JS SDK source: popup.ts

    React StrictMode runs effects twice in development. Start popups from a click handler, not from an effect.

  3. 03

    The app shows the error to the user

    The cancelled call is not a failure the user needs to see. Treat this code like a no-op and wait for the newer popup’s result.

  4. 04

    A different popup error is the real one

    Also check: if no popup opens at all, the browser blocked it, which is auth/popup-blocked. If the user closed it, the code is auth/popup-closed-by-user.

Checked against the vendor’s docs on : Firebase JS SDK source: auth errors; Firebase JS SDK source: popup.ts; Firebase docs: Authenticate using Google with JavaScript.

Rather hand it over?

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

“Very responsive, attentive to fixing bugs, and completed the project as needed! Thank you!”
A buyer in the United States, July 2022. Shopify on Fiverr
Read 126 of the 127 Fiverr reviews

Related: Firebase auth/popup-blocked · Firebase auth/user-mismatch · Firebase auth/unauthorized-domain · Firebase auth/popup-closed-by-user

Questions

More on this error

Does the second popup still work?

Yes. Only the older call is cancelled; the newest popup carries on and resolves normally.

Does signInWithRedirect have this error?

No. This code comes from the popup flow, where the SDK allows one popup at a time.

Can you fix it for me?

If one bug is the whole problem, the App Fix Ticket covers it. If you already know the cause, you can pay for the fix directly; if not, start with a written diagnosis, which is credited toward 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. This applies to the first 10 Launch Checks bought after October 30, 2026.

A different error?

Ask Simon for a price range

Send the error and what you were doing. Simon replies by email, usually within one business day, with a price range.