Skip to content

auth/cancelled-popup-request on school-managed ChromeOS devices #9769

@prosenjit07

Description

@prosenjit07

Operating System

Chromeos

Environment (if applicable)

Node js 18, angular 15, Chrome browser

Firebase SDK Version

v9+

Firebase SDK Product(s)

Auth

Project Tooling

auth/cancelled-popup-request on school-managed ChromeOS devices

Detailed Problem Description

Description

Firebase signInWithPopup fails only on school-managed ChromeOS devices in production. Works fine on all other OS/browsers and on localhost:4200 everywhere.

Error

FirebaseError: Firebase: This operation has been cancelled due to another conflicting popup being opened. (auth/cancelled-popup-request)

Environment

Environment Result
Production — managed ChromeOS ❌ Fails
Production — other OS ✅ Works
localhost:4200 — all browsers ✅ Works

Notes

  • App uses Google-integrated accounts with Drive & Classroom scopes.
  • Likely cause: ChromeOS MDM policy or forced SSO intercepting the popup and conflicting with Firebase's popup lifecycle.
  • Potential fix: switch to signInWithRedirect for managed device environments.

Steps and code to reproduce issue

this.sessionManagerService.setisIntegratedWithGoogle(res.data?.isGoogleIntegrated);

if (res.data.sessionUrl) {
window.open(res.data.sessionUrl, '_self');
} else {
const isIntegratedWithGoogle = this.sessionManagerService.getisIntegratedWithGoogle();
const googleProvider = this.sessionManagerService.getgProviderDetails();

if (isIntegratedWithGoogle === 'true' && googleProvider === 'google.com') {
this.googleAccessTokenService.integrateGoogleScopePermissions();

const hasAccessToken = await this.waitForAccessTokenWithTimeout(10000);

this.userAuthService.navigationBasedOnUser(res.data);

if (!hasAccessToken) {
  console.warn('Google scope popup blocked during social login. Proceeding without Drive.');
}

}
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions