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 starts with a fixed-price diagnosis, then a fixed price for the fix before any fix work.
Why the popup is cancelled, and the fix
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; } }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.
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.
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.
- from $450App Fix TicketOne reproducible bug in an existing mobile or web app, diagnosed and fixed.See scope and start
- from $450AI-Built App RescueA Lovable, Bolt or Cursor app checked end to end in 3 days, then its worst problems fixed at a fixed price.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.See scope and start
“Very responsive, attentive to fixing bugs, and completed the project as needed! Thank you!”
Related: Firebase auth/popup-blocked · Firebase auth/user-mismatch · Firebase auth/unauthorized-domain · Firebase auth/network-request-failed