Skip to content

Uncaught email-already-in-use exception #27

Open

Description

@reesealanj

I'm not sure where in the lit_firebase_auth this error is coming from (I've been looking for the last 2 hours trying to find the cause), but on version 0.3.0 running a call to context.registerWithEmailAndPassword() returns the following error, and Wrapping my call to context.registerWithEmailAndPassword() does not work because the exception is uncaught by the actual call to FirebaseAuth within the back end of the package. I'm not sure what else to try or if I'm missing something here.

Error:

[VERBOSE-2:ui_dart_state.cc(177)] Unhandled Exception: [firebase_auth/email-already-in-use] The email address is already in use by another account.
#0      catchPlatformException (package:firebase_auth_platform_interface/src/method_channel/utils/exception.dart:20:3)
#1      _rootRunUnary (dart:async/zone.dart:1198:47)
#2      _CustomZone.runUnary (dart:async/zone.dart:1100:19)
#3      _FutureListener.handleError (dart:async/future_impl.dart:160:20)
#4      Future._propagateToListeners.handleError (dart:async/future_impl.dart:708:47)
#5      Future._propagateToListeners (dart:async/future_impl.dart:729:24)
#6      Future._completeError (dart:async/future_impl.dart:537:5)
#7      _AsyncAwaitCompleter.completeError (dart:async-patch/async_patch.dart:47:15)
#8      MethodChannel.invokeMapMethod (package:flutter/src/services/platform_channel.dart)
<asynchronous suspension>
#9      MethodChannelFirebaseAuth.createUserWithEmailAndPassword (package:firebase_auth_platform_interface/src/method_channel/method_c<…>

The exception here is not unrecoverable in that I can simply just return from my registration widget to the sign in widget and the application continues to behave as expected. The only reason this is actually an issue is that because the uncaught exception doesn't make it out to the try catch block that I have the call wrapped in, the call will make my signInForm just spin endlessly and the `context.isSubmitting()` is never updated so the UI never updates to show that the call has failed and so that I can handle the error.

Activity

  1. funwithflutter commented on Jan 28, 2021

    @funwithflutter
    Owner

    Do you have some example code so that I can replicate? I'll also take a look at the exception logic.

  2. orsenkucher commented on Aug 20, 2021

    @orsenkucher

    @funwithflutter Basically it seems you just forgot to update _registerWithEmailAndPassword

    Future<Auth> _registerWithEmailAndPassword(

    with updating error handling commit refactor: update error handling with new core 2b15ba8

  3. orsenkucher commented on Aug 20, 2021

    @orsenkucher

    @funwithflutter will you have time to merge the #38 fix?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions