Skip to content

[🐞 BUG]: fix(auth): Google sign-in popup dismissal freezes UI and shows generic error #1877

@prakriti-shrestha

Description

@prakriti-shrestha

Description 📝

When a user opens the Google sign-in popup on the Sign In page and closes it mid-way (e.g., to switch to email sign-in or sign-up), two things happen:

  1. A generic "An error has occurred, sorry for the inconvenience" toast appears.
  2. The entire sign-in page freezes i.e. buttons become unresponsive and
    the page requires a full reload to recover.

Link 🔗

https://ruxailab-prod.web.app/signin

Steps to Reproduce 🔄

  1. Go to the Sign In page (/signin)
  2. Click "Continue with Google"
  3. When the Google popup appears, close it without completing sign-in
  4. Observe the generic error toast and frozen UI

Screenshots 📸

Image Image Image

Expected Behavior 🤔

  • No error toast should appear (closing a popup is intentional user action).
  • The sign-in page should remain fully interactive.
  • User should be able to immediately try email sign-in or Google sign-in again.

Actual Behavior 😱

  • Generic error toast: "An error has occurred, sorry for the inconvenience".
  • Page freezes completely - all buttons disabled.
  • Full page reload required to recover.

Environment 🌍

  • Branch: develop
  • Browser: Chrome
  • OS: Windows 11

Additional Information ℹ️

Root Cause

Three bugs working together:
Bug 1 - SignInView.vue: onGoogleSignInError calls store.dispatch('setLoading', false) but setLoading is a
mutation, not an action. dispatch silently fails, leaving loading = true forever - this causes the freeze.

Bug 2 - Auth.js: signInWithGoogle action has no finally block to reset loading state after an error.

Bug 3 - Auth.js: auth/popup-closed-by-user is caught and treated as a real error, showing a generic toast when it should be handled silently.

Note

The useDeleteAccount.js composable already handles auth/popup-closed-by-user correctly:

'auth/popup-closed-by-user': 'errors.authenticationCancelled'

The same pattern should be applied consistently to the sign-in flow.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions