jbowmanp1107 / ImageCropper.Maui

MIT License
43 stars 10 forks source link

Activity crashes FirebaseAuth. #3

Closed Quetzalcoatl2435 closed 1 month ago

Quetzalcoatl2435 commented 1 year ago

Selecting a picture causes a crash in FirebaseAuthImplementation.HandleActivityResultAsync(requestCode, resultCode, data); on Android.

protected override void OnActivityResult(int requestCode, Result resultCode, Intent data)
{
    base.OnActivityResult(requestCode, resultCode, data);
    FirebaseAuthImplementation.HandleActivityResultAsync(requestCode, resultCode, data);
}
Quetzalcoatl2435 commented 1 year ago

Some background info: My app uses 2 login methods, Google or manual e-mail/passwd. If user logs in using Google, everything works fine, but when user logs in using e-mail/passwd, FirebaseAuthImplementation.HandleActivityResultAsync(requestCode, resultCode, data); keeps crashing.

Workaround for anyone getting the same problem: use try catch.

try
{
    FirebaseAuthImplementation.HandleActivityResultAsync(requestCode, resultCode, data);
}
catch (Exception) { }

Oh, and there's a typo in ImageCropper.cs line 41: Faiure -> should be Failure. :)

jbowmanp1107 commented 1 year ago

@Quetzalcoatl2435 how is your app handling the different login methods? Is there something at the core that is behaving differently in your app if they login different? I have the same paradigm in my app, social/email login, and I am not experiencing this issue.

jbowmanp1107 commented 1 month ago

Closing due to not enough info.