BookShelf App is an Android application that lets users search for books, view book details, leave reviews, add books to favorites, and view example categories of books. The app uses Firebase's Firestore database service to store user and book data and the Google Books API to search for books and retrieve book data.
Description:
When attempting to create a new user with an email address that is already in use, the app throws a com.google.firebase.auth.FirebaseAuthUserCollisionException with the message "The email address is already in use by another account." This occurs in the createUserWithEmailAndPassword function of the LoginScreenViewModel class.
Steps to Reproduce:
Attempt to create a new user with an email address that is already in use
Observe the error message and crash of the app
Expected Result:
The app should display a message to the user informing them that the email address is already in use, and prompt them to try a different email or sign in with an existing account.
Actual Result:
The app crashes and throws the mentioned exception.